diff --git a/examples/scene-transition-geometry-mask/assets/images/ansimuz/starfighter/background.png b/examples/scene-transition-geometry-mask/assets/images/ansimuz/starfighter/background.png new file mode 100644 index 0000000..fff5371 Binary files /dev/null and b/examples/scene-transition-geometry-mask/assets/images/ansimuz/starfighter/background.png differ diff --git a/examples/scene-transition-geometry-mask/assets/images/ansimuz/starfighter/public-license.txt b/examples/scene-transition-geometry-mask/assets/images/ansimuz/starfighter/public-license.txt new file mode 100755 index 0000000..a26d6c6 --- /dev/null +++ b/examples/scene-transition-geometry-mask/assets/images/ansimuz/starfighter/public-license.txt @@ -0,0 +1,23 @@ +Artwork created by Luis Zuno (@ansimuz) + + +LICENSE: +You may use these assets in personal or commercial projects. You can modify these assets to suit your needs. You can re-distribute the file. +Credit no required but appreciated it. + +____________________ + +LINKS + +Twitter @ansimuz + +Support my work at Patreon https://www.patreon.com/ansimuz + +Buy my stuff https://ansimuz.itch.io/ + +Get more Free Assetslike these at: http://www.ansimuz.com + + +____________________ + + diff --git a/examples/scene-transition-geometry-mask/assets/images/ansimuz/warped-vehicle/public-license.txt b/examples/scene-transition-geometry-mask/assets/images/ansimuz/warped-vehicle/public-license.txt new file mode 100755 index 0000000..f1a739b --- /dev/null +++ b/examples/scene-transition-geometry-mask/assets/images/ansimuz/warped-vehicle/public-license.txt @@ -0,0 +1,15 @@ +Artwork created by Luis Zuno (@ansimuz) + + +LICENSE: +You may use these assets in personal or commercial projects. You can modify these assets to suit your needs. You can re-distribute the file. +Credit no required but appreciated it. + +Links + +Twitter @ansimuz +Support my work at Patreon https://www.patreon.com/ansimuz +Buy my stuff https://ansimuz.itch.io/ +Get more Free Assetslike these at: http://www.ansimuz.com + + diff --git a/examples/scene-transition-geometry-mask/assets/images/ansimuz/warped-vehicle/ship.png b/examples/scene-transition-geometry-mask/assets/images/ansimuz/warped-vehicle/ship.png new file mode 100644 index 0000000..193dfb4 Binary files /dev/null and b/examples/scene-transition-geometry-mask/assets/images/ansimuz/warped-vehicle/ship.png differ diff --git a/examples/scene-transition-geometry-mask/assets/js/index-BUIz7ZLw.js b/examples/scene-transition-geometry-mask/assets/js/index-BUIz7ZLw.js new file mode 100644 index 0000000..3672bfe --- /dev/null +++ b/examples/scene-transition-geometry-mask/assets/js/index-BUIz7ZLw.js @@ -0,0 +1,6345 @@ +var Lt=(lt,ct,dt)=>{if(!ct.has(lt))throw TypeError("Cannot "+dt)};var At=(lt,ct,dt)=>{if(ct.has(lt))throw TypeError("Cannot add the same private member more than once");ct instanceof WeakSet?ct.add(lt):ct.set(lt,dt)};var Mt=(lt,ct,dt)=>(Lt(lt,ct,"access private method"),dt);(function(){const ct=document.createElement("link").relList;if(ct&&ct.supports&&ct.supports("modulepreload"))return;for(const at of document.querySelectorAll('link[rel="modulepreload"]'))gt(at);new MutationObserver(at=>{for(const pt of at)if(pt.type==="childList")for(const p of pt.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&>(p)}).observe(document,{childList:!0,subtree:!0});function dt(at){const pt={};return at.integrity&&(pt.integrity=at.integrity),at.referrerPolicy&&(pt.referrerPolicy=at.referrerPolicy),at.crossOrigin==="use-credentials"?pt.credentials="include":at.crossOrigin==="anonymous"?pt.credentials="omit":pt.credentials="same-origin",pt}function gt(at){if(at.ep)return;at.ep=!0;const pt=dt(at);fetch(at.href,pt)}})();var Ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(lt){return lt&<.__esModule&&Object.prototype.hasOwnProperty.call(lt,"default")?lt.default:lt}var Rt={exports:{}};(function(lt,ct){(function(gt,at){lt.exports=at()})(Ot,()=>(()=>{var dt={50792:p=>{var S=Object.prototype.hasOwnProperty,t="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(t=!1));function c(e,s,h){this.fn=e,this.context=s,this.once=h||!1}function a(e,s,h,i,o){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new c(h,i||e,o),l=t?t+s:s;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],f]:e._events[l].push(f):(e._events[l]=f,e._eventsCount++),e}function r(e,s){--e._eventsCount===0?e._events=new d:delete e._events[s]}function n(){this._events=new d,this._eventsCount=0}n.prototype.eventNames=function(){var s=[],h,i;if(this._eventsCount===0)return s;for(i in h=this._events)S.call(h,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(h)):s},n.prototype.listeners=function(s){var h=t?t+s:s,i=this._events[h];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,f=i.length,l=new Array(f);o{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(38829),c=function(a,r,n,e){for(var s=a[0],h=1;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"angle",r,n,e,s)};p.exports=c},60757:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){c===void 0&&(c=0);for(var a=c;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){c===void 0&&(c=0);for(var a=t.length-1;a>=c;a--){var r=t[a],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S},94420:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(11879),c=t(60461),a=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),s=function(h,i){i===void 0&&(i={});var o=i.hasOwnProperty("width"),f=i.hasOwnProperty("height"),l=a(i,"width",-1),u=a(i,"height",-1),v=a(i,"cellWidth",1),g=a(i,"cellHeight",v),x=a(i,"position",c.TOP_LEFT),m=a(i,"x",0),y=a(i,"y",0),T=0,E=0,C=l*v,A=u*g;e.setPosition(m,y),e.setSize(v,g);for(var P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"alpha",r,n,e,s)};p.exports=c},67285:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"x",r,n,e,s)};p.exports=c},9074:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s,h,i){return n==null&&(n=r),d(a,"x",r,e,h,i),d(a,"y",n,s,h,i)};p.exports=c},75222:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"y",r,n,e,s)};p.exports=c},22983:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c===void 0&&(c=0),a===void 0&&(a=6.28);for(var r=c,n=(a-c)/t.length,e=d.x,s=d.y,h=d.radius,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c===void 0&&(c=0),a===void 0&&(a=6.28);for(var r=c,n=(a-c)/t.length,e=d.width/2,s=d.height/2,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15258),c=t(26708),a=function(r,n,e){var s;e?s=c(n,e,r.length):s=d(n,r.length);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14649),c=t(86003),a=t(49498),r=function(n,e,s){s===void 0&&(s=0);var h=d(e,!1,n.length);s>0?c(h,s):s<0&&a(h,Math.abs(s));for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84993),c=function(a,r,n){var e=d({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),s=d({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),h=d({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),s.pop(),h.pop(),e=e.concat(s,h);for(var i=e.length/a.length,o=0,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r,n){a===void 0&&(a=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][d]+=c+s*a,s++;return t};p.exports=S},43967:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r,n){a===void 0&&(a=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][d]=c+s*a,s++;return t};p.exports=S},88926:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28176),c=function(a,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(24820),c=function(a,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65822),c=function(a,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26597),c=function(a,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(90260),c=function(a,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"rotation",r,n,e,s)};p.exports=c},91051:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1163),c=t(20339),a=function(r,n,e){for(var s=n.x,h=n.y,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1163),c=function(a,r,n,e){var s=r.x,h=r.y;if(e===0)return a;for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"scaleX",r,n,e,s)};p.exports=c},94868:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s,h,i){return n==null&&(n=r),d(a,"scaleX",r,e,h,i),d(a,"scaleY",n,s,h,i)};p.exports=c},95532:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66979),c=function(a,r,n,e,s){return d(a,"scaleY",r,n,e,s)};p.exports=c},8689:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"alpha",r,n,e,s)};p.exports=c},2645:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e){return d(a,"blendMode",r,0,n,e)};p.exports=c},32372:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"depth",r,n,e,s)};p.exports=c},85373:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s,h,i){return n==null&&(n=r),d(a,"originX",r,e,h,i),d(a,"originY",n,s,h,i),a.forEach(function(o){o.updateDisplayOrigin()}),a};p.exports=c},79939:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"rotation",r,n,e,s)};p.exports=c},2699:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s,h,i){return n==null&&(n=r),d(a,"scaleX",r,e,h,i),d(a,"scaleY",n,s,h,i)};p.exports=c},98739:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"scaleX",r,n,e,s)};p.exports=c},98476:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"scaleY",r,n,e,s)};p.exports=c},6207:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s,h,i){return n==null&&(n=r),d(a,"scrollFactorX",r,e,h,i),d(a,"scrollFactorY",n,s,h,i)};p.exports=c},6607:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"scrollFactorX",r,n,e,s)};p.exports=c},72248:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"scrollFactorY",r,n,e,s)};p.exports=c},14036:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e){return d(a,"visible",r,0,n,e)};p.exports=c},77597:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"x",r,n,e,s)};p.exports=c},83194:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s,h,i){return n==null&&(n=r),d(a,"x",r,e,h,i),d(a,"y",n,s,h,i)};p.exports=c},67678:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43967),c=function(a,r,n,e,s){return d(a,"y",r,n,e,s)};p.exports=c},35850:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=new d);var h,i,o=a.length;if(o===1)h=a[0].x,i=a[0].y,a[0].x=r,a[0].y=n;else{var f=1,l=0;e===0&&(l=o-1,f=o-2),h=a[l].x,i=a[l].y,a[l].x=r,a[l].y=n;for(var u=0;u=o||f===-1)){var v=a[f],g=v.x,x=v.y;v.x=h,v.y=i,h=g,i=x,e===0?f--:f++}}return s.x=h,s.y=i,s};p.exports=c},8628:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33680),c=function(a){return d(a)};p.exports=c},21837:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7602),c=function(a,r,n,e,s){s===void 0&&(s=!1);var h=Math.abs(e-n)/a.length,i;if(s)for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(54261),c=function(a,r,n,e,s){s===void 0&&(s=!1);var h=Math.abs(e-n)/a.length,i;if(s)for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][d]+=(a+c)/2:t[0][d]=(a+c)/2,t;var n=Math.abs(a-c)/(t.length-1),e;if(r)for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=0;d{/** + * @author Richard Davey + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15994),c=function(a,r,n){n===void 0&&(n=0);for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AlignTo:t(11517),Angle:t(80318),Call:t(60757),GetFirst:t(69927),GetLast:t(32265),GridAlign:t(94420),IncAlpha:t(41721),IncX:t(67285),IncXY:t(9074),IncY:t(75222),PlaceOnCircle:t(22983),PlaceOnEllipse:t(95253),PlaceOnLine:t(88505),PlaceOnRectangle:t(41346),PlaceOnTriangle:t(11575),PlayAnimation:t(29953),PropertyValueInc:t(66979),PropertyValueSet:t(43967),RandomCircle:t(88926),RandomEllipse:t(33286),RandomLine:t(96e3),RandomRectangle:t(28789),RandomTriangle:t(97154),Rotate:t(20510),RotateAround:t(91051),RotateAroundDistance:t(76332),ScaleX:t(61619),ScaleXY:t(94868),ScaleY:t(95532),SetAlpha:t(8689),SetBlendMode:t(2645),SetDepth:t(32372),SetHitArea:t(85373),SetOrigin:t(81583),SetRotation:t(79939),SetScale:t(2699),SetScaleX:t(98739),SetScaleY:t(98476),SetScrollFactor:t(6207),SetScrollFactorX:t(6607),SetScrollFactorY:t(72248),SetTint:t(14036),SetVisible:t(50159),SetX:t(77597),SetXY:t(83194),SetY:t(67678),ShiftPosition:t(35850),Shuffle:t(8628),SmootherStep:t(21910),SmoothStep:t(21837),Spread:t(62054),ToggleVisible:t(79815),WrapInRectangle:t(39665)}},42099:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(74943),r=t(81957),n=t(41138),e=t(35154),s=t(90126),h=new c({initialize:function(o,f,l){this.manager=o,this.key=f,this.type="frame",this.frames=this.getFrames(o.textureManager,e(l,"frames",[]),e(l,"defaultTextureKey",null),e(l,"sortFrames",!0)),this.frameRate=e(l,"frameRate",null),this.duration=e(l,"duration",null),this.msPerFrame,this.skipMissedFrames=e(l,"skipMissedFrames",!0),this.delay=e(l,"delay",0),this.repeat=e(l,"repeat",0),this.repeatDelay=e(l,"repeatDelay",0),this.yoyo=e(l,"yoyo",!1),this.showBeforeDelay=e(l,"showBeforeDelay",!1),this.showOnStart=e(l,"showOnStart",!1),this.hideOnComplete=e(l,"hideOnComplete",!1),this.randomFrame=e(l,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(i,o,f,l){f===null&&l===null?(i.frameRate=24,i.duration=24/o*1e3):f&&l===null?(i.duration=f,i.frameRate=o/(f/1e3)):(i.frameRate=l,i.duration=o/l*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,o){var f=this.getFrames(this.manager.textureManager,o);if(f.length>0){if(i===0)this.frames=f.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(f);else{var l=this.frames.slice(0,i),u=this.frames.slice(i);this.frames=l.concat(f,u)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i0){g.isLast=!0,g.nextFrame=u[0],u[0].prevFrame=g;var F=1/(u.length-1);for(m=0;m0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,o.nextFrame)},handleYoyoFrame:function(i,o){if(o||(o=!1),i.inReverse===!o&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=o),this.repeatAnimation(i);return}if(i.inReverse!==o&&i.repeatCounter===0){i.complete();return}i.forward=o;var f=o?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var o=i.currentFrame;o.isFirst?i.yoyo?this.handleYoyoFrame(i,!0):i.repeatCounter>0?i.inReverse&&!i.forward?this.repeatAnimation(i):(i.forward=!0,this.repeatAnimation(i)):i.complete():this.updateAndGetNextTick(i,o.prevFrame)},updateAndGetNextTick:function(i,o){i.setCurrentFrame(o),this.getNextTick(i)},removeFrame:function(i){var o=this.frames.indexOf(i);return o!==-1&&this.removeFrameAt(o),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(o){i.frames.push(o.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,o=1/(i-1),f,l=0;l1?(f.isLast=!0,f.prevFrame=this.frames[i-2],f.nextFrame=this.frames[0]):i>1&&(f.prevFrame=this.frames[l-1],f.nextFrame=this.frames[l+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(a.PAUSE_ALL,this.pause,this),this.manager.off(a.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 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,h){h===void 0&&(h=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=h},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});p.exports=c},60848:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42099),c=t(83419),a=t(90330),r=t(50792),n=t(74943),e=t(8443),s=t(95540),h=t(35154),i=t(36383),o=t(20283),f=t(41836),l=new c({Extends:r,initialize:function(v){r.call(this),this.game=v,this.textureManager=null,this.globalTimeScale=1,this.anims=new a,this.mixes=new a,this.paused=!1,this.name="AnimationManager",v.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(u,v,g){var x=this.anims,m=this.mixes,y=typeof u=="string"?u:u.key,T=typeof v=="string"?v:v.key;if(x.has(y)&&x.has(T)){var E=m.get(y);E||(E={}),E[T]=g,m.set(y,E)}return this},removeMix:function(u,v){var g=this.mixes,x=typeof u=="string"?u:u.key,m=g.get(x);if(m)if(v){var y=typeof v=="string"?v:v.key;m.hasOwnProperty(y)&&delete m[y]}else v||g.delete(x);return this},getMix:function(u,v){var g=this.mixes,x=typeof u=="string"?u:u.key,m=typeof v=="string"?v:v.key,y=g.get(x);return y&&y.hasOwnProperty(m)?y[m]:0},add:function(u,v){return this.anims.has(u)?(console.warn("Animation key exists: "+u),this):(v.key=u,this.anims.set(u,v),this.emit(n.ADD_ANIMATION,u,v),this)},exists:function(u){return this.anims.has(u)},createFromAseprite:function(u,v,g){var x=[],m=this.game.cache.json.get(u);if(!m)return console.warn("No Aseprite data found for: "+u),x;var y=this,T=h(m,"meta",null),E=h(m,"frames",null);if(T&&E){var C=h(T,"frameTags",[]);C.forEach(function(A){var P=[],M=s(A,"name",null),F=s(A,"from",0),L=s(A,"to",0),D=s(A,"direction","forward");if(M&&(!v||v&&v.indexOf(M)>-1)){for(var I=0,U=F;U<=L;U++){var z=U.toString(),w=E[z];if(w){var G=s(w,"duration",i.MAX_SAFE_INTEGER);P.push({key:u,frame:z,duration:G}),I+=G}}D==="reverse"&&(P=P.reverse());var R={key:M,frames:P,duration:I,yoyo:D==="pingpong"},O;g?g.anims&&(O=g.anims.create(R)):O=y.create(R),O&&x.push(O)}})}return x},create:function(u){var v=u.key,g=!1;return v&&(g=this.get(v),g?console.warn("AnimationManager key already exists: "+v):(g=new d(this,v,u),this.anims.set(v,g),this.emit(n.ADD_ANIMATION,v,g))),g},fromJSON:function(u,v){v===void 0&&(v=!1),v&&this.anims.clear(),typeof u=="string"&&(u=JSON.parse(u));var g=[];if(u.hasOwnProperty("anims")&&Array.isArray(u.anims)){for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42099),c=t(30976),a=t(83419),r=t(90330),n=t(74943),e=t(95540),s=new a({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(n.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(h){var i=this.parent;if(h===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(h)||(h=[h]);for(var o=0;ol&&(g=0),this.randomFrame&&(g=c(0,l-1));var x=f.frames[g];g===0&&!this.forward&&(x=f.getLastFrame()),this.currentFrame=x}return this.parent},pause:function(h){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),h!==void 0&&this.setCurrentFrame(h),this.parent},resume:function(h){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),h!==void 0&&this.setCurrentFrame(h),this.parent},playAfterDelay:function(h,i){if(!this.isPlaying)this.delayCounter=i,this.play(h,!0);else{var o=this.nextAnim,f=this.nextAnimsQueue;o&&f.unshift(o),this.nextAnim=h,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(h,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(h);else{var o=this.nextAnim,f=this.nextAnimsQueue;o&&f.unshift(o),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=h,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(h,i){i===void 0&&(i=!1);var o=this.currentAnim,f=this.parent,l=typeof h=="string"?h:h.key;if(i&&this.isPlaying&&o.key===l)return f;if(o&&this.isPlaying){var u=this.animationManager.getMix(o.key,h);if(u>0)return this.playAfterDelay(h,u)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h)},playReverse:function(h,i){i===void 0&&(i=!1);var o=typeof h=="string"?h:h.key;return i&&this.isPlaying&&this.currentAnim.key===o?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h))},startAnimation:function(h){this.load(h);var i=this.currentAnim,o=this.parent;return i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),o},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(n.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(n.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(n.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(n.ANIMATION_COMPLETE,n.ANIMATION_COMPLETE_KEY)},emitEvents:function(h,i){var o=this.currentAnim;if(o){var f=this.currentFrame,l=this.parent,u=f.textureFrame;l.emit(h,o,f,l,u),i&&l.emit(i+o.key,o,f,l,u)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var h=this.currentFrame;if(!h)return 0;var i=h.progress;return this.inReverse&&(i*=-1),i},setProgress:function(h){return this.forward||(h=1-h),this.setCurrentFrame(this.currentAnim.getFrameByProgress(h)),this.parent},setRepeat:function(h){return this.repeatCounter=h===-1?Number.MAX_VALUE:h,this.parent},globalRemove:function(h,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(h,i){h===void 0&&(h=!1),i===void 0&&(i=!1);var o=this.currentAnim,f=this.parent;return o?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),o.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!h,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(o.frames[0]),this.parent):f},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(h)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(h)}return this.parent},stopAfterDelay:function(h){return this._pendingStop=1,this._pendingStopValue=h,this.parent},stopAfterRepeat:function(h){return h===void 0&&(h=1),this.repeatCounter!==-1&&h>this.repeatCounter&&(h=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=h,this.parent},stopOnFrame:function(h){return this._pendingStop=3,this._pendingStopValue=h,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(h,i){var o=this.currentAnim;if(!(!this.isPlaying||!o||o.paused)){if(this.accumulator+=i*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?o.nextFrame(this):o.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var f=0;do this.forward?o.nextFrame(this):o.previousFrame(this),f++;while(this.isPlaying&&this.accumulator>this.nextTick&&f<60)}}},setCurrentFrame:function(h){var i=this.parent;return this.currentFrame=h,i.texture=h.frame.texture,i.frame=h.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),h.setAlpha&&(i.alpha=h.alpha),i.setSizeToFrame(),i._originComponent&&(h.frame.customPivot?i.setOrigin(h.frame.pivotX,h.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===h&&this.stop()),i},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(h){return this.anims?this.anims.get(h):null},exists:function(h){return this.anims?this.anims.has(h):!1},create:function(h){var i=h.key,o=!1;return i&&(o=this.get(i),o?console.warn("Animation key already exists: "+i):(o=new d(this,i,h),this.anims||(this.anims=new r),this.anims.set(i,o))),o},createFromAseprite:function(h,i){return this.animationManager.createFromAseprite(h,i,this.parent)},generateFrameNames:function(h,i){return this.animationManager.generateFrameNames(h,i)},generateFrameNumbers:function(h,i){return this.animationManager.generateFrameNumbers(h,i)},remove:function(h){var i=this.get(h);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(h)),i},destroy:function(){this.animationManager.off(n.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});p.exports=s},57090:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},25312:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationcomplete"},89580:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationcomplete-"},52860:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationrepeat"},63850:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationrestart"},99085:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationstart"},28087:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationstop"},1794:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationupdate"},52562:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pauseall"},57953:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},68339:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resumeall"},74943:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD_ANIMATION:t(57090),ANIMATION_COMPLETE:t(25312),ANIMATION_COMPLETE_KEY:t(89580),ANIMATION_REPEAT:t(52860),ANIMATION_RESTART:t(63850),ANIMATION_START:t(99085),ANIMATION_STOP:t(28087),ANIMATION_UPDATE:t(1794),PAUSE_ALL:t(52562),REMOVE_ANIMATION:t(57953),RESUME_ALL:t(68339)}},60421:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(90330),a=t(50792),r=t(24736),n=new d({initialize:function(){this.entries=new c,this.events=new a},add:function(e,s){return this.entries.set(e,s),this.events.emit(r.ADD,this,e,s),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var s=this.get(e);return s&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,s.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});p.exports=n},24047:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2161),c=t(83419),a=t(8443),r=new c({initialize:function(e){this.game=e,this.binary=new d,this.bitmapFont=new d,this.json=new d,this.physics=new d,this.shader=new d,this.audio=new d,this.video=new d,this.text=new d,this.html=new d,this.obj=new d,this.tilemap=new d,this.xml=new d,this.custom={},this.game.events.once(a.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new d),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},59261:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},24736:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(39506),r=t(50792),n=t(19715),e=t(87841),s=t(61340),h=t(80333),i=t(26099),o=new d({Extends:r,Mixins:[c.AlphaSingle,c.Visible],initialize:function(l,u,v,g){l===void 0&&(l=0),u===void 0&&(u=0),v===void 0&&(v=0),g===void 0&&(g=0),r.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=l,this._y=u,this._width=v,this._height=g,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new s,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(v/2,g/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,l){return f===void 0&&(f=.5),l===void 0&&(l=f),this.originX=f,this.originY=l,this},getScroll:function(f,l,u){u===void 0&&(u=new i);var v=this.width*.5,g=this.height*.5;return u.x=f-v,u.y=l-g,this.useBounds&&(u.x=this.clampX(u.x),u.y=this.clampY(u.y)),u},centerOnX:function(f){var l=this.width*.5;return this.midPoint.x=f,this.scrollX=f-l,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var l=this.height*.5;return this.midPoint.y=f,this.scrollY=f-l,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,l){return this.centerOnX(f),this.centerOnY(l),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,l=this.width*.5,u=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-l,this.scrollY=f.centerY-u}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var l=this.matrix.matrix,u=l[0],v=l[1],g=l[2],x=l[3],m=u*x-v*g;if(!m)return f;var y=l[4],T=l[5],E=this.scrollX,C=this.scrollY,A=this.width,P=this.height,M=this.y,F=M+P,L=this.x,D=L+A,I=this.culledObjects,U=f.length;m=1/m,I.length=0;for(var z=0;zL&&NM&&Xg&&(f=g),f},clampY:function(f){var l=this._bounds,u=this.displayHeight,v=l.y+(u-this.height)/2,g=Math.max(v,v+l.height-u);return fg&&(f=g),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=a(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=h(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,l,u,v,g){return g===void 0&&(g=!1),this._bounds.setTo(f,l,u,v),this.dirty=!0,this.useBounds=!0,g?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new e);var l=this._bounds;return f.setTo(l.x,l.y,l.width,l.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,l){return l===void 0&&(l=f),this.x=f,this.y=l,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f,l){l===void 0&&(l=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f,this.isSceneCamera=l;var u=f.sys;return this.sceneManager=u.game.scene,this.scaleManager=u.scale,this.cameraManager=u.cameras,this.updateSystem(),this},setScroll:function(f,l){return l===void 0&&(l=f),this.scrollX=f,this.scrollY=l,this},setSize:function(f,l){return l===void 0&&(l=f),this.width=f,this.height=l,this},setViewport:function(f,l,u,v){return this.x=f,this.y=l,this.width=u,this.height=v,this},setZoom:function(f,l){return f===void 0&&(f=1),l===void 0&&(l=f),f===0&&(f=.001),l===0&&(l=.001),this.zoomX=f,this.zoomY=l,this},setMask:function(f,l){return l===void 0&&(l=!0),this.mask=f,this._maskCamera=l?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},setIsSceneCamera:function(f){return this.isSceneCamera=f,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,l=this.sceneManager;f&&!this._customViewport?l.customViewports++:!f&&this._customViewport&&l.customViewports--,this.dirty=!0,this._customViewport=f}},destroy:function(){this.emit(n.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){f!==this._scrollX&&(this._scrollX=f,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(f){f!==this._scrollY&&(this._scrollY=f,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});p.exports=o},38058:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71911),c=t(67502),a=t(45319),r=t(83419),n=t(31401),e=t(20052),s=t(19715),h=t(28915),i=t(87841),o=t(26099),f=new r({Extends:d,Mixins:[n.PostPipeline],initialize:function(u,v,g,x){d.call(this,u,v,g,x),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new o(1,1),this.followOffset=new o,this.deadzone=null,this._follow=null},setDeadzone:function(l,u){if(l===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=l,this.deadzone.height=u):this.deadzone=new i(0,0,l,u),this._follow){var v=this.width/2,g=this.height/2,x=this._follow.x-this.followOffset.x,m=this._follow.y-this.followOffset.y;this.midPoint.set(x,m),this.scrollX=x-v,this.scrollY=m-g}c(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(l,u,v,g,x,m){return this.fadeEffect.start(!1,l,u,v,g,!0,x,m)},fadeOut:function(l,u,v,g,x,m){return this.fadeEffect.start(!0,l,u,v,g,!0,x,m)},fadeFrom:function(l,u,v,g,x,m,y){return this.fadeEffect.start(!1,l,u,v,g,x,m,y)},fade:function(l,u,v,g,x,m,y){return this.fadeEffect.start(!0,l,u,v,g,x,m,y)},flash:function(l,u,v,g,x,m,y){return this.flashEffect.start(l,u,v,g,x,m,y)},shake:function(l,u,v,g,x){return this.shakeEffect.start(l,u,v,g,x)},pan:function(l,u,v,g,x,m,y){return this.panEffect.start(l,u,v,g,x,m,y)},rotateTo:function(l,u,v,g,x,m,y){return this.rotateToEffect.start(l,u,v,g,x,m,y)},zoomTo:function(l,u,v,g,x,m){return this.zoomEffect.start(l,u,v,g,x,m)},preRender:function(){this.renderList.length=0;var l=this.width,u=this.height,v=l*.5,g=u*.5,x=this.zoom,m=this.matrix,y=l*this.originX,T=u*this.originY,E=this._follow,C=this.deadzone,A=this.scrollX,P=this.scrollY;C&&c(C,this.midPoint.x,this.midPoint.y);var M=!1;if(E&&!this.panEffect.isRunning){var F=this.lerp,L=E.x-this.followOffset.x,D=E.y-this.followOffset.y;C?(LC.right&&(A=h(A,A+(L-C.right),F.x)),DC.bottom&&(P=h(P,P+(D-C.bottom),F.y))):(A=h(A,L-y,F.x),P=h(P,D-T,F.y)),M=!0}this.useBounds&&(A=this.clampX(A),P=this.clampY(P)),this.scrollX=A,this.scrollY=P;var I=A+v,U=P+g;this.midPoint.set(I,U);var z=l/x,w=u/x,G=Math.floor(I-z/2),R=Math.floor(U-w/2);this.worldView.setTo(G,R,z,w),m.applyITRS(Math.floor(this.x+y),Math.floor(this.y+T),this.rotation,x,x),m.translate(-y,-T),this.shakeEffect.preRender(),M&&this.emit(s.FOLLOW_UPDATE,this,E)},setLerp:function(l,u){return l===void 0&&(l=1),u===void 0&&(u=l),this.lerp.set(l,u),this},setFollowOffset:function(l,u){return l===void 0&&(l=0),u===void 0&&(u=0),this.followOffset.set(l,u),this},startFollow:function(l,u,v,g,x,m){u===void 0&&(u=!1),v===void 0&&(v=1),g===void 0&&(g=v),x===void 0&&(x=0),m===void 0&&(m=x),this._follow=l,this.roundPixels=u,v=a(v,0,1),g=a(g,0,1),this.lerp.set(v,g),this.followOffset.set(x,m);var y=this.width/2,T=this.height/2,E=l.x-x,C=l.y-m;return this.midPoint.set(E,C),this.scrollX=E-y,this.scrollY=C-T,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(l,u){this.visible&&(this.rotateToEffect.update(l,u),this.panEffect.update(l,u),this.zoomEffect.update(l,u),this.shakeEffect.update(l,u),this.flashEffect.update(l,u),this.fadeEffect.update(l,u))},destroy:function(){this.resetFX(),d.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});p.exports=f},32743:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(38058),c=t(83419),a=t(95540),r=t(37277),n=t(37303),e=t(97480),s=t(44594),h=new c({initialize:function(o){this.scene=o,this.systems=o.sys,this.roundPixels=o.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,o.sys.events.once(s.BOOT,this.boot,this),o.sys.events.on(s.START,this.start,this)},boot:function(){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new d(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){if(!this.main){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0]}var o=this.systems.events;o.on(s.UPDATE,this.update,this),o.once(s.SHUTDOWN,this.shutdown,this)},add:function(i,o,f,l,u,v){i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=this.scene.sys.scale.width),l===void 0&&(l=this.scene.sys.scale.height),u===void 0&&(u=!1),v===void 0&&(v="");var g=new d(i,o,f,l);return g.setName(v),g.setScene(this.scene),g.setRoundPixels(this.roundPixels),g.id=this.getNextID(),this.cameras.push(g),u&&(this.main=g),g},addExisting:function(i,o){o===void 0&&(o=!1);var f=this.cameras.indexOf(i);return f===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),o&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,o=1,f=0;f<32;f++){for(var l=!1,u=0;u0){v.preRender();var g=this.getVisibleChildren(o.getChildren(),v);i.render(f,g,v)}}},getVisibleChildren:function(i,o){return i.filter(function(f){return f.willRender(o)})},resetAll:function(){for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,e,s,h,i,o,f,l){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=!1),f===void 0&&(f=null),l===void 0&&(l=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=s,this.green=h,this.blue=i,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=l;var u=n?a.FADE_OUT_START:a.FADE_IN_START;return this.camera.emit(u,this.camera,this,e,s,h,i),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(n,e,s,h,i,o,f){return n===void 0&&(n=250),e===void 0&&(e=255),s===void 0&&(s=255),h===void 0&&(h=255),i===void 0&&(i=!1),o===void 0&&(o=null),f===void 0&&(f=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=s,this.blue=h,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=f,this.camera.emit(a.FLASH_START,this.camera,this,n,e,s,h),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(62640),r=t(19715),n=t(26099),e=new c({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,h,i,o,f,l,u){i===void 0&&(i=1e3),o===void 0&&(o=a.Linear),f===void 0&&(f=!1),l===void 0&&(l=null),u===void 0&&(u=this.camera.scene);var v=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(v.scrollX,v.scrollY),this.destination.set(s,h),v.getScroll(s,h,this.current),typeof o=="string"&&a.hasOwnProperty(o)?this.ease=a[o]:typeof o=="function"&&(this.ease=o),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=u,this.camera.emit(r.PAN_START,this.camera,this,i,s,h)),v},update:function(s,h){if(this.isRunning){this._elapsed+=h;var i=d(this._elapsed/this.duration,0,1);this.progress=i;var o=this.camera;if(this._elapsed{/** + * @author Jason Nicholls + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */var d=t(45319),c=t(83419),a=t(19715),r=t(62640),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,s,h,i,o,f,l){h===void 0&&(h=1e3),i===void 0&&(i=r.Linear),o===void 0&&(o=!1),f===void 0&&(f=null),l===void 0&&(l=this.camera.scene),s===void 0&&(s=!1),this.shortestPath=s;var u=e;e<0?(u=-1*e,this.clockwise=!1):this.clockwise=!0;var v=360*Math.PI/180;u=u-Math.floor(u/v)*v;var g=this.camera;if(!o&&this.isRunning)return g;if(this.isRunning=!0,this.duration=h,this.progress=0,this.source=g.rotation,this.destination=u,typeof i=="string"&&r.hasOwnProperty(i)?this.ease=r[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=l,this.shortestPath){var x=0,m=0;this.destination>this.source?x=Math.abs(this.destination-this.source):x=Math.abs(this.destination+v)-this.source,this.source>this.destination?m=Math.abs(this.source-this.destination):m=Math.abs(this.source+v)-this.destination,xm&&(this.clockwise=!1)}return this.camera.emit(a.ROTATE_START,this.camera,this,h,u),g},update:function(e,s){if(this.isRunning){this._elapsed+=s;var h=d(this._elapsed/this.duration,0,1);this.progress=h;var i=this.camera;if(this._elapsed=v?f=Math.abs(u-v):f=Math.abs(u+l)-v;var g=0;this.clockwise?g=i.rotation+f*o:g=i.rotation-f*o,i.rotation=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,h,g)}else i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,h,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});p.exports=n},30330:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(19715),r=t(26099),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,s,h,i,o){return e===void 0&&(e=100),s===void 0&&(s=.05),h===void 0&&(h=!1),i===void 0&&(i=null),o===void 0&&(o=this.camera.scene),!h&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof s=="number"?this.intensity.set(s):this.intensity.set(s.x,s.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=o,this.camera.emit(a.SHAKE_START,this.camera,this,e,s),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,s){if(this.isRunning)if(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(62640),r=t(19715),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,s,h,i,o,f){s===void 0&&(s=1e3),h===void 0&&(h=a.Linear),i===void 0&&(i=!1),o===void 0&&(o=null),f===void 0&&(f=this.camera.scene);var l=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source=l.zoom,this.destination=e,typeof h=="string"&&a.hasOwnProperty(h)?this.ease=a[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=f,this.camera.emit(r.ZOOM_START,this.camera,this,s,e)),l},update:function(e,s){this.isRunning&&(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameradestroy"},32726:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeincomplete"},87807:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeinstart"},45917:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeoutcomplete"},95666:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeoutstart"},47056:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameraflashcomplete"},91261:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameraflashstart"},45047:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="followupdate"},81927:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerapancomplete"},74264:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerapanstart"},54419:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},79330:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},93183:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerarotatecomplete"},80112:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerarotatestart"},62252:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerashakecomplete"},86017:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerashakestart"},539:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerazoomcomplete"},51892:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerazoomstart"},19715:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DESTROY:t(16438),FADE_IN_COMPLETE:t(32726),FADE_IN_START:t(87807),FADE_OUT_COMPLETE:t(45917),FADE_OUT_START:t(95666),FLASH_COMPLETE:t(47056),FLASH_START:t(91261),FOLLOW_UPDATE:t(45047),PAN_COMPLETE:t(81927),PAN_START:t(74264),POST_RENDER:t(54419),PRE_RENDER:t(79330),ROTATE_COMPLETE:t(93183),ROTATE_START:t(80112),SHAKE_COMPLETE:t(62252),SHAKE_START:t(86017),ZOOM_COMPLETE:t(539),ZOOM_START:t(51892)}},87969:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(35154),a=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=c(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=c(n,"speed.x",0),this.speedY=c(n,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this.up&&this.up.isDown?n.scrollY-=this.speedY*r|0:this.down&&this.down.isDown&&(n.scrollY+=this.speedY*r|0),this.left&&this.left.isDown?n.scrollX-=this.speedX*r|0:this.right&&this.right.isDown&&(n.scrollX+=this.speedX*r|0),this.zoomIn&&this.zoomIn.isDown?(n.zoom-=this.zoomSpeed,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=a},58818:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(35154),a=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=c(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=c(n,"acceleration.x",0),this.accelY=c(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var s=c(n,"drag",null);typeof s=="number"?(this.dragX=s,this.dragY=s):(this.dragX=c(n,"drag.x",0),this.dragY=c(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var h=c(n,"maxSpeed",null);typeof h=="number"?(this.maxSpeedX=h,this.maxSpeedY=h):(this.maxSpeedX=c(n,"maxSpeed.x",0),this.maxSpeedY=c(n,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this._speedX>0?(this._speedX-=this.dragX*r,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*r,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*r,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*r,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(n.scrollX-=this._speedX*r|0),this._speedY!==0&&(n.scrollY-=this._speedY*r|0),this._zoom!==0&&(n.zoom+=this._zoom,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=a},38865:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={VERSION:"3.80.0",BlendModes:t(10312),ScaleModes:t(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};p.exports=d},69547:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(8054),a=t(42363),r=t(82264),n=t(95540),e=t(35154),s=t(41212),h=t(29747),i=t(75508),o=t(36060),f=t(80333),l=new d({initialize:function(v){v===void 0&&(v={});var g=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],x="#ffffff",m=e(v,"scale",null);this.width=e(m,"width",1024,v),this.height=e(m,"height",768,v),this.zoom=e(m,"zoom",1,v),this.parent=e(m,"parent",void 0,v),this.scaleMode=e(m,m?"mode":"scaleMode",0,v),this.expandParent=e(m,"expandParent",!0,v),this.autoRound=e(m,"autoRound",!1,v),this.autoCenter=e(m,"autoCenter",0,v),this.resizeInterval=e(m,"resizeInterval",500,v),this.fullscreenTarget=e(m,"fullscreenTarget",null,v),this.minWidth=e(m,"min.width",0,v),this.maxWidth=e(m,"max.width",0,v),this.minHeight=e(m,"min.height",0,v),this.maxHeight=e(m,"max.height",0,v),this.snapWidth=e(m,"snap.width",0,v),this.snapHeight=e(m,"snap.height",0,v),this.renderType=e(v,"type",c.AUTO),this.canvas=e(v,"canvas",null),this.context=e(v,"context",null),this.canvasStyle=e(v,"canvasStyle",null),this.customEnvironment=e(v,"customEnvironment",!1),this.sceneConfig=e(v,"scene",null),this.seed=e(v,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=e(v,"title",""),this.gameURL=e(v,"url","https://phaser.io"),this.gameVersion=e(v,"version",""),this.autoFocus=e(v,"autoFocus",!0),this.stableSort=e(v,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(v,"dom.createContainer",!1),this.domPointerEvents=e(v,"dom.pointerEvents","none"),this.inputKeyboard=e(v,"input.keyboard",!0),this.inputKeyboardEventTarget=e(v,"input.keyboard.target",window),this.inputKeyboardCapture=e(v,"input.keyboard.capture",[]),this.inputMouse=e(v,"input.mouse",!0),this.inputMouseEventTarget=e(v,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(v,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(v,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(v,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(v,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(v,"input.touch",r.input.touch),this.inputTouchEventTarget=e(v,"input.touch.target",null),this.inputTouchCapture=e(v,"input.touch.capture",!0),this.inputActivePointers=e(v,"input.activePointers",1),this.inputSmoothFactor=e(v,"input.smoothFactor",0),this.inputWindowEvents=e(v,"input.windowEvents",!0),this.inputGamepad=e(v,"input.gamepad",!1),this.inputGamepadEventTarget=e(v,"input.gamepad.target",window),this.disableContextMenu=e(v,"disableContextMenu",!1),this.audio=e(v,"audio",{}),this.hideBanner=e(v,"banner",null)===!1,this.hidePhaser=e(v,"banner.hidePhaser",!1),this.bannerTextColor=e(v,"banner.text",x),this.bannerBackgroundColor=e(v,"banner.background",g),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(v,"fps",null),this.disablePreFX=e(v,"disablePreFX",!1),this.disablePostFX=e(v,"disablePostFX",!1);var y=e(v,"render",null);this.pipeline=e(y,"pipeline",null,v),this.autoMobilePipeline=e(y,"autoMobilePipeline",!0,v),this.defaultPipeline=e(y,"defaultPipeline",o.MULTI_PIPELINE,v),this.antialias=e(y,"antialias",!0,v),this.antialiasGL=e(y,"antialiasGL",!0,v),this.mipmapFilter=e(y,"mipmapFilter","",v),this.desynchronized=e(y,"desynchronized",!1,v),this.roundPixels=e(y,"roundPixels",!0,v),this.pixelArt=e(y,"pixelArt",this.zoom!==1,v),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(y,"transparent",!1,v),this.clearBeforeRender=e(y,"clearBeforeRender",!0,v),this.preserveDrawingBuffer=e(y,"preserveDrawingBuffer",!1,v),this.premultipliedAlpha=e(y,"premultipliedAlpha",!0,v),this.failIfMajorPerformanceCaveat=e(y,"failIfMajorPerformanceCaveat",!1,v),this.powerPreference=e(y,"powerPreference","default",v),this.batchSize=e(y,"batchSize",4096,v),this.maxTextures=e(y,"maxTextures",-1,v),this.maxLights=e(y,"maxLights",10,v);var T=e(v,"backgroundColor",0);this.backgroundColor=f(T),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=e(v,"callbacks.preBoot",h),this.postBoot=e(v,"callbacks.postBoot",h),this.physics=e(v,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(v,"loader.baseURL",""),this.loaderPath=e(v,"loader.path",""),this.loaderMaxParallelDownloads=e(v,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(v,"loader.crossOrigin",void 0),this.loaderResponseType=e(v,"loader.responseType",""),this.loaderAsync=e(v,"loader.async",!0),this.loaderUser=e(v,"loader.user",""),this.loaderPassword=e(v,"loader.password",""),this.loaderTimeout=e(v,"loader.timeout",0),this.loaderWithCredentials=e(v,"loader.withCredentials",!1),this.loaderImageLoadType=e(v,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(v,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(v,"fx.glow.quality",.1),this.glowFXDistance=e(v,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var E=e(v,"plugins",null),C=a.DefaultScene;E&&(Array.isArray(E)?this.defaultPlugins=E:s(E)&&(this.installGlobalPlugins=n(E,"global",[]),this.installScenePlugins=n(E,"scene",[]),Array.isArray(E.default)?C=E.default:Array.isArray(E.defaultMerge)&&(C=C.concat(E.defaultMerge)))),this.defaultPlugins=C;var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(v,"images.default",A+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(v,"images.missing",A+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(v,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=c.WEBGL:window.FORCE_CANVAS&&(this.renderType=c.CANVAS))}});p.exports=l},86054:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20623),c=t(27919),a=t(8054),r=t(89357),n=function(e){var s=e.config;if((s.customEnvironment||s.canvas)&&s.renderType===a.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!s.customEnvironment&&!s.canvas&&s.renderType!==a.HEADLESS)if(s.renderType===a.AUTO&&(s.renderType=r.webGL?a.WEBGL:a.CANVAS),s.renderType===a.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(s.renderType===a.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+s.renderType);s.antialias||c.disableSmoothing();var h=e.scale.baseSize,i=h.width,o=h.height;if(s.canvas?(e.canvas=s.canvas,e.canvas.width=i,e.canvas.height=o):e.canvas=c.create(e,i,o,s.renderType),s.canvasStyle&&(e.canvas.style=s.canvasStyle),s.antialias||d.setCrisp(e.canvas),s.renderType!==a.HEADLESS){var f,l;f=t(68627),l=t(74797),s.renderType===a.WEBGL?e.renderer=new l(e):(e.renderer=new f(e),e.context=e.renderer.gameContext)}};p.exports=n},96391:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8054),c=function(a){var r=a.config;if(!r.hideBanner){var n="WebGL";r.renderType===d.CANVAS?n="Canvas":r.renderType===d.HEADLESS&&(n="Headless");var e=r.audio,s=a.device.audio,h;if(s.webAudio&&!e.disableWebAudio?h="Web Audio":e.noAudio||!s.webAudio&&!s.audioData?h="No Audio":h="HTML5 Audio",a.device.browser.ie)window.console&&console.log("Phaser v"+d.VERSION+" / https://phaser.io");else{var i="",o=[i];if(Array.isArray(r.bannerBackgroundColor)){var f;r.bannerBackgroundColor.forEach(function(u){i=i.concat("%c "),o.push("background: "+u),f=u}),o[o.length-1]="color: "+r.bannerTextColor+"; background: "+f}else i=i.concat("%c "),o.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);o.push("background: transparent"),r.gameTitle&&(i=i.concat(r.gameTitle),r.gameVersion&&(i=i.concat(" v"+r.gameVersion)),r.hidePhaser||(i=i.concat(" / ")));var l="";r.hidePhaser||(i=i.concat("Phaser v"+d.VERSION+l+" ("+n+" | "+h+")")),i=i.concat(" %c "+r.gameURL),o[0]=i,console.log.apply(console,o)}}};p.exports=c},50127:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40366),c=t(60848),a=t(24047),r=t(27919),n=t(83419),e=t(69547),s=t(83719),h=t(86054),i=t(45893),o=t(96391),f=t(82264),l=t(57264),u=t(50792),v=t(8443),g=t(7003),x=t(37277),m=t(77332),y=t(76531),T=t(60903),E=t(69442),C=t(17130),A=t(65898),P=t(51085),M=t(14747),F=new n({initialize:function(D){this.config=new e(D),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new u,this.anims=new c(this),this.textures=new C(this),this.cache=new a(this),this.registry=new i(this,new u),this.input=new g(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=f,this.scale=new y(this,this.config),this.sound=null,this.sound=M.create(this),this.loop=new A(this,this.config.fps),this.plugins=new m(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,l(this.boot.bind(this))},boot:function(){if(!x.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),h(this),s(this),o(this),d(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),P(this);var L=this.events;L.on(v.HIDDEN,this.onHidden,this),L.on(v.VISIBLE,this.onVisible,this),L.on(v.BLUR,this.onBlur,this),L.on(v.FOCUS,this.onFocus,this)},step:function(L,D){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var I=this.events;I.emit(v.PRE_STEP,L,D),I.emit(v.STEP,L,D),this.scene.update(L,D),I.emit(v.POST_STEP,L,D);var U=this.renderer;U.preRender(),I.emit(v.PRE_RENDER,U,L,D),this.scene.render(U),U.postRender(),I.emit(v.POST_RENDER,U,L,D)}},headlessStep:function(L,D){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var I=this.events;I.emit(v.PRE_STEP,L,D),I.emit(v.STEP,L,D),this.scene.update(L,D),I.emit(v.POST_STEP,L,D),this.scene.isProcessing=!1,I.emit(v.PRE_RENDER,null,L,D),I.emit(v.POST_RENDER,null,L,D)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var L=this.isPaused;this.isPaused=!0,L||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},resume:function(){var L=this.isPaused;this.isPaused=!1,L&&this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(L,D){D===void 0&&(D=!1),this.pendingDestroy=!0,this.removeCanvas=L,this.noReturn=D},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});p.exports=F},65898:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(35154),a=t(29747),r=t(43092),n=new d({initialize:function(s,h){this.game=s,this.raf=new r,this.started=!1,this.running=!1,this.minFps=c(h,"min",5),this.targetFps=c(h,"target",60),this.fpsLimit=c(h,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=a,this.forceSetTimeOut=c(h,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=c(h,"deltaHistory",10),this.panicMax=c(h,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=c(h,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var s=0;s0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=h[s],e=Math.min(e,this._min)),h[s]=e,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var o=0,f=0;f=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(e,this.delta),this.delta=0),this.lastTime=e,this.frame++},step:function(e){this.now=e;var s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,s),this.lastTime=e,this.frame++},tick:function(){var e=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(e):this.step(e)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){e===void 0&&(e=!1);var s=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+s));var h=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(h,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=s+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});p.exports=n},51085:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8443),c=function(a){var r,n=a.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(h){document[h+"Hidden"]!==void 0&&(document.hidden=function(){return document[h+"Hidden"]},r=h+"visibilitychange")})}var s=function(h){document.hidden||h.type==="pause"?n.emit(d.HIDDEN):n.emit(d.VISIBLE)};r&&document.addEventListener(r,s,!1),window.onblur=function(){n.emit(d.BLUR)},window.onfocus=function(){n.emit(d.FOCUS)},window.focus&&a.config.autoFocus&&window.focus()};p.exports=c},97217:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="blur"},47548:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},19814:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="contextlost"},68446:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},41700:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="focus"},25432:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="hidden"},65942:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},59211:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},47789:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="poststep"},39066:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},460:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prestep"},16175:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},42331:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},11966:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="step"},32969:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="systemready"},94830:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="visible"},8443:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BLUR:t(97217),BOOT:t(47548),CONTEXT_LOST:t(19814),DESTROY:t(68446),FOCUS:t(41700),HIDDEN:t(25432),PAUSE:t(65942),POST_RENDER:t(59211),POST_STEP:t(47789),PRE_RENDER:t(39066),PRE_STEP:t(460),READY:t(16175),RESUME:t(42331),STEP:t(11966),SYSTEM_READY:t(32969),VISIBLE:t(94830)}},42857:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(5290),c=t(27919),a=t(35154),r=function(n){var e=a(n,"data",[]),s=a(n,"canvas",null),h=a(n,"palette",d),i=a(n,"pixelWidth",1),o=a(n,"pixelHeight",i),f=a(n,"resizeCanvas",!0),l=a(n,"clearCanvas",!0),u=a(n,"preRender",null),v=a(n,"postRender",null),g=Math.floor(Math.abs(e[0].length*i)),x=Math.floor(Math.abs(e.length*o));s||(s=c.create2D(this,g,x),f=!1,l=!1),f&&(s.width=g,s.height=x);var m=s.getContext("2d",{willReadFrequently:!0});l&&m.clearRect(0,0,g,x),u&&u(s,m);for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(36316),a=t(80021),r=t(26099),n=new d({Extends:a,initialize:function(s,h,i,o){a.call(this,"CubicBezierCurve"),Array.isArray(s)&&(o=new r(s[6],s[7]),i=new r(s[4],s[5]),h=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=h,this.p2=i,this.p3=o},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var h=this.p0,i=this.p1,o=this.p2,f=this.p3;return s.set(c(e,h.x,i.x,o.x,f.x),c(e,h.y,i.y,o.y,f.y))},draw:function(e,s){s===void 0&&(s=32);var h=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(19217),a=t(87841),r=t(26099),n=new d({initialize:function(s){this.type=s,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new r,this._tmpVec2B=new r},draw:function(e,s){return s===void 0&&(s=32),e.strokePoints(this.getPoints(s))},getBounds:function(e,s){e||(e=new a),s===void 0&&(s=16);var h=this.getLength();s>h&&(s=h/2);var i=Math.max(1,Math.round(h/s));return c(this.getSpacedPoints(i),e)},getDistancePoints:function(e){var s=this.getLength(),h=Math.max(1,s/e);return this.getSpacedPoints(h)},getEndPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var s=[],h,i=this.getPoint(0,this._tmpVec2A),o=0;s.push(0);for(var f=1;f<=e;f++)h=this.getPoint(f/e,this._tmpVec2B),o+=h.distance(i),s.push(o),i.copy(h);return this.cacheArcLengths=s,s},getPointAt:function(e,s){var h=this.getUtoTmapping(e);return this.getPoint(h,s)},getPoints:function(e,s,h){h===void 0&&(h=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++)h.push(this.getPoint(i/e));return h},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,s,h){h===void 0&&(h=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++){var o=this.getUtoTmapping(i/e,null,e);h.push(this.getPoint(o))}return h},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,s){s===void 0&&(s=new r);var h=1e-4,i=e-h,o=e+h;return i<0&&(i=0),o>1&&(o=1),this.getPoint(i,this._tmpVec2A),this.getPoint(o,s),s.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,s){var h=this.getUtoTmapping(e);return this.getTangent(h,s)},getTFromDistance:function(e,s){return e<=0?0:this.getUtoTmapping(0,e,s)},getUtoTmapping:function(e,s,h){var i=this.getLengths(h),o=0,f=i.length,l;s?l=Math.min(s,i[f-1]):l=e*i[f-1];for(var u=0,v=f-1,g;u<=v;)if(o=Math.floor(u+(v-u)/2),g=i[o]-l,g<0)u=o+1;else if(g>0)v=o-1;else{v=o;break}if(o=v,i[o]===l)return o/(f-1);var x=i[o],m=i[o+1],y=m-x,T=(l-x)/y;return(o+T)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});p.exports=n},73825:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(80021),a=t(39506),r=t(35154),n=t(43396),e=t(26099),s=new d({Extends:c,initialize:function(i,o,f,l,u,v,g,x){if(typeof i=="object"){var m=i;i=r(m,"x",0),o=r(m,"y",0),f=r(m,"xRadius",0),l=r(m,"yRadius",f),u=r(m,"startAngle",0),v=r(m,"endAngle",360),g=r(m,"clockwise",!1),x=r(m,"rotation",0)}else l===void 0&&(l=f),u===void 0&&(u=0),v===void 0&&(v=360),g===void 0&&(g=!1),x===void 0&&(x=0);c.call(this,"EllipseCurve"),this.p0=new e(i,o),this._xRadius=f,this._yRadius=l,this._startAngle=a(u),this._endAngle=a(v),this._clockwise=g,this._rotation=a(x)},getStartPoint:function(h){return h===void 0&&(h=new e),this.getPoint(0,h)},getResolution:function(h){return h*2},getPoint:function(h,i){i===void 0&&(i=new e);for(var o=Math.PI*2,f=this._endAngle-this._startAngle,l=Math.abs(f)o;)f-=o;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(80021),a=t(19217),r=t(87841),n=t(26099),e=new d({Extends:c,initialize:function(h,i){c.call(this,"LineCurve"),Array.isArray(h)&&(i=new n(h[2],h[3]),h=new n(h[0],h[1])),this.p0=h,this.p1=i,this.arcLengthDivisions=1},getBounds:function(s){return s===void 0&&(s=new r),a([this.p0,this.p1],s)},getStartPoint:function(s){return s===void 0&&(s=new n),s.copy(this.p0)},getResolution:function(s){return s===void 0&&(s=1),s},getPoint:function(s,h){return h===void 0&&(h=new n),s===1?h.copy(this.p1):(h.copy(this.p1).subtract(this.p0).scale(s).add(this.p0),h)},getPointAt:function(s,h){return this.getPoint(s,h)},getTangent:function(s,h){return h===void 0&&(h=new n),h.copy(this.p1).subtract(this.p0).normalize(),h},getUtoTmapping:function(s,h,i){var o;if(h){var f=this.getLengths(i),l=f[f.length-1],u=Math.min(h,l);o=u/l}else o=s;return o},draw:function(s){return s.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),s},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(s){var h=s.points,i=new n(h[0],h[1]),o=new n(h[2],h[3]);return new e(i,o)},p.exports=e},14744:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(80021),a=t(32112),r=t(26099),n=new d({Extends:c,initialize:function(s,h,i){c.call(this,"QuadraticBezierCurve"),Array.isArray(s)&&(i=new r(s[4],s[5]),h=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=h,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var h=this.p0,i=this.p1,o=this.p2;return s.set(a(e,h.x,i.x,o.x),a(e,h.y,i.y,o.y))},draw:function(e,s){s===void 0&&(s=32);var h=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87842),c=t(83419),a=t(80021),r=t(26099),n=new c({Extends:a,initialize:function(s){s===void 0&&(s=[]),a.call(this,"SplineCurve"),this.points=[],this.addPoints(s)},addPoints:function(e){for(var s=0;sh.length-2?h.length-1:o+1],g=h[o>h.length-3?h.length-1:o+2];return s.set(d(f,l.x,u.x,v.x,g.x),d(f,l.y,u.y,v.y,g.y))},toJSON:function(){for(var e=[],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Path:t(46669),MoveTo:t(68618),CubicBezier:t(46728),Curve:t(80021),Ellipse:t(73825),Line:t(33951),QuadraticBezier:t(14744),Spline:t(42534)}},68618:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(26099),a=new d({initialize:function(n,e){this.active=!1,this.p0=new c(n,e)},getPoint:function(r,n){return n===void 0&&(n=new c),n.copy(this.p0)},getPointAt:function(r,n){return this.getPoint(r,n)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});p.exports=a},46669:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(46728),a=t(73825),r=t(39429),n=t(33951),e=t(68618),s=t(14744),h=t(87841),i=t(42534),o=t(26099),f=t(36383),l=new d({initialize:function(v,g){v===void 0&&(v=0),g===void 0&&(g=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new o,this._tmpVec2A=new o,this._tmpVec2B=new o,typeof v=="object"?this.fromJSON(v):this.startPoint.set(v,g)},add:function(u){return this.curves.push(u),this},circleTo:function(u,v,g){return v===void 0&&(v=!1),this.ellipseTo(u,u,0,360,v,g)},closePath:function(){var u=this.curves[0].getPoint(0),v=this.curves[this.curves.length-1].getPoint(1);return u.equals(v)||this.curves.push(new n(v,u)),this},cubicBezierTo:function(u,v,g,x,m,y){var T=this.getEndPoint(),E,C,A;return u instanceof o?(E=u,C=v,A=g):(E=new o(g,x),C=new o(m,y),A=new o(u,v)),this.add(new c(T,E,C,A))},quadraticBezierTo:function(u,v,g,x){var m=this.getEndPoint(),y,T;return u instanceof o?(y=u,T=v):(y=new o(g,x),T=new o(u,v)),this.add(new s(m,y,T))},draw:function(u,v){for(var g=0;g=v)return this.curves[x];x++}return null},getEndPoint:function(u){return u===void 0&&(u=new o),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,u):u.copy(this.startPoint),u},getLength:function(){var u=this.getCurveLengths();return u[u.length-1]},getPoint:function(u,v){v===void 0&&(v=new o);for(var g=u*this.getLength(),x=this.getCurveLengths(),m=0;m=g){var y=x[m]-g,T=this.curves[m],E=T.getLength(),C=E===0?0:1-y/E;return T.getPointAt(C,v)}m++}return null},getPoints:function(u,v){!u&&!v&&(u=this.defaultDivisions);for(var g=[],x,m=0;m1&&!g[g.length-1].equals(g[0])&&g.push(g[0]),g},getRandomPoint:function(u){return u===void 0&&(u=new o),this.getPoint(Math.random(),u)},getSpacedPoints:function(u){u===void 0&&(u=40);for(var v=[],g=0;g<=u;g++)v.push(this.getPoint(g/u));return this.autoClose&&v.push(v[0]),v},getStartPoint:function(u){return u===void 0&&(u=new o),u.copy(this.startPoint)},getTangent:function(u,v){v===void 0&&(v=new o);for(var g=u*this.getLength(),x=this.getCurveLengths(),m=0;m=g){var y=x[m]-g,T=this.curves[m],E=T.getLength(),C=E===0?0:1-y/E;return T.getTangentAt(C,v)}m++}return null},lineTo:function(u,v){u instanceof o?this._tmpVec2B.copy(u):typeof u=="object"?this._tmpVec2B.setFromObject(u):this._tmpVec2B.set(u,v);var g=this.getEndPoint(this._tmpVec2A);return this.add(new n([g.x,g.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(u){return u.unshift(this.getEndPoint()),this.add(new i(u))},moveTo:function(u,v){return u instanceof o?this.add(new e(u.x,u.y)):this.add(new e(u,v))},toJSON:function(){for(var u=[],v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(24882),a=new d({initialize:function(n,e){this.parent=n,this.events=e,e||(this.events=n.events?n.events:n),this.list={},this.values={},this._frozen=!1,!n.hasOwnProperty("sys")&&this.events&&this.events.once(c.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(45893),a=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this,s,s.sys.events),this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){c.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});a.register("DataManagerPlugin",n,"data"),p.exports=n},10700:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="changedata"},93608:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="changedata-"},60883:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},69780:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedata"},22166:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="setdata"},24882:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84148),c={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function a(){if(typeof importScripts=="function")return c;c.audioData=!!window.Audio,c.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(i,o){var f=r.canPlayType("audio/"+i).replace(/^no$/,"");return o?!!(f||r.canPlayType("audio/"+o).replace(/^no$/,"")):!!f};if(c.ogg=e('ogg; codecs="vorbis"'),c.opus=e('ogg; codecs="opus"',"opus"),c.mp3=e("mpeg"),c.wav=e("wav"),c.m4a=e("x-m4a"),c.aac=e("aac"),c.flac=e("flac","x-flac"),c.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(d.edge)c.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),h=parseInt(RegExp.$2,10);(s===10&&h>=11||s>10)&&(c.dolby=!0)}}}}catch{}return c}p.exports=a()},84148:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25892),c={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function a(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(c.edge=!0,c.es2019=!0):/OPR/.test(r)?(c.opera=!0,c.es2019=!0):/Chrome\/(\d+)/.test(r)&&!d.windowsPhone?(c.chrome=!0,c.chromeVersion=parseInt(RegExp.$1,10),c.es2019=c.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(c.firefox=!0,c.firefoxVersion=parseInt(RegExp.$1,10),c.es2019=c.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&d.iOS?(c.mobileSafari=!0,c.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(c.ie=!0,c.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!d.windowsPhone?(c.safari=!0,c.safariVersion=parseInt(RegExp.$1,10),c.es2019=c.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(c.ie=!0,c.trident=!0,c.tridentVersion=parseInt(RegExp.$1,10),c.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(c.silk=!0),c}p.exports=a()},89289:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c={supportInverseAlpha:!1,supportNewBlendModes:!1};function a(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",h=new Image;return h.onload=function(){var i=new Image;i.onload=function(){var o=d.create2D(i,6),f=o.getContext("2d",{willReadFrequently:!0});if(f.globalCompositeOperation="multiply",f.drawImage(h,0,0),f.drawImage(i,2,0),!f.getImageData(2,0,1,1))return!1;var l=f.getImageData(2,0,1,1).data;d.remove(i),c.supportNewBlendModes=l[0]===255&&l[1]===0&&l[2]===0},i.src=e+"/wCKxvRF"+s},h.src=e+"AP804Oa6"+s,!1}function r(){var e=d.create2D(this,2),s=e.getContext("2d",{willReadFrequently:!0});s.fillStyle="rgba(10, 20, 30, 0.5)",s.fillRect(0,0,1,1);var h=s.getImageData(0,0,1,1);if(h===null)return!1;s.putImageData(h,1,0);var i=s.getImageData(1,0,1,1),o=i.data[0]===h.data[0]&&i.data[1]===h.data[1]&&i.data[2]===h.data[2]&&i.data[3]===h.data[3];return d.remove(this),o}function n(){return typeof importScripts!="function"&&document!==void 0&&(c.supportNewBlendModes=a(),c.supportInverseAlpha=r()),c}p.exports=n()},89357:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25892),c=t(84148),a=t(27919),r={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function n(){var s=new ArrayBuffer(4),h=new Uint8Array(s),i=new Uint32Array(s);return h[0]=161,h[1]=178,h[2]=195,h[3]=212,i[0]===3569595041?!0:i[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return r;r.canvas=!!window.CanvasRenderingContext2D;try{r.localStorage=!!localStorage.getItem}catch{r.localStorage=!1}r.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,r.fileSystem=!!window.requestFileSystem;var s=!1,h=function(){if(window.WebGLRenderingContext)try{var i=a.createWebGL(this),o=i.getContext("webgl")||i.getContext("experimental-webgl"),f=a.create2D(this),l=f.getContext("2d",{willReadFrequently:!0}),u=l.createImageData(1,1);return s=u.data instanceof Uint8ClampedArray,a.remove(i),a.remove(f),!!o}catch{return!1}return!1};return r.webGL=h(),r.worker=!!window.Worker,r.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,r.getUserMedia=r.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,c.firefox&&c.firefoxVersion<21&&(r.getUserMedia=!1),!d.iOS&&(c.ie||c.firefox||c.chrome)&&(r.canvasBitBltShift=!0),(c.safari||c.mobileSafari)&&(r.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(r.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(r.littleEndian=n()),r.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&r.littleEndian!==null&&s,r}p.exports=e()},91639:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return S;var d,c="Fullscreen",a="FullScreen",r=["request"+c,"request"+a,"webkitRequest"+c,"webkitRequest"+a,"msRequest"+c,"msRequest"+a,"mozRequest"+a,"mozRequest"+c];for(d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84148),c={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function a(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(c.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(c.mspointer=!0),navigator.getGamepads&&(c.gamepads=!0),"onwheel"in window||d.ie&&"WheelEvent"in window?c.wheelEvent="wheel":"onmousewheel"in window?c.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(c.wheelEvent="DOMMouseScroll")),c}p.exports=a()},25892:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return S;var d=navigator.userAgent;/Windows/.test(d)?S.windows=!0:/Mac OS/.test(d)&&!/like Mac OS/.test(d)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(S.iOS=!0,S.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),S.iOSVersion=parseInt(RegExp.$1,10)):S.macOS=!0:/Android/.test(d)?S.android=!0:/Linux/.test(d)?S.linux=!0:/iP[ao]d|iPhone/i.test(d)?(S.iOS=!0,navigator.appVersion.match(/OS (\d+)/),S.iOSVersion=parseInt(RegExp.$1,10),S.iPhone=d.toLowerCase().indexOf("iphone")!==-1,S.iPad=d.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(d)||/\bKF[A-Z][A-Z]+/.test(d)||/Silk.*Mobile Safari/.test(d)?S.kindle=!0:/CrOS/.test(d)&&(S.chromeOS=!0),(/Windows Phone/i.test(d)||/IEMobile/i.test(d))&&(S.android=!1,S.iOS=!1,S.macOS=!1,S.windows=!0,S.windowsPhone=!0);var c=/Silk/.test(d);return(S.windows||S.macOS||S.linux&&!c||S.chromeOS)&&(S.desktop=!0),(S.windowsPhone||/Windows NT/i.test(d)&&/Touch/i.test(d))&&(S.desktop=!1),navigator.standalone&&(S.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(S.cordova=!0),window.ejecta!==void 0&&(S.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(S.node=!0),S.node&&typeof process.versions=="object"&&(S.nodeWebkit=!!process.versions["node-webkit"],S.electron=!!process.versions.electron),/Crosswalk/.test(d)&&(S.crosswalk=!0),S.pixelRatio=window.devicePixelRatio||1,S}p.exports=t()},43267:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function a(){if(typeof importScripts=="function")return c;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(c.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(c.h264=!0,c.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(c.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(c.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(c.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(c.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),c.getVideoURL=function(s){Array.isArray(s)||(s=[s]);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={os:t(25892),browser:t(84148),features:t(89357),input:t(31784),audio:t(7098),video:t(43267),fullscreen:t(91639),canvasFeatures:t(89289)}},89422:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=new Float32Array(20),a=new d({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(r){return this._matrix.set(r),this._dirty=!0,this},reset:function(){var r=this._matrix;return r.fill(0),r[0]=1,r[6]=1,r[12]=1,r[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var r=this._data;return this._dirty&&(r.set(this._matrix),r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,this._dirty=!1),r},brightness:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],n)},saturate:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r*2/3+1,s=(e-1)*-.5;return this.multiply([e,s,s,0,0,s,e,s,0,0,s,s,e,0,0,0,0,0,1,0],n)},desaturate:function(r){return r===void 0&&(r=!1),this.saturate(-1,r)},hue:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1),r=r/180*Math.PI;var e=Math.cos(r),s=Math.sin(r),h=.213,i=.715,o=.072;return this.multiply([h+e*(1-h)+s*-h,i+e*-i+s*-i,o+e*-o+s*(1-o),0,0,h+e*-h+s*.143,i+e*(1-i)+s*.14,o+e*-o+s*-.283,0,0,h+e*-h+s*-(1-h),i+e*-i+s*i,o+e*(1-o)+s*o,0,0,0,0,0,1,0],n)},grayscale:function(r,n){return r===void 0&&(r=1),n===void 0&&(n=!1),this.saturate(-r,n)},blackWhite:function(r){return r===void 0&&(r=!1),this.multiply(a.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,s=-.5*(e-1);return this.multiply([e,0,0,0,s,0,e,0,0,s,0,0,e,0,s,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(a.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(a.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(a.SEPIA,r)},night:function(r,n){return r===void 0&&(r=.1),n===void 0&&(n=!1),this.multiply([r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0],n)},lsd:function(r){return r===void 0&&(r=!1),this.multiply(a.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(a.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(a.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(a.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(a.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(a.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(a.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,s=c;return s.set(e),e.set([s[0]*r[0]+s[1]*r[5]+s[2]*r[10]+s[3]*r[15],s[0]*r[1]+s[1]*r[6]+s[2]*r[11]+s[3]*r[16],s[0]*r[2]+s[1]*r[7]+s[2]*r[12]+s[3]*r[17],s[0]*r[3]+s[1]*r[8]+s[2]*r[13]+s[3]*r[18],s[0]*r[4]+s[1]*r[9]+s[2]*r[14]+s[3]*r[19]+s[4],s[5]*r[0]+s[6]*r[5]+s[7]*r[10]+s[8]*r[15],s[5]*r[1]+s[6]*r[6]+s[7]*r[11]+s[8]*r[16],s[5]*r[2]+s[6]*r[7]+s[7]*r[12]+s[8]*r[17],s[5]*r[3]+s[6]*r[8]+s[7]*r[13]+s[8]*r[18],s[5]*r[4]+s[6]*r[9]+s[7]*r[14]+s[8]*r[19]+s[9],s[10]*r[0]+s[11]*r[5]+s[12]*r[10]+s[13]*r[15],s[10]*r[1]+s[11]*r[6]+s[12]*r[11]+s[13]*r[16],s[10]*r[2]+s[11]*r[7]+s[12]*r[12]+s[13]*r[17],s[10]*r[3]+s[11]*r[8]+s[12]*r[13]+s[13]*r[18],s[10]*r[4]+s[11]*r[9]+s[12]*r[14]+s[13]*r[19]+s[14],s[15]*r[0]+s[16]*r[5]+s[17]*r[10]+s[18]*r[15],s[15]*r[1]+s[16]*r[6]+s[17]*r[11]+s[18]*r[16],s[15]*r[2]+s[16]*r[7]+s[17]*r[12]+s[18]*r[17],s[15]*r[3]+s[16]*r[8]+s[17]*r[13]+s[18]*r[18],s[15]*r[4]+s[16]*r[9]+s[17]*r[14]+s[18]*r[19]+s[19]]),this._dirty=!0,this}});a.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],a.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],a.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],a.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],a.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],a.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],a.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],a.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],a.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],a.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],a.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],p.exports=a},51767:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(29747),a=new d({initialize:function(n,e,s){this._rgb=[0,0,0],this.onChangeCallback=c,this.dirty=!1,this.set(n,e,s)},set:function(r,n,e){return r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=0),this._rgb=[r,n,e],this.onChange(),this},equals:function(r,n,e){var s=this._rgb;return s[0]===r&&s[1]===n&&s[2]===e},onChange:function(){this.dirty=!0;var r=this._rgb;this.onChangeCallback.call(this,r[0],r[1],r[2])},r:{get:function(){return this._rgb[0]},set:function(r){this._rgb[0]=r,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(r){this._rgb[1]=r,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(r){this._rgb[2]=r,this.onChange()}},destroy:function(){this.onChangeCallback=null}});p.exports=a},60461:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};p.exports=S},54312:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(35893),a=t(86327),r=t(88417),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)+h),a(e,d(s)+i),e};p.exports=n},46768:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(26541),a=t(86327),r=t(385),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)-h),a(e,d(s)+i),e};p.exports=n},35827:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(54380),a=t(86327),r=t(40136),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)+h),a(e,d(s)+i),e};p.exports=n},46871:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66786),c=t(35893),a=t(7702),r=function(n,e,s,h){return s===void 0&&(s=0),h===void 0&&(h=0),d(n,c(e)+s,a(e)+h),n};p.exports=r},5198:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7702),c=t(26541),a=t(20786),r=t(385),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)-h),a(e,d(s)+i),e};p.exports=n},11879:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(54312),c[d.BOTTOM_LEFT]=t(46768),c[d.BOTTOM_RIGHT]=t(35827),c[d.CENTER]=t(46871),c[d.LEFT_CENTER]=t(5198),c[d.RIGHT_CENTER]=t(80503),c[d.TOP_CENTER]=t(89698),c[d.TOP_LEFT]=t(922),c[d.TOP_RIGHT]=t(21373),c[d.LEFT_BOTTOM]=c[d.BOTTOM_LEFT],c[d.LEFT_TOP]=c[d.TOP_LEFT],c[d.RIGHT_BOTTOM]=c[d.BOTTOM_RIGHT],c[d.RIGHT_TOP]=c[d.TOP_RIGHT];var a=function(r,n,e,s,h){return c[e](r,n,s,h)};p.exports=a},80503:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7702),c=t(54380),a=t(20786),r=t(40136),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)+h),a(e,d(s)+i),e};p.exports=n},89698:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35893),c=t(17717),a=t(88417),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,d(s)+h),r(e,c(s)-i),e};p.exports=n},922:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26541),c=t(17717),a=t(385),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,d(s)-h),r(e,c(s)-i),e};p.exports=n},21373:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(54380),c=t(17717),a=t(40136),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,d(s)+h),r(e,c(s)-i),e};p.exports=n},91660:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BottomCenter:t(54312),BottomLeft:t(46768),BottomRight:t(35827),Center:t(46871),LeftCenter:t(5198),QuickSet:t(11879),RightCenter:t(80503),TopCenter:t(89698),TopLeft:t(922),TopRight:t(21373)}},71926:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60461),c=t(79291),a={In:t(91660),To:t(16694)};a=c(!1,a,d),p.exports=a},21578:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(35893),a=t(88417),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,c(s)+h),r(e,d(s)+i),e};p.exports=n},10210:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(26541),a=t(385),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,c(s)-h),r(e,d(s)+i),e};p.exports=n},82341:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(54380),a=t(40136),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,c(s)+h),r(e,d(s)+i),e};p.exports=n},87958:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(26541),a=t(86327),r=t(40136),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)-h),a(e,d(s)+i),e};p.exports=n},40080:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7702),c=t(26541),a=t(20786),r=t(40136),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)-h),a(e,d(s)+i),e};p.exports=n},88466:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26541),c=t(17717),a=t(40136),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,d(s)-h),r(e,c(s)-i),e};p.exports=n},38829:(p,S,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(21578),c[d.BOTTOM_LEFT]=t(10210),c[d.BOTTOM_RIGHT]=t(82341),c[d.LEFT_BOTTOM]=t(87958),c[d.LEFT_CENTER]=t(40080),c[d.LEFT_TOP]=t(88466),c[d.RIGHT_BOTTOM]=t(19211),c[d.RIGHT_CENTER]=t(34609),c[d.RIGHT_TOP]=t(48741),c[d.TOP_CENTER]=t(49440),c[d.TOP_LEFT]=t(81288),c[d.TOP_RIGHT]=t(61323);var a=function(r,n,e,s,h){return c[e](r,n,s,h)};p.exports=a},19211:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(54380),a=t(86327),r=t(385),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)+h),a(e,d(s)+i),e};p.exports=n},34609:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7702),c=t(54380),a=t(20786),r=t(385),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,c(s)+h),a(e,d(s)+i),e};p.exports=n},48741:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(54380),c=t(17717),a=t(385),r=t(66737),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,d(s)+h),r(e,c(s)-i),e};p.exports=n},49440:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35893),c=t(17717),a=t(86327),r=t(88417),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,d(s)+h),a(e,c(s)-i),e};p.exports=n},81288:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26541),c=t(17717),a=t(86327),r=t(385),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,d(s)-h),a(e,c(s)-i),e};p.exports=n},61323:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(54380),c=t(17717),a=t(86327),r=t(40136),n=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),r(e,d(s)+h),a(e,c(s)-i),e};p.exports=n},16694:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BottomCenter:t(21578),BottomLeft:t(10210),BottomRight:t(82341),LeftBottom:t(87958),LeftCenter:t(40080),LeftTop:t(88466),QuickSet:t(38829),RightBottom:t(19211),RightCenter:t(34609),RightTop:t(48741),TopCenter:t(49440),TopLeft:t(81288),TopRight:t(61323)}},66786:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88417),c=t(20786),a=function(r,n,e){return d(r,n),c(r,e)};p.exports=a},62235:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.y+t.height-t.height*t.originY};p.exports=S},72873:(p,S,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62235),c=t(26541),a=t(54380),r=t(17717),n=t(87841),e=function(s,h){h===void 0&&(h=new n);var i=c(s),o=r(s);return h.x=i,h.y=o,h.width=a(s)-i,h.height=d(s)-o,h};p.exports=e},35893:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x-t.width*t.originX+t.width*.5};p.exports=S},7702:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.y-t.height*t.originY+t.height*.5};p.exports=S},26541:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x-t.width*t.originX};p.exports=S},87431:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.width*t.originX};p.exports=S},46928:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.height*t.originY};p.exports=S},54380:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x+t.width-t.width*t.originX};p.exports=S},17717:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.y-t.height*t.originY};p.exports=S},86327:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.y=d-t.height+t.height*t.originY,t};p.exports=S},88417:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.width*t.originX;return t.x=d+c-t.width*.5,t};p.exports=S},20786:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.height*t.originY;return t.y=d+c-t.height*.5,t};p.exports=S},385:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x=d+t.width*t.originX,t};p.exports=S},40136:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x=d-t.width+t.width*t.originX,t};p.exports=S},66737:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.y=d+t.height*t.originY,t};p.exports=S},58724:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CenterOn:t(66786),GetBottom:t(62235),GetBounds:t(72873),GetCenterX:t(35893),GetCenterY:t(7702),GetLeft:t(26541),GetOffsetX:t(87431),GetOffsetY:t(46928),GetRight:t(54380),GetTop:t(17717),SetBottom:t(86327),SetCenterX:t(88417),SetCenterY:t(20786),SetLeft:t(385),SetRight:t(40136),SetTop:t(66737)}},20623:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setCrisp:function(t){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.forEach(function(c){t.style["image-rendering"]=c}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};p.exports=S},27919:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8054),c=t(68703),a=[],r=!1,n=function(){var e=function(g,x,m,y,T){x===void 0&&(x=1),m===void 0&&(m=1),y===void 0&&(y=d.CANVAS),T===void 0&&(T=!1);var E,C=i(y);return C===null?(C={parent:g,canvas:document.createElement("canvas"),type:y},y===d.CANVAS&&a.push(C),E=C.canvas):(C.parent=g,E=C.canvas),T&&(C.parent=E),E.width=x,E.height=m,r&&y===d.CANVAS&&c.disable(E.getContext("2d",{willReadFrequently:!1})),E},s=function(g,x,m){return e(g,x,m,d.CANVAS)},h=function(g,x,m){return e(g,x,m,d.WEBGL)},i=function(g){if(g===void 0&&(g=d.CANVAS),g===d.WEBGL)return null;for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S="",t=function(){var d=function(n){for(var e=["i","webkitI","msI","mozI","oI"],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d="none"),t.style.msTouchAction=d,t.style["ms-touch-action"]=d,t.style["touch-action"]=d,t};p.exports=S},91610:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d="none");var c=["-webkit-","-khtml-","-moz-","-ms-",""];return c.forEach(function(a){t.style[a+"user-select"]=d}),t.style["-webkit-touch-callout"]=d,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};p.exports=S},26253:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(37589),a=t(1e3),r=t(7537),n=t(87837),e=new d({initialize:function(h,i,o,f){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(h,i,o,f)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(s,h,i,o,f){return o===void 0&&(o=255),f===void 0&&(f=!0),this._locked=!0,this.red=s,this.green=h,this.blue=i,this.alpha=o,this._locked=!1,this.update(f)},setGLTo:function(s,h,i,o){return o===void 0&&(o=1),this._locked=!0,this.redGL=s,this.greenGL=h,this.blueGL=i,this.alphaGL=o,this._locked=!1,this.update(!0)},setFromRGB:function(s){return this._locked=!0,this.red=s.r,this.green=s.g,this.blue=s.b,s.hasOwnProperty("a")&&(this.alpha=s.a),this._locked=!1,this.update(!0)},setFromHSV:function(s,h,i){return r(s,h,i,this)},update:function(s){if(s===void 0&&(s=!1),this._locked)return this;var h=this.r,i=this.g,o=this.b,f=this.a;return this._color=c(h,i,o),this._color32=a(h,i,o,f),this._rgba="rgba("+h+","+i+","+o+","+f/255+")",s&&n(h,i,o,this),this},updateHSV:function(){var s=this.r,h=this.g,i=this.b;return n(s,h,i,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(s){return this.setTo(s,s,s)},random:function(s,h){s===void 0&&(s=0),h===void 0&&(h=255);var i=Math.floor(s+Math.random()*(h-s)),o=Math.floor(s+Math.random()*(h-s)),f=Math.floor(s+Math.random()*(h-s));return this.setTo(i,o,f)},randomGray:function(s,h){s===void 0&&(s=0),h===void 0&&(h=255);var i=Math.floor(s+Math.random()*(h-s));return this.setTo(i,i,i)},saturate:function(s){return this.s+=s/100,this},desaturate:function(s){return this.s-=s/100,this},lighten:function(s){return this.v+=s/100,this},darken:function(s){return this.v-=s/100,this},brighten:function(s){var h=this.r,i=this.g,o=this.b;return h=Math.max(0,Math.min(255,h-Math.round(255*-(s/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(s/100)))),o=Math.max(0,Math.min(255,o-Math.round(255*-(s/100)))),this.setTo(h,i,o)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(s){this.gl[0]=Math.min(Math.abs(s),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(s){this.gl[1]=Math.min(Math.abs(s),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(s){this.gl[2]=Math.min(Math.abs(s),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(s){this.gl[3]=Math.min(Math.abs(s),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(s){s=Math.floor(Math.abs(s)),this.r=Math.min(s,255),this.gl[0]=s/255,this.update(!0)}},green:{get:function(){return this.g},set:function(s){s=Math.floor(Math.abs(s)),this.g=Math.min(s,255),this.gl[1]=s/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(s){s=Math.floor(Math.abs(s)),this.b=Math.min(s,255),this.gl[2]=s/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(s){s=Math.floor(Math.abs(s)),this.a=Math.min(s,255),this.gl[3]=s/255,this.update()}},h:{get:function(){return this._h},set:function(s){this._h=s,r(s,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(s){this._s=s,r(this._h,s,this._v,this)}},v:{get:function(){return this._v},set:function(s){this._v=s,r(this._h,this._s,s,this)}}});p.exports=e},92728:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37589),c=function(a){a===void 0&&(a=1024);var r=[],n=255,e,s=255,h=0,i=0;for(e=0;e<=n;e++)r.push({r:s,g:e,b:i,color:d(s,e,i)});for(h=255,e=n;e>=0;e--)r.push({r:e,g:h,b:i,color:d(e,h,i)});for(s=0,e=0;e<=n;e++,h--)r.push({r:s,g:h,b:e,color:d(s,h,e)});for(h=0,i=255,e=0;e<=n;e++,i--,s++)r.push({r:s,g:h,b:i,color:d(s,h,i)});if(a===1024)return r;var o=[],f=0,l=1024/a;for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(d.a=t>>>24),d};p.exports=S},62957:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.toString(16);return d.length===1?"0"+d:d};p.exports=S},37589:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t<<16|d<<8|c};p.exports=S},1e3:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return a<<24|t<<16|d<<8|c};p.exports=S},62183:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40987),c=t(89528),a=function(r,n,e){var s=e,h=e,i=e;if(n!==0){var o=e<.5?e*(1+n):e+n-e*n,f=2*e-o;s=c(f,o,r+1/3),h=c(f,o,r),i=c(f,o,r-1/3)}var l=new d;return l.setGLTo(s,h,i,1)};p.exports=a},27939:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7537),c=function(a,r){a===void 0&&(a=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(d(e/359,a,r));return n};p.exports=c},7537:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37589);function c(r,n,e,s){var h=(r+n*6)%6,i=Math.min(h,4-h,1);return Math.round(255*(s-s*e*Math.max(0,i)))}var a=function(r,n,e,s){n===void 0&&(n=1),e===void 0&&(e=1);var h=c(5,r,n,e),i=c(3,r,n,e),o=c(1,r,n,e);return s?s.setTo?s.setTo(h,i,o,s.alpha,!0):(s.r=h,s.g=i,s.b=o,s.color=d(h,i,o),s):{r:h,g:i,b:o,color:d(h,i,o)}};p.exports=a},70238:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40987),c=function(a){var r=new d;a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,o,f,l){return o+o+f+f+l+l});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(n){var e=parseInt(n[1],16),s=parseInt(n[2],16),h=parseInt(n[3],16);r.setTo(e,s,h)}return r};p.exports=c},89528:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?t+(d-t)*6*c:c<.5?d:c<.6666666666666666?t+(d-t)*(.6666666666666666-c)*6:t};p.exports=S},30100:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40987),c=t(90664),a=function(r){var n=c(r);return new d(n.r,n.g,n.b,n.a)};p.exports=a},90664:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:t&255}:{a:255,r:t>>16&255,g:t>>8&255,b:t&255}};p.exports=S},13699:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28915),c=function(n,e,s,h,i,o,f,l){f===void 0&&(f=100),l===void 0&&(l=0);var u=l/f;return{r:d(n,h,u),g:d(e,i,u),b:d(s,o,u)}},a=function(n,e,s,h){return s===void 0&&(s=100),h===void 0&&(h=0),c(n.r,n.g,n.b,e.r,e.g,e.b,s,h)},r=function(n,e,s,h,i,o){return i===void 0&&(i=100),o===void 0&&(o=0),c(n.r,n.g,n.b,e,s,h,i,o)};p.exports={RGBWithRGB:c,ColorWithRGB:r,ColorWithColor:a}},68957:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40987),c=function(a){return new d(a.r,a.g,a.b,a.a)};p.exports=c},87388:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40987),c=function(a){var r=new d,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a.toLowerCase());if(n){var e=parseInt(n[1],10),s=parseInt(n[2],10),h=parseInt(n[3],10),i=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,s,h,i*255)}return r};p.exports=c},87837:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){a===void 0&&(a={h:0,s:0,v:0}),t/=255,d/=255,c/=255;var r=Math.min(t,d,c),n=Math.max(t,d,c),e=n-r,s=0,h=n===0?0:e/n,i=n;return n!==r&&(n===t?s=(d-c)/e+(d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62957),c=function(a,r,n,e,s){return e===void 0&&(e=255),s===void 0&&(s="#"),s==="#"?"#"+((1<<24)+(a<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+d(e)+d(a)+d(r)+d(n)};p.exports=c},85386:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30976),c=t(40987),a=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new c(d(r,n),d(r,n),d(r,n))};p.exports=a},80333:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70238),c=t(30100),a=t(68957),r=t(87388),n=function(e){var s=typeof e;switch(s){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):d(e);case"number":return c(e);case"object":return a(e)}};p.exports=n},3956:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40987);d.ColorSpectrum=t(92728),d.ColorToRGBA=t(91588),d.ComponentToHex=t(62957),d.GetColor=t(37589),d.GetColor32=t(1e3),d.HexStringToColor=t(70238),d.HSLToColor=t(62183),d.HSVColorWheel=t(27939),d.HSVToRGB=t(7537),d.HueToComponent=t(89528),d.IntegerToColor=t(30100),d.IntegerToRGB=t(90664),d.Interpolate=t(13699),d.ObjectToColor=t(68957),d.RandomRGB=t(85386),d.RGBStringToColor=t(87388),d.RGBToHSV=t(87837),d.RGBToString=t(75723),d.ValueToColor=t(80333),p.exports=d},27460:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Align:t(71926),BaseShader:t(73894),Bounds:t(58724),Canvas:t(26253),Color:t(3956),ColorMatrix:t(89422),Masks:t(69781),RGB:t(51767)}},6858:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(39429),a=new d({initialize:function(n,e,s,h,i,o){e||(e=n.sys.make.image({x:s,y:h,key:i,frame:o,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,n,e)},postRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,n,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});c.register("bitmapMask",function(r,n,e,s,h){return new a(this.scene,r,n,e,s,h)}),p.exports=a},80661:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=new d({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(a){return this.geometryMask=a,this},setInvertAlpha:function(a){return a===void 0&&(a=!0),this.invertAlpha=a,this},preRenderWebGL:function(a,r,n){var e=a.gl;a.flush(),a.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),a.maskCount=0),a.currentCameraMask.mask!==this&&(a.currentMask.mask=this),a.maskStack.push({mask:this,camera:n}),this.applyStencil(a,n,!0),a.maskCount++},applyStencil:function(a,r,n){var e=a.gl,s=this.geometryMask,h=a.maskCount,i=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,h,i),e.stencilOp(e.KEEP,e.KEEP,e.INCR),h++):(e.stencilFunc(e.EQUAL,h+1,i),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=h,s.renderWebGL(a,s,r),a.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,h,i):e.stencilFunc(e.EQUAL,h,i)},postRenderWebGL:function(a){var r=a.gl;a.maskStack.pop(),a.maskCount--,a.flush();var n=a.currentMask;if(a.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=a.maskStack[a.maskStack.length-1];e.mask.applyStencil(a,e.camera,!1),a.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(a,r,n){var e=this.geometryMask;a.currentContext.save(),e.renderCanvas(a,e,n,null,null,!0),a.currentContext.clip()},postRenderCanvas:function(a){a.currentContext.restore()},destroy:function(){this.geometryMask=null}});p.exports=c},69781:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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){(!n||n==="")&&(n=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` +`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` +`)),s===void 0&&(s=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=s}});p.exports=c},40366:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c;if(d)typeof d=="string"?c=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(c=d);else if(t.parentElement||d===null)return t;return c||(c=document.body),c.appendChild(t),t};p.exports=S},83719:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40366),c=function(a){var r=a.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+a.scale.width+"px;","height: "+a.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),a.domContainer=n,d(n,r.parent)}};p.exports=c},57264:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25892),c=function(a){if(document.readyState==="complete"||document.readyState==="interactive"){a();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),a()};document.body?d.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};p.exports=c},57811:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){if(!t)return window.innerHeight;var d=Math.abs(window.orientation),c={w:0,h:0},a=document.createElement("div");return a.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(a),c.w=d===90?a.offsetHeight:window.innerWidth,c.h=d===90?window.innerWidth:a.offsetHeight,document.documentElement.removeChild(a),a=null,Math.abs(window.orientation)!==90?c.h:c.w};p.exports=S},45818:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13560),c=function(a,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return r>a?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};p.exports=c},74403:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d;return t!==""&&(typeof t=="string"?d=document.getElementById(t):t&&t.nodeType===1&&(d=t)),d||(d=document.body),d};p.exports=S},56836:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d="";try{if(window.DOMParser){var c=new DOMParser;d=c.parseFromString(t,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(t)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=S},35846:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){t.parentNode&&t.parentNode.removeChild(t)};p.exports=S},43092:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(29747),a=new d({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(s){n.callback(s),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=c}});p.exports=a},84902:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};p.exports=d},47565:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=t(37277),r=new d({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});a.register("EventEmitter",r,"events"),p.exports=r},93055:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={EventEmitter:t(47565)}},20122:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,a.BARREL,e),this.amount=s}});p.exports=r},32251:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o,f,l){h===void 0&&(h=1),i===void 0&&(i=1),o===void 0&&(o=1),f===void 0&&(f=1),l===void 0&&(l=4),c.call(this,a.BLOOM,e),this.steps=l,this.offsetX=h,this.offsetY=i,this.blurStrength=o,this.strength=f,this.glcolor=[1,1,1],s!=null&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},9047:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o,f,l){s===void 0&&(s=0),h===void 0&&(h=2),i===void 0&&(i=2),o===void 0&&(o=1),l===void 0&&(l=4),c.call(this,a.BLUR,e),this.quality=s,this.x=h,this.y=i,this.steps=l,this.strength=o,this.glcolor=[1,1,1],f!=null&&(this.color=f)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},27885:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o,f,l,u){s===void 0&&(s=.5),h===void 0&&(h=1),i===void 0&&(i=.2),o===void 0&&(o=!1),f===void 0&&(f=1),l===void 0&&(l=1),u===void 0&&(u=1),c.call(this,a.BOKEH,e),this.radius=s,this.amount=h,this.contrast=i,this.isTiltShift=o,this.strength=u,this.blurX=f,this.blurY=l}});p.exports=r},12578:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o,f){s===void 0&&(s=8),o===void 0&&(o=1),f===void 0&&(f=.005),c.call(this,a.CIRCLE,e),this.scale=o,this.feather=f,this.thickness=s,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],h!=null&&(this.color=h),i!=null&&(this.backgroundColor=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundColor:{get:function(){var n=this.glcolor2;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor2;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(n){this.glcolor2[3]=n}}});p.exports=r},15802:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(89422),a=t(14811),r=new d({Extends:c,initialize:function(e){c.call(this),this.type=a.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});p.exports=r},72898:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=new d({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(a){return this.active=a,this},destroy:function(){this.gameObject=null,this.active=!1}});p.exports=c},44553:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i){s===void 0&&(s="__WHITE"),h===void 0&&(h=.005),i===void 0&&(i=.005),c.call(this,a.DISPLACEMENT,e),this.x=h,this.y=i,this.glTexture,this.setTexture(s)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});p.exports=r},68531:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o){h===void 0&&(h=4),i===void 0&&(i=0),o===void 0&&(o=!1),c.call(this,a.GLOW,e),this.outerStrength=h,this.innerStrength=i,this.knockout=o,this.glcolor=[1,1,1,1],s!==void 0&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},37102:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o,f,l,u,v){i===void 0&&(i=.2),o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=1),v===void 0&&(v=0),c.call(this,a.GRADIENT,e),this.alpha=i,this.size=v,this.fromX=o,this.fromY=f,this.toX=l,this.toY=u,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],s!=null&&(this.color1=s),h!=null&&(this.color2=h)},color1:{get:function(){var n=this.glcolor1;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor1;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}},color2:{get:function(){var n=this.glcolor2;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor2;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}}});p.exports=r},86886:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,a.PIXELATE,e),this.amount=s}});p.exports=r},92322:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o,f,l,u){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=.1),o===void 0&&(o=1),l===void 0&&(l=6),u===void 0&&(u=1),c.call(this,a.SHADOW,e),this.x=s,this.y=h,this.decay=i,this.power=o,this.glcolor=[0,0,0,1],this.samples=l,this.intensity=u,f!==void 0&&(this.color=f)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},39563:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o){s===void 0&&(s=.5),h===void 0&&(h=.5),i===void 0&&(i=3),o===void 0&&(o=!1),c.call(this,a.SHINE,e),this.speed=s,this.lineWidth=h,this.gradient=i,this.reveal=o}});p.exports=r},56448:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o){s===void 0&&(s=.5),h===void 0&&(h=.5),i===void 0&&(i=.5),o===void 0&&(o=.5),c.call(this,a.VIGNETTE,e),this.x=s,this.y=h,this.radius=i,this.strength=o}});p.exports=r},38433:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72898),a=t(14811),r=new d({Extends:c,initialize:function(e,s,h,i,o){s===void 0&&(s=.1),h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=!1),c.call(this,a.WIPE,e),this.progress=0,this.wipeWidth=s,this.direction=h,this.axis=i,this.reveal=o}});p.exports=r},14811:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};p.exports=S},66064:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79291),c=t(14811),a={Barrel:t(20122),Controller:t(72898),Bloom:t(32251),Blur:t(9047),Bokeh:t(27885),Circle:t(12578),ColorMatrix:t(15802),Displacement:t(44553),Glow:t(68531),Gradient:t(37102),Pixelate:t(86886),Shadow:t(92322),Shine:t(39563),Vignette:t(56448),Wipe:t(38433)};a=d(!1,a,c),p.exports=a},25305:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c=t(23568),a=function(r,n,e){n.x=c(e,"x",0),n.y=c(e,"y",0),n.depth=c(e,"depth",0),n.flipX=c(e,"flipX",!1),n.flipY=c(e,"flipY",!1);var s=c(e,"scale",null);typeof s=="number"?n.setScale(s):s!==null&&(n.scaleX=c(s,"x",1),n.scaleY=c(s,"y",1));var h=c(e,"scrollFactor",null);typeof h=="number"?n.setScrollFactor(h):h!==null&&(n.scrollFactorX=c(h,"x",1),n.scrollFactorY=c(h,"y",1)),n.rotation=c(e,"rotation",0);var i=c(e,"angle",null);i!==null&&(n.angle=i),n.alpha=c(e,"alpha",1);var o=c(e,"origin",null);if(typeof o=="number")n.setOrigin(o);else if(o!==null){var f=c(o,"x",.5),l=c(o,"y",.5);n.setOrigin(f,l)}n.blendMode=c(e,"blendMode",d.NORMAL),n.visible=c(e,"visible",!0);var u=c(e,"add",!0);return u&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};p.exports=a},13059:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23568),c=function(a,r){var n=d(r,"anims",null);if(n===null)return a;if(typeof n=="string")a.anims.play(n);else if(typeof n=="object"){var e=a.anims,s=d(n,"key",void 0);if(s){var h=d(n,"startFrame",void 0),i=d(n,"delay",0),o=d(n,"repeat",0),f=d(n,"repeatDelay",0),l=d(n,"yoyo",!1),u=d(n,"play",!1),v=d(n,"delayedPlay",0),g={key:s,delay:i,repeat:o,repeatDelay:f,yoyo:l,startFrame:h};u?e.play(g):v>0?e.playAfterDelay(g,v):e.load(g)}}return a};p.exports=c},8050:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(73162),a=t(37277),r=t(51708),n=t(44594),e=t(19186),s=new d({Extends:c,initialize:function(i){c.call(this,i),this.sortChildrenFlag=!1,this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},addChildCallback:function(h){h.displayList&&h.displayList!==this&&h.removeFromDisplayList(),h.parentContainer&&h.parentContainer.remove(h),h.displayList||(this.queueDepthSort(),h.displayList=this,h.emit(r.ADDED_TO_SCENE,h,this.scene),this.events.emit(n.ADDED_TO_SCENE,h,this.scene))},removeChildCallback:function(h){this.queueDepthSort(),h.displayList=null,h.emit(r.REMOVED_FROM_SCENE,h,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,h,this.scene)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(h,i){return h._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var h=this.list;h.length;)h[0].destroy(!0);this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});a.register("DisplayList",s,"displayList"),p.exports=s},95643:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(53774),a=t(45893),r=t(50792),n=t(51708),e=t(44594),s=new d({Extends:r,initialize:function(i,o){r.call(this),this.scene=i,this.displayList=null,this.type=o,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this),i.sys.queueDepthSort()},setActive:function(h){return this.active=h,this},setName:function(h){return this.name=h,this},setState:function(h){return this.state=h,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(h,i){return this.data||(this.data=new a(this)),this.data.set(h,i),this},incData:function(h,i){return this.data||(this.data=new a(this)),this.data.inc(h,i),this},toggleData:function(h){return this.data||(this.data=new a(this)),this.data.toggle(h),this},getData:function(h){return this.data||(this.data=new a(this)),this.data.get(h)},setInteractive:function(h,i,o){return this.scene.sys.input.enable(this,h,i,o),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(h){var i=this.displayList&&this.displayList.active?this.displayList.willRender(h):!0;return!(!i||s.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},getIndexList:function(){for(var h=this,i=this.parentContainer,o=[];i&&(o.unshift(i.getIndex(h)),h=i,i.parentContainer);)i=i.parentContainer;return this.displayList?o.unshift(this.displayList.getIndex(h)):o.unshift(this.scene.sys.displayList.getIndex(h)),o},addToDisplayList:function(h){return h===void 0&&(h=this.scene.sys.displayList),this.displayList&&this.displayList!==h&&this.removeFromDisplayList(),h.exists(this)||(this.displayList=h,h.add(this,!0),h.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),h.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var h=this.displayList||this.scene.sys.displayList;return h&&h.exists(this)&&(h.remove(this,!0),h.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),h.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(h){!this.scene||this.ignoreDestroy||(h===void 0&&(h=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,h),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});s.RENDER_MASK=15,p.exports=s},44603:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(37277),a=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectCreator",r,"make"),p.exports=r},39429:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(37277),a=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectFactory",r,"add"),p.exports=r},91296:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61340),c=new d,a=new d,r=new d,n={camera:c,sprite:a,calc:r},e=function(s,h,i){var o=c,f=a,l=r;return f.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),o.copyFrom(h.matrix),i?(o.multiplyWithOffset(i,-h.scrollX*s.scrollFactorX,-h.scrollY*s.scrollFactorY),f.e=s.x,f.f=s.y):(f.e-=h.scrollX*s.scrollFactorX,f.f-=h.scrollY*s.scrollFactorY),o.multiply(f,l),n};p.exports=e},45027:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(25774),a=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this),this.checkQueue=!0,this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(r.PRE_UPDATE,this.update,this),e.on(r.UPDATE,this.sceneUpdate,this),e.once(r.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,s){for(var h=this._active,i=h.length,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r,n,e,s,h,i,o,f,l,u,v){var g=c.x-d.displayOriginX+r,x=c.y-d.displayOriginY+n,m=g+c.w,y=x+c.h,T=e.getXRound(g,x,s),E=e.getYRound(g,x,s),C=e.getXRound(g,y,s),A=e.getYRound(g,y,s),P=e.getXRound(m,y,s),M=e.getYRound(m,y,s),F=e.getXRound(m,x,s),L=e.getYRound(m,x,s);t.batchQuad(d,T,E,C,A,P,M,F,L,a.u0,a.v0,a.u1,a.v1,h,i,o,f,l,u,v)};p.exports=S},53048:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){if(c===void 0&&(c=!1),a===void 0)return a={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},a;var r=t.text,n=r.length,e=t.maxWidth,s=t.wordWrapCharCode,h=Number.MAX_VALUE,i=Number.MAX_VALUE,o=0,f=0,l=t.fontData.chars,u=t.fontData.lineHeight,v=t.letterSpacing,g=t.lineSpacing,x=0,m=0,y=0,T=null,E=t._align,C=0,A=0,P=t.fontSize/t.fontData.size,M=P*t.scaleX,F=P*t.scaleY,L=null,D=0,I=[],U=Number.MAX_VALUE,z=0,w=0,G=0,R,O=[],B=[],N=null;if(e>0){for(R=0;Re||$>e?(W.push(H.i-1),H.cr?(W.push(H.i+H.word.length),Y=0,V=null):V=H):H.cr&&(W.push(H.i+H.word.length),Y=0,V=null)}var q=function(rt,ft,vt){return rt.substr(0,ft)+vt+rt.substr(ft+1)};for(R=W.length-1;R>=0;R--)r=q(r,W[R],` +`);a.wrappedText=r,n=r.length,O=[],N=null}var tt=0;for(R=0;Rz&&(z=G),GC&&(h=C),i>A&&(i=A);var Q=C+T.xAdvance,k=A+u;oz&&(z=G),G0)for(var et=0;et{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(21859),c=function(a,r,n,e,s,h,i){var o=a.sys.textures.get(n),f=o.get(e),l=a.sys.cache.xml.get(s);if(f&&l){var u=d(l,f,h,i,o);return a.sys.cache.bitmapFont.add(r,{data:u,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=c},6925:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35154),c=function(a,r){var n=r.width,e=r.height,s=Math.floor(n/2),h=Math.floor(e/2),i=d(r,"chars","");if(i!==""){var o=d(r,"image",""),f=a.sys.textures.getFrame(o),l=f.cutX,u=f.cutY,v=f.source.width,g=f.source.height,x=d(r,"offset.x",0),m=d(r,"offset.y",0),y=d(r,"spacing.x",0),T=d(r,"spacing.y",0),E=d(r,"lineSpacing",0),C=d(r,"charsPerRow",null);C===null&&(C=v/n,C>i.length&&(C=i.length));for(var A=x,P=m,M={retroFont:!0,font:o,size:n,lineHeight:e+E,chars:{}},F=0,L=0;L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(d,c){return parseInt(d.getAttribute(c),10)}var t=function(d,c,a,r,n){a===void 0&&(a=0),r===void 0&&(r=0);var e=c.cutX,s=c.cutY,h=c.source.width,i=c.source.height,o=c.sourceIndex,f={},l=d.getElementsByTagName("info")[0],u=d.getElementsByTagName("common")[0];f.font=l.getAttribute("face"),f.size=S(l,"size"),f.lineHeight=S(u,"lineHeight")+r,f.chars={};var v=d.getElementsByTagName("char"),g=c!==void 0&&c.trimmed;if(g)var x=c.height,m=c.width;for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87662),c=t(79291),a={Parse:t(6925)};a=c(!1,a,d),p.exports=a},87662:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};p.exports=S},2638:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22186),c=t(83419),a=t(12310),r=new c({Extends:d,Mixins:[a],initialize:function(e,s,h,i,o,f,l){d.call(this,e,s,h,i,o,f,l),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(n,e){return this.cropWidth=n,this.cropHeight=e,this},setDisplayCallback:function(n){return this.displayCallback=n,this},setScrollX:function(n){return this.scrollX=n,this},setScrollY:function(n){return this.scrollY=n,this}});p.exports=r},86741:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20926),c=function(a,r,n,e){var s=r._text,h=s.length,i=a.currentContext;if(!(h===0||!d(a,i,r,n,e))){n.addToRenderList(r);var o=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.displayCallback,l=r.callbackData,u=r.fontData.chars,v=r.fontData.lineHeight,g=r._letterSpacing,x=0,m=0,y=0,T=null,E=0,C=0,A=0,P=0,M=0,F=0,L=null,D=0,I=r.frame.source.image,U=o.cutX,z=o.cutY,w=0,G=0,R=r._fontSize/r.fontData.size,O=r._align,B=0,N=0;r.getTextBounds(!1);var X=r._bounds.lines;O===1?N=(X.longest-X.lengths[0])/2:O===2&&(N=X.longest-X.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);var V=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(i.beginPath(),i.rect(0,0,r.cropWidth,r.cropHeight),i.clip());for(var Y=0;Y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2638),c=t(25305),a=t(44603),r=t(23568);a.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var s=r(n,"font",""),h=r(n,"text",""),i=r(n,"size",!1),o=new d(this.scene,0,0,s,h,i);return e!==void 0&&(n.add=e),c(this.scene,o,n),o})},72566:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2638),c=t(39429);c.register("dynamicBitmapText",function(a,r,n,e,s){return this.displayList.add(new d(this.scene,a,r,n,e,s))})},12310:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(73482),a=t(86741),p.exports={renderWebGL:c,renderCanvas:a}},73482:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(61340),a=t(70554),r=new c,n=function(e,s,h,i){var o=s.text,f=o.length;if(f!==0){h.addToRenderList(s);var l=e.pipelines.set(s.pipeline,s),u=d(s,h,i);e.pipelines.preBatch(s);var v=u.sprite,g=u.calc,x=r,m=s.cropWidth>0||s.cropHeight>0;m&&(l.flush(),e.pushScissor(g.tx,g.ty,s.cropWidth*g.scaleX,s.cropHeight*g.scaleY));var y=s.frame,T=y.glTexture,E=s.tintFill,C=a.getTintAppendFloatAlpha(s.tintTopLeft,h.alpha*s._alphaTL),A=a.getTintAppendFloatAlpha(s.tintTopRight,h.alpha*s._alphaTR),P=a.getTintAppendFloatAlpha(s.tintBottomLeft,h.alpha*s._alphaBL),M=a.getTintAppendFloatAlpha(s.tintBottomRight,h.alpha*s._alphaBR),F=l.setGameObject(s),L=0,D=0,I=0,U=0,z=s.letterSpacing,w,G=0,R=0,O,B=s.scrollX,N=s.scrollY,X=s.fontData,V=X.chars,Y=X.lineHeight,W=s.fontSize/X.size,H=0,b=s._align,K=0,J=0,Z=s.getTextBounds(!1);s.maxWidth>0&&(o=Z.wrappedText,f=o.length);var $=s._bounds.lines;b===1?J=($.longest-$.lengths[0])/2:b===2&&(J=$.longest-$.lengths[0]);for(var q=h.roundPixels,tt=s.displayCallback,_=s.callbackData,Q=0;Q{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(45319),a=t(31401),r=t(95643),n=t(53048),e=t(61327),s=t(21859),h=t(87841),i=t(18658),o=new d({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Texture,a.Tint,a.Transform,a.Visible,i],initialize:function(l,u,v,g,x,m,y){x===void 0&&(x=""),y===void 0&&(y=0),r.call(this,l,"BitmapText"),this.font=g;var T=this.scene.sys.cache.bitmapFont.get(g);T||console.warn("Invalid BitmapText key: "+g),this.fontData=T.data,this._text="",this._fontSize=m||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=y,this._bounds=n(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(u,v),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(x)},setLeftAlign:function(){return this._align=o.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=o.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=o.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setLineSpacing:function(f){return f===void 0&&(f=0),this.lineSpacing=f,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(` +`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,l,u,v){return f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=0),v===void 0&&(v=.5),this.dropShadowX=f,this.dropShadowY=l,this.dropShadowColor=u,this.dropShadowAlpha=v,this},setCharacterTint:function(f,l,u,v,g,x,m){f===void 0&&(f=0),l===void 0&&(l=1),u===void 0&&(u=!1),v===void 0&&(v=-1),g===void 0&&(g=v,x=v,m=v);var y=this.text.length;l===-1&&(l=y),f<0&&(f=y+f),f=c(f,0,y-1);for(var T=c(f+l,f,y),E=this.charColors,C=f;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20926),c=function(a,r,n,e){var s=r._text,h=s.length,i=a.currentContext;if(!(h===0||!d(a,i,r,n,e))){n.addToRenderList(r);var o=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.fontData.chars,l=r.fontData.lineHeight,u=r._letterSpacing,v=r._lineSpacing,g=0,x=0,m=0,y=null,T=0,E=0,C=0,A=0,P=0,M=0,F=null,L=0,D=o.source.image,I=o.cutX,U=o.cutY,z=r._fontSize/r.fontData.size,w=r._align,G=0,R=0,O=r.getTextBounds(!1);r.maxWidth>0&&(s=O.wrappedText,h=s.length);var B=r._bounds.lines;w===1?R=(B.longest-B.lengths[0])/2:w===2&&(R=B.longest-B.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);for(var N=n.roundPixels,X=0;X{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22186),c=t(25305),a=t(44603),r=t(23568),n=t(35154);a.register("bitmapText",function(e,s){e===void 0&&(e={});var h=n(e,"font",""),i=r(e,"text",""),o=r(e,"size",!1),f=n(e,"align",0),l=new d(this.scene,0,0,h,i,o,f);return s!==void 0&&(e.add=s),c(this.scene,l,e),l})},34914:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22186),c=t(39429);c.register("bitmapText",function(a,r,n,e,s,h){return this.displayList.add(new d(this.scene,a,r,n,e,s,h))})},18658:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(33590),a=t(37289),p.exports={renderWebGL:c,renderCanvas:a}},33590:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(3217),c=t(91296),a=t(70554),r=function(n,e,s,h){var i=e._text,o=i.length;if(o!==0){s.addToRenderList(e);var f=n.pipelines.set(e.pipeline,e),l=c(e,s,h).calc;n.pipelines.preBatch(e);var u=s.roundPixels,v=s.alpha,g=e.charColors,x=e.tintFill,m=a.getTintAppendFloatAlpha,y=m(e.tintTopLeft,v*e._alphaTL),T=m(e.tintTopRight,v*e._alphaTR),E=m(e.tintBottomLeft,v*e._alphaBL),C=m(e.tintBottomRight,v*e._alphaBR),A=e.frame.glTexture,P=f.setGameObject(e),M=e.getTextBounds(!1),F,L,D,I=M.characters,U=e.dropShadowX,z=e.dropShadowY,w=U!==0||z!==0;if(w){var G=e.dropShadowColor,R=e.dropShadowAlpha,O=m(G,v*R*e._alphaTL),B=m(G,v*R*e._alphaTR),N=m(G,v*R*e._alphaBL),X=m(G,v*R*e._alphaBR);for(F=0;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(48011),c=t(46590),a=t(83419),r=t(31401),n=t(4327),e=t(95643),s=t(73162),h=new a({Extends:e,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,d],initialize:function(o,f,l,u,v){e.call(this,o,"Blitter"),this.setTexture(u,v),this.setPosition(f,l),this.initPipeline(),this.initPostPipeline(),this.children=new s,this.renderList=[],this.dirty=!1},create:function(i,o,f,l,u){l===void 0&&(l=!0),u===void 0&&(u=this.children.length),f===void 0?f=this.frame:f instanceof n||(f=this.texture.get(f));var v=new c(this,i,o,f,l);return this.children.addAt(v,u,!1),this.dirty=!0,v},createFromCallback:function(i,o,f,l){for(var u=this.createMultiple(o,f,l),v=0;v0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});p.exports=h},72396:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=d.getRenderList();if(r.length!==0){var n=t.currentContext,e=c.alpha*d.alpha;if(e!==0){c.addToRenderList(d),n.globalCompositeOperation=t.blendModes[d.blendMode],n.imageSmoothingEnabled=!d.frame.source.scaleMode;var s=d.x-c.scrollX*d.scrollFactorX,h=d.y-c.scrollY*d.scrollFactorY;n.save(),a&&a.copyToContext(n);for(var i=c.roundPixels,o=0;o0&&v.height>0&&(n.save(),n.translate(f.x+s,f.y+h),n.scale(m,y),n.drawImage(u.source.image,v.x,v.y,v.width,v.height,g,x,v.width,v.height),n.restore())):(i&&(g=Math.round(g),x=Math.round(x)),v.width>0&&v.height>0&&n.drawImage(u.source.image,v.x,v.y,v.width,v.height,g+f.x+s,x+f.y+h,v.width,v.height)))}n.restore()}}};p.exports=S},9403:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6107),c=t(25305),a=t(44603),r=t(23568);a.register("blitter",function(n,e){n===void 0&&(n={});var s=r(n,"key",null),h=r(n,"frame",null),i=new d(this.scene,0,0,s,h);return e!==void 0&&(n.add=e),c(this.scene,i,n),i})},12709:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6107),c=t(39429);c.register("blitter",function(a,r,n,e){return this.displayList.add(new d(this.scene,a,r,n,e))})},48011:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(99485),a=t(72396),p.exports={renderWebGL:c,renderCanvas:a}},99485:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61340),c=t(70554),a=new d,r=function(n,e,s,h){var i=e.getRenderList(),o=s.alpha*e.alpha;if(!(i.length===0||o===0)){s.addToRenderList(e);var f=n.pipelines.set(this.pipeline,e),l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,v=a.copyFrom(s.matrix);h&&(v.multiplyWithOffset(h,-l,-u),l=0,u=0);var g=e.x-l,x=e.y-u,m=-1,y=!1;n.pipelines.preBatch(e);for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(4327),a=new d({initialize:function(n,e,s,h,i){this.parent=n,this.x=e,this.y=s,this.frame=h,this.data={},this.tint=16777215,this._visible=i,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(r){return r===void 0?this.frame=this.parent.frame:r instanceof c&&r.texture===this.parent.texture?this.frame=r:this.frame=this.parent.texture.get(r),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(r,n,e){return this.x=r,this.y=n,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(r,n){return this.x=r,this.y=n,this},setFlipX:function(r){return this.flipX=r,this},setFlipY:function(r){return this.flipY=r,this},setFlip:function(r,n){return this.flipX=r,this.flipY=n,this},setVisible:function(r){return this.visible=r,this},setAlpha:function(r){return this.alpha=r,this},setTint:function(r){return this.tint=r,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(r){this.parent.dirty|=this._visible!==r,this._visible=r}},alpha:{get:function(){return this._alpha},set:function(r){this.parent.dirty|=this._alpha>0!=r>0,this._alpha=r}}});p.exports=a},16005:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=2,a={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,s){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=d(r,0,1),this._alphaTR=d(n,0,1),this._alphaBL=d(e,0,1),this._alphaBR=d(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=d(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=c)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=d(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=c)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=d(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=c)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=d(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=c)}}};p.exports=a},88509:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=2,a={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r){return r===void 0&&(r=1),this.alpha=r,this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}}};p.exports=a},90065:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c={_blendMode:d.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(a){typeof a=="string"&&(a=d[a]),a|=0,a>=-1&&(this._blendMode=a)}},setBlendMode:function(a){return this.blendMode=a,this}};p.exports=c},94215:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S},61683:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={texture:null,frame:null,isCropped:!1,setCrop:function(t,d,c,a){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,d,c,a,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=S},89272:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return t===void 0&&(t=0),this.depth=t,this}};p.exports=S},47059:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(66064),a=t(19133),r=new d({initialize:function(e,s){this.gameObject=e,this.isPost=s,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(n){return n===void 0&&(n=0),this.padding=n,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(n){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,n!==void 0&&(this.padding=n),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var n=this.list,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,d){return this.flipX=t,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};p.exports=S},8004:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=t(11520),a=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&c(n,this.x,this.y,this.rotation),e&&this.parentContainer){var s=this.parentContainer.getBoundsTransformMatrix();s.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new a),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getTopLeft:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopCenter:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopRight:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getLeftCenter:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getRightCenter:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getBottomLeft:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomCenter:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomRight:function(n,e){return n||(n=new a),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBounds:function(n){n===void 0&&(n=new d);var e,s,h,i,o,f,l,u;if(this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),v.transformPoint(n.x,n.y,n),e=n.x,s=n.y,this.getTopRight(n),v.transformPoint(n.x,n.y,n),h=n.x,i=n.y,this.getBottomLeft(n),v.transformPoint(n.x,n.y,n),o=n.x,f=n.y,this.getBottomRight(n),v.transformPoint(n.x,n.y,n),l=n.x,u=n.y}else this.getTopLeft(n),e=n.x,s=n.y,this.getTopRight(n),h=n.x,i=n.y,this.getBottomLeft(n),o=n.x,f=n.y,this.getBottomRight(n),l=n.x,u=n.y;return n.x=Math.min(e,h,o,l),n.y=Math.min(s,i,f,u),n.width=Math.max(e,h,o,l)-n.x,n.height=Math.max(s,i,f,u)-n.y,n}};p.exports=r},8573:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6858),c=t(80661),a={mask:null,setMask:function(r){return this.mask=r,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(r,n,e,s,h){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new d(this.scene,r,n,e,s,h)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new c(this.scene,r)}};p.exports=a},27387:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,d){return t===void 0&&(t=.5),d===void 0&&(d=t),this.originX=t,this.originY=d,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(t,d){return t===void 0&&(t=0),d===void 0&&(d=t),this.displayOriginX=t,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};p.exports=S},37640:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39506),c=t(57355),a=t(35154),r=t(86353),n=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:r.PLAYING_FORWARD,setPath:function(s,h){h===void 0&&(h=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=s,h&&this.startFollow(h),this},setRotateToPath:function(s,h){return h===void 0&&(h=0),this.rotateToPath=s,this.pathRotationOffset=h,this},isFollowing:function(){var s=this.pathTween;return s&&s.isPlaying()},startFollow:function(s,h){s===void 0&&(s={}),h===void 0&&(h=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof s=="number"&&(s={duration:s}),s.from=a(s,"from",0),s.to=a(s,"to",1);var o=c(s,"positionOnPath",!1);this.rotateToPath=c(s,"rotateToPath",!1),this.pathRotationOffset=a(s,"rotationOffset",0);var f=a(s,"startAt",h);if(f&&(s.onStart=function(u){var v=u.data[0];v.progress=f,v.elapsed=v.duration*f;var g=v.ease(v.progress);v.current=v.start+(v.end-v.start)*g,v.setTargetValue()}),this.pathOffset||(this.pathOffset=new n(this.x,this.y)),this.pathVector||(this.pathVector=new n),this.pathDelta||(this.pathDelta=new n),this.pathDelta.reset(),s.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(s),this.path.getStartPoint(this.pathOffset),o&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=r.PLAYING_FORWARD,this.rotateToPath){var l=this.path.getPoint(.1);this.rotation=Math.atan2(l.y-this.y,l.x-this.x)+d(this.pathRotationOffset)}return this.pathConfig=s,this},pauseFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.pause(),this},resumeFollow:function(){var s=this.pathTween;return s&&s.isPaused()&&s.resume(),this},stopFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this},pathUpdate:function(){var s=this.pathTween;if(s&&s.data){var h=s.data[0],i=this.pathDelta,o=this.pathVector;if(i.copy(o).negate(),h.state===r.COMPLETE){this.path.getPoint(h.end,o),i.add(o),o.add(this.pathOffset),this.setPosition(o.x,o.y);return}else if(h.state!==r.PLAYING_FORWARD&&h.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(s.getValue(),o),i.add(o),o.add(this.pathOffset);var f=this.x,l=this.y;this.setPosition(o.x,o.y);var u=this.x-f,v=this.y-l;if(u===0&&v===0)return;if(h.state!==this._prevDirection){this._prevDirection=h.state;return}this.rotateToPath&&(this.rotation=Math.atan2(v,u)+d(this.pathRotationOffset))}}};p.exports=e},72699:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62644),c={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(a){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){a===void 0&&(a=n.default);var e=n.get(a);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(a,r,n){var e=this.scene.sys.renderer;if(!e)return this;var s=e.pipelines;if(s){var h=s.get(a);h&&(this.pipeline=h),r&&(this.pipelineData=n?d(r):r)}return this},setPipelineData:function(a,r){var n=this.pipelineData;return r===void 0?delete n[a]:n[a]=r,this},resetPipeline:function(a){return a===void 0&&(a=!1),this.pipeline=this.defaultPipeline,a&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};p.exports=c},17581:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62644),c=t(47059),a=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new c(this,!0),n&&(this.preFX=new c(this,!1))},setPostPipeline:function(n,e,s){var h=this.scene.sys.renderer;if(!h)return this;var i=h.pipelines;if(i){Array.isArray(n)||(n=[n]);for(var o=0;o0,this},setPostPipelineData:function(n,e){var s=this.postPipelineData;return e===void 0?delete s[n]:s[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,h=[],i=0;i=0;h--){var i=s[h];(e&&i.name===n||!e&&i===n)&&(i.destroy(),a(s,h))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};p.exports=r},80227:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,d){return d===void 0&&(d=t),this.scrollFactorX=t,this.scrollFactorY=d,this}};p.exports=S},16736:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S},37726:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(4327),c=8,a={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,s){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,s)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};p.exports=a},79812:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(4327),c=8,a={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,s){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,s,this.flipX,this.flipY);else{var h=r;this.frame.setCropUVs(this._crop,h.x,h.y,h.width,h.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(r,n){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=a},27472:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,d,c,a){return t===void 0&&(t=16777215),d===void 0&&(d=t,c=t,a=t),this.tintTopLeft=t,this.tintTopRight=d,this.tintBottomLeft=c,this.tintBottomRight=a,this.tintFill=!1,this},setTintFill:function(t,d,c,a){return this.setTint(t,d,c,a),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};p.exports=S},53774:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(d.textureKey=t.texture.key,d.frameKey=t.frame.name),d};p.exports=S},16901:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=t(61340),a=t(85955),r=t(86554),n=t(30954),e=t(26099),s=4,h={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(i){this._scaleX=i,this._scaleY=i,i===0?this.renderFlags&=~s:this.renderFlags|=s}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~s:this._scaleY!==0&&(this.renderFlags|=s)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~s:this._scaleX!==0&&(this.renderFlags|=s)}},angle:{get:function(){return n(this._rotation*d.RAD_TO_DEG)},set:function(i){this.rotation=n(i)*d.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=r(i)}},setPosition:function(i,o,f,l){return i===void 0&&(i=0),o===void 0&&(o=i),f===void 0&&(f=0),l===void 0&&(l=0),this.x=i,this.y=o,this.z=f,this.w=l,this},copyPosition:function(i){return i.x!==void 0&&(this.x=i.x),i.y!==void 0&&(this.y=i.y),i.z!==void 0&&(this.z=i.z),i.w!==void 0&&(this.w=i.w),this},setRandomPosition:function(i,o,f,l){return i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=this.scene.sys.scale.width),l===void 0&&(l=this.scene.sys.scale.height),this.x=i+Math.random()*f,this.y=o+Math.random()*l,this},setRotation:function(i){return i===void 0&&(i=0),this.rotation=i,this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,this},setScale:function(i,o){return i===void 0&&(i=1),o===void 0&&(o=i),this.scaleX=i,this.scaleY=o,this},setX:function(i){return i===void 0&&(i=0),this.x=i,this},setY:function(i){return i===void 0&&(i=0),this.y=i,this},setZ:function(i){return i===void 0&&(i=0),this.z=i,this},setW:function(i){return i===void 0&&(i=0),this.w=i,this},getLocalTransformMatrix:function(i){return i===void 0&&(i=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,o){i===void 0&&(i=new c);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(i);for(o||(o=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)o.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),o.multiply(i,i),f=f.parentContainer;return i},getLocalPoint:function(i,o,f,l){f||(f=new e),l||(l=this.scene.sys.cameras.main);var u=l.scrollX,v=l.scrollY,g=i+u*this.scrollFactorX-u,x=o+v*this.scrollFactorY-v;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(g,x,f):a(g,x,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var i=0,o=this.parentContainer;o;)i+=o.rotation,o=o.parentContainer;return i}};p.exports=h},61340:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(36383),a=t(26099),r=new d({initialize:function(e,s,h,i,o,f){e===void 0&&(e=1),s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=1),o===void 0&&(o=0),f===void 0&&(f=0),this.matrix=new Float32Array([e,s,h,i,o,f,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(n){this.matrix[0]=n}},b:{get:function(){return this.matrix[1]},set:function(n){this.matrix[1]=n}},c:{get:function(){return this.matrix[2]},set:function(n){this.matrix[2]=n}},d:{get:function(){return this.matrix[3]},set:function(n){this.matrix[3]=n}},e:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},f:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},tx:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},ty:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var n=this.matrix,e=n[0],s=n[1],h=n[2],i=n[3];return e||s?s>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):h||i?c.TAU-(i>0?Math.acos(-h/this.scaleY):-Math.acos(h/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var n=this.matrix;return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,this},translate:function(n,e){var s=this.matrix;return s[4]=s[0]*n+s[2]*e+s[4],s[5]=s[1]*n+s[3]*e+s[5],this},scale:function(n,e){var s=this.matrix;return s[0]*=n,s[1]*=n,s[2]*=e,s[3]*=e,this},rotate:function(n){var e=Math.sin(n),s=Math.cos(n),h=this.matrix,i=h[0],o=h[1],f=h[2],l=h[3];return h[0]=i*s+f*e,h[1]=o*s+l*e,h[2]=i*-e+f*s,h[3]=o*-e+l*s,this},multiply:function(n,e){var s=this.matrix,h=n.matrix,i=s[0],o=s[1],f=s[2],l=s[3],u=s[4],v=s[5],g=h[0],x=h[1],m=h[2],y=h[3],T=h[4],E=h[5],C=e===void 0?s:e.matrix;return C[0]=g*i+x*f,C[1]=g*o+x*l,C[2]=m*i+y*f,C[3]=m*o+y*l,C[4]=T*i+E*f+u,C[5]=T*o+E*l+v,C},multiplyWithOffset:function(n,e,s){var h=this.matrix,i=n.matrix,o=h[0],f=h[1],l=h[2],u=h[3],v=h[4],g=h[5],x=e*o+s*l+v,m=e*f+s*u+g,y=i[0],T=i[1],E=i[2],C=i[3],A=i[4],P=i[5];return h[0]=y*o+T*l,h[1]=y*f+T*u,h[2]=E*o+C*l,h[3]=E*f+C*u,h[4]=A*o+P*l+x,h[5]=A*f+P*u+m,this},transform:function(n,e,s,h,i,o){var f=this.matrix,l=f[0],u=f[1],v=f[2],g=f[3],x=f[4],m=f[5];return f[0]=n*l+e*v,f[1]=n*u+e*g,f[2]=s*l+h*v,f[3]=s*u+h*g,f[4]=i*l+o*v+x,f[5]=i*u+o*g+m,this},transformPoint:function(n,e,s){s===void 0&&(s={x:0,y:0});var h=this.matrix,i=h[0],o=h[1],f=h[2],l=h[3],u=h[4],v=h[5];return s.x=n*i+e*f+u,s.y=n*o+e*l+v,s},invert:function(){var n=this.matrix,e=n[0],s=n[1],h=n[2],i=n[3],o=n[4],f=n[5],l=e*i-s*h;return n[0]=i/l,n[1]=-s/l,n[2]=-h/l,n[3]=e/l,n[4]=(h*f-i*o)/l,n[5]=-(e*f-s*o)/l,this},copyFrom:function(n){var e=this.matrix;return e[0]=n.a,e[1]=n.b,e[2]=n.c,e[3]=n.d,e[4]=n.e,e[5]=n.f,this},copyFromArray:function(n){var e=this.matrix;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],this},copyToContext:function(n){var e=this.matrix;return n.transform(e[0],e[1],e[2],e[3],e[4],e[5]),n},setToContext:function(n){return n.setTransform(this),n},copyToArray:function(n){var e=this.matrix;return n===void 0?n=[e[0],e[1],e[2],e[3],e[4],e[5]]:(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5]),n},setTransform:function(n,e,s,h,i,o){var f=this.matrix;return f[0]=n,f[1]=e,f[2]=s,f[3]=h,f[4]=i,f[5]=o,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,s=e[0],h=e[1],i=e[2],o=e[3],f=s*o-h*i;if(n.translateX=e[4],n.translateY=e[5],s||h){var l=Math.sqrt(s*s+h*h);n.rotation=h>0?Math.acos(s/l):-Math.acos(s/l),n.scaleX=l,n.scaleY=f/l}else if(i||o){var u=Math.sqrt(i*i+o*o);n.rotation=Math.PI*.5-(o>0?Math.acos(-i/u):-Math.acos(i/u)),n.scaleX=f/u,n.scaleY=u}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,s,h,i){var o=this.matrix,f=Math.sin(s),l=Math.cos(s);return o[4]=n,o[5]=e,o[0]=l*h,o[1]=f*h,o[2]=-f*i,o[3]=l*i,this},applyInverse:function(n,e,s){s===void 0&&(s=new a);var h=this.matrix,i=h[0],o=h[1],f=h[2],l=h[3],u=h[4],v=h[5],g=1/(i*l+f*-o);return s.x=l*g*n+-f*g*e+(v*f-u*l)*g,s.y=i*g*e+-o*g*n+(-v*i+u*o)*g,s},setQuad:function(n,e,s,h,i,o){i===void 0&&(i=!1),o===void 0&&(o=this.quad);var f=this.matrix,l=f[0],u=f[1],v=f[2],g=f[3],x=f[4],m=f[5];return i?(o[0]=Math.round(n*l+e*v+x),o[1]=Math.round(n*u+e*g+m),o[2]=Math.round(n*l+h*v+x),o[3]=Math.round(n*u+h*g+m),o[4]=Math.round(s*l+h*v+x),o[5]=Math.round(s*u+h*g+m),o[6]=Math.round(s*l+e*v+x),o[7]=Math.round(s*u+e*g+m)):(o[0]=n*l+e*v+x,o[1]=n*u+e*g+m,o[2]=n*l+h*v+x,o[3]=n*u+h*g+m,o[4]=s*l+h*v+x,o[5]=s*u+h*g+m,o[6]=s*l+e*v+x,o[7]=s*u+e*g+m),o},getX:function(n,e){return n*this.a+e*this.c+this.e},getY:function(n,e){return n*this.b+e*this.d+this.f},getXRound:function(n,e,s){var h=this.getX(n,e);return s&&(h=Math.round(h)),h},getYRound:function(n,e,s){var h=this.getY(n,e);return s&&(h=Math.round(h)),h},getCSSMatrix:function(){var n=this.matrix;return"matrix("+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});p.exports=r},59715:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=S):(this._visible=!1,this.renderFlags&=~S)}},setVisible:function(d){return this.visible=d,this}};p.exports=t},31401:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Alpha:t(16005),AlphaSingle:t(88509),BlendMode:t(90065),ComputedSize:t(94215),Crop:t(61683),Depth:t(89272),Flip:t(54434),FX:t(47059),GetBounds:t(8004),Mask:t(8573),Origin:t(27387),PathFollower:t(37640),Pipeline:t(72699),PostPipeline:t(17581),ScrollFactor:t(80227),Size:t(16736),Texture:t(37726),TextureCrop:t(79812),Tint:t(27472),ToJSON:t(53774),Transform:t(16901),TransformMatrix:t(61340),Visible:t(59715)}},31559:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37105),c=t(10312),a=t(83419),r=t(31401),n=t(51708),e=t(95643),s=t(87841),h=t(29959),i=t(36899),o=t(26099),f=new a({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,h],initialize:function(u,v,g,x){e.call(this,u,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._sortKey="",this._sysEvents=u.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(v,g),this.setBlendMode(c.SKIP_CHECK),x&&this.add(x)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(l){return l===void 0&&(l=!0),this.exclusive=l,this},getBounds:function(l){if(l===void 0&&(l=new s),l.setTo(this.x,this.y,0,0),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix(),v=u.transformPoint(this.x,this.y);l.setTo(v.x,v.y,0,0)}if(this.list.length>0){var g=this.list,x=new s,m=!1;l.setEmpty();for(var y=0;y-1},setAll:function(l,u,v,g){return d.SetAll(this.list,l,u,v,g),this},each:function(l,u){var v=[null],g,x=this.list.slice(),m=x.length;for(g=2;g0?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}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(l){d.Remove(this.list,l),this.exclusive&&(l.parentContainer=null,l.removedFromScene())}});p.exports=f},53584:p=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c.addToRenderList(d);var r=d.list;if(r.length!==0){var n=d.localTransform;a?(n.loadIdentity(),n.multiply(a),n.translate(d.x,d.y),n.rotate(d.rotation),n.scale(d.scaleX,d.scaleY)):n.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var e=d.blendMode!==-1;e||t.setBlendMode(0);var s=d._alpha,h=d.scrollFactorX,i=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var o=0;o{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(31559),a=t(44603),r=t(23568),n=t(95540);a.register("container",function(e,s){e===void 0&&(e={});var h=r(e,"x",0),i=r(e,"y",0),o=n(e,"children",null),f=new c(this.scene,h,i,o);return s!==void 0&&(e.add=s),d(this.scene,f,e),f})},24961:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(31559),c=t(39429);c.register("container",function(a,r,n){return this.displayList.add(new d(this.scene,a,r,n))})},29959:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(72249),a=t(53584),p.exports={renderWebGL:c,renderCanvas:a}},72249:p=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c.addToRenderList(d);var r=d.list,n=r.length;if(n!==0){var e=d.localTransform;a?(e.loadIdentity(),e.multiply(a),e.translate(d.x,d.y),e.rotate(d.rotation),e.scale(d.scaleX,d.scaleY)):e.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),t.pipelines.preBatch(d);var s=d.blendMode!==-1;s||t.setBlendMode(0);for(var h=d.alpha,i=d.scrollFactorX,o=d.scrollFactorY,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(441),r=t(95643),n=t(41212),e=t(35846),s=t(44594),h=t(61369),i=new d({Extends:r,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Origin,c.ScrollFactor,c.Transform,c.Visible,a],initialize:function(f,l,u,v,g,x){r.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new h,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(l,u),typeof v=="string"?v[0]==="#"?this.setElement(v.substr(1),g,x):this.createElement(v,g,x):v&&this.setElement(v,g,x),f.sys.events.on(s.SLEEP,this.handleSceneEvent,this),f.sys.events.on(s.WAKE,this.handleSceneEvent,this),f.sys.events.on(s.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(o){var f=this.node,l=f.style;f&&(l.display=o.settings.visible?"block":"none")},setSkew:function(o,f){return o===void 0&&(o=0),f===void 0&&(f=o),this.skewX=o,this.skewY=f,this},setPerspective:function(o){return this.parent.style.perspective=o+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(o){this.parent.style.perspective=o+"px"}},addListener:function(o){if(this.node){o=o.split(" ");for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47407),c=t(95643),a=t(61340),r=new a,n=new a,e=new a,s=function(h,i,o,f){if(i.node){var l=i.node.style,u=i.scene.sys.settings;if(!l||!u.visible||c.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&o.id||i.parentContainer&&!i.parentContainer.willRender()){l.display="none";return}var v=i.parentContainer,g=o.alpha*i.alpha;v&&(g*=v.alpha);var x=r,m=n,y=e,T=0,E=0,C="0%",A="0%";f?(T=i.width*i.scaleX*i.originX,E=i.height*i.scaleY*i.originY,m.applyITRS(i.x-T,i.y-E,i.rotation,i.scaleX,i.scaleY),x.copyFrom(o.matrix),x.multiplyWithOffset(f,-o.scrollX*i.scrollFactorX,-o.scrollY*i.scrollFactorY),m.e=i.x-T,m.f=i.y-E,x.multiply(m,y)):(T=i.width*i.originX,E=i.height*i.originY,m.applyITRS(i.x-T,i.y-E,i.rotation,i.scaleX,i.scaleY),x.copyFrom(o.matrix),C=100*i.originX+"%",A=100*i.originY+"%",m.e-=o.scrollX*i.scrollFactorX,m.f-=o.scrollY*i.scrollFactorY,x.multiply(m,y)),i.transformOnly||(l.display="block",l.opacity=g,l.zIndex=i._depth,l.pointerEvents=i.pointerEvents,l.mixBlendMode=d[i._blendMode]),l.transform=y.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",l.transformOrigin=C+" "+A}};p.exports=s},2611:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(3069),c=t(39429);c.register("dom",function(a,r,n,e,s){var h=new d(this.scene,a,r,n,e,s);return this.displayList.add(h),h})},441:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(49381),a=t(49381),p.exports={renderWebGL:c,renderCanvas:a}},62980:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addedtoscene"},41337:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},44947:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedfromscene"},49358:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},35163:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="created"},97249:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="error"},19483:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="locked"},56059:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},26772:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="metadata"},64437:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="playing"},83411:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="play"},75780:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seeked"},67799:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seeking"},63500:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stalled"},55541:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},53208:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="textureready"},4992:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unlocked"},12:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unsupported"},51708:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADDED_TO_SCENE:t(62980),DESTROY:t(41337),REMOVED_FROM_SCENE:t(44947),VIDEO_COMPLETE:t(49358),VIDEO_CREATED:t(35163),VIDEO_ERROR:t(97249),VIDEO_LOCKED:t(19483),VIDEO_LOOP:t(56059),VIDEO_METADATA:t(26772),VIDEO_PLAY:t(83411),VIDEO_PLAYING:t(64437),VIDEO_SEEKED:t(75780),VIDEO_SEEKING:t(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}},42421:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(95643),r=t(64993),n=new d({Extends:a,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.Origin,c.ScrollFactor,c.Size,c.Texture,c.Tint,c.Transform,c.Visible,r],initialize:function(s){a.call(this,s,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});p.exports=n},70217:()=>{},56315:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42421),c=t(39429);c.register("extern",function(){var a=new d(this.scene);return this.displayList.add(a),a})},64993:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(80287),a=t(70217),p.exports={renderWebGL:c,renderCanvas:a}},80287:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=function(a,r,n,e){a.pipelines.clear();var s=d(r,n,e).calc;r.render.call(r,a,n,s),a.pipelines.rebind()};p.exports=c},85592:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71911),c=t(83419),a=t(85592),r=t(31401),n=t(8497),e=t(95643),s=t(95540),h=t(35154),i=t(36383),o=t(84503),f=new c({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,o],initialize:function(u,v){var g=h(v,"x",0),x=h(v,"y",0);e.call(this,u,"Graphics"),this.setPosition(g,x),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(v)},setDefaultStyles:function(l){return h(l,"lineStyle",null)&&(this.defaultStrokeWidth=h(l,"lineStyle.width",1),this.defaultStrokeColor=h(l,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(l,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(l,"fillStyle",null)&&(this.defaultFillColor=h(l,"fillStyle.color",16777215),this.defaultFillAlpha=h(l,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(l,u,v){return v===void 0&&(v=1),this.commandBuffer.push(a.LINE_STYLE,l,u,v),this._lineWidth=l,this},fillStyle:function(l,u){return u===void 0&&(u=1),this.commandBuffer.push(a.FILL_STYLE,l,u),this},fillGradientStyle:function(l,u,v,g,x,m,y,T){return x===void 0&&(x=1),m===void 0&&(m=x),y===void 0&&(y=x),T===void 0&&(T=x),this.commandBuffer.push(a.GRADIENT_FILL_STYLE,x,m,y,T,l,u,v,g),this},lineGradientStyle:function(l,u,v,g,x,m){return m===void 0&&(m=1),this.commandBuffer.push(a.GRADIENT_LINE_STYLE,l,m,u,v,g,x),this},beginPath:function(){return this.commandBuffer.push(a.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(a.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(a.FILL_PATH),this},fill:function(){return this.commandBuffer.push(a.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(a.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(a.STROKE_PATH),this},fillCircleShape:function(l){return this.fillCircle(l.x,l.y,l.radius)},strokeCircleShape:function(l){return this.strokeCircle(l.x,l.y,l.radius)},fillCircle:function(l,u,v){return this.beginPath(),this.arc(l,u,v,0,i.PI2),this.fillPath(),this},strokeCircle:function(l,u,v){return this.beginPath(),this.arc(l,u,v,0,i.PI2),this.strokePath(),this},fillRectShape:function(l){return this.fillRect(l.x,l.y,l.width,l.height)},strokeRectShape:function(l){return this.strokeRect(l.x,l.y,l.width,l.height)},fillRect:function(l,u,v,g){return this.commandBuffer.push(a.FILL_RECT,l,u,v,g),this},strokeRect:function(l,u,v,g){var x=this._lineWidth/2,m=l-x,y=l+x;return this.beginPath(),this.moveTo(l,u),this.lineTo(l,u+g),this.strokePath(),this.beginPath(),this.moveTo(l+v,u),this.lineTo(l+v,u+g),this.strokePath(),this.beginPath(),this.moveTo(m,u),this.lineTo(y+v,u),this.strokePath(),this.beginPath(),this.moveTo(m,u+g),this.lineTo(y+v,u+g),this.strokePath(),this},fillRoundedRect:function(l,u,v,g,x){x===void 0&&(x=20);var m=x,y=x,T=x,E=x;typeof x!="number"&&(m=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),E=s(x,"br",20));var C=m>=0,A=y>=0,P=T>=0,M=E>=0;return m=Math.abs(m),y=Math.abs(y),T=Math.abs(T),E=Math.abs(E),this.beginPath(),this.moveTo(l+m,u),this.lineTo(l+v-y,u),A?this.arc(l+v-y,u+y,y,-i.TAU,0):this.arc(l+v,u,y,Math.PI,i.TAU,!0),this.lineTo(l+v,u+g-E),M?this.arc(l+v-E,u+g-E,E,0,i.TAU):this.arc(l+v,u+g,E,-i.TAU,Math.PI,!0),this.lineTo(l+T,u+g),P?this.arc(l+T,u+g-T,T,i.TAU,Math.PI):this.arc(l,u+g,T,0,-i.TAU,!0),this.lineTo(l,u+m),C?this.arc(l+m,u+m,m,-Math.PI,-i.TAU):this.arc(l,u,m,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(l,u,v,g,x){x===void 0&&(x=20);var m=x,y=x,T=x,E=x,C=Math.min(v,g)/2;typeof x!="number"&&(m=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),E=s(x,"br",20));var A=m>=0,P=y>=0,M=T>=0,F=E>=0;return m=Math.min(Math.abs(m),C),y=Math.min(Math.abs(y),C),T=Math.min(Math.abs(T),C),E=Math.min(Math.abs(E),C),this.beginPath(),this.moveTo(l+m,u),this.lineTo(l+v-y,u),this.moveTo(l+v-y,u),P?this.arc(l+v-y,u+y,y,-i.TAU,0):this.arc(l+v,u,y,Math.PI,i.TAU,!0),this.lineTo(l+v,u+g-E),this.moveTo(l+v,u+g-E),F?this.arc(l+v-E,u+g-E,E,0,i.TAU):this.arc(l+v,u+g,E,-i.TAU,Math.PI,!0),this.lineTo(l+T,u+g),this.moveTo(l+T,u+g),M?this.arc(l+T,u+g-T,T,i.TAU,Math.PI):this.arc(l,u+g,T,0,-i.TAU,!0),this.lineTo(l,u+m),this.moveTo(l,u+m),A?this.arc(l+m,u+m,m,-Math.PI,-i.TAU):this.arc(l,u,m,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(l,u){return this.fillPoint(l.x,l.y,u)},fillPoint:function(l,u,v){return!v||v<1?v=1:(l-=v/2,u-=v/2),this.commandBuffer.push(a.FILL_RECT,l,u,v,v),this},fillTriangleShape:function(l){return this.fillTriangle(l.x1,l.y1,l.x2,l.y2,l.x3,l.y3)},strokeTriangleShape:function(l){return this.strokeTriangle(l.x1,l.y1,l.x2,l.y2,l.x3,l.y3)},fillTriangle:function(l,u,v,g,x,m){return this.commandBuffer.push(a.FILL_TRIANGLE,l,u,v,g,x,m),this},strokeTriangle:function(l,u,v,g,x,m){return this.commandBuffer.push(a.STROKE_TRIANGLE,l,u,v,g,x,m),this},strokeLineShape:function(l){return this.lineBetween(l.x1,l.y1,l.x2,l.y2)},lineBetween:function(l,u,v,g){return this.beginPath(),this.moveTo(l,u),this.lineTo(v,g),this.strokePath(),this},lineTo:function(l,u){return this.commandBuffer.push(a.LINE_TO,l,u),this},moveTo:function(l,u){return this.commandBuffer.push(a.MOVE_TO,l,u),this},strokePoints:function(l,u,v,g){u===void 0&&(u=!1),v===void 0&&(v=!1),g===void 0&&(g=l.length),this.beginPath(),this.moveTo(l[0].x,l[0].y);for(var x=1;x-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(l,u,v){var g=this.scene.sys,x=g.game.renderer;u===void 0&&(u=g.scale.width),v===void 0&&(v=g.scale.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,u,v),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y;var m,y,T={willReadFrequently:!0};if(typeof l=="string")if(g.textures.exists(l)){m=g.textures.get(l);var E=m.getSourceImage();E instanceof HTMLCanvasElement&&(y=E.getContext("2d",T))}else m=g.textures.createCanvas(l,u,v),y=m.getSourceImage().getContext("2d",T);else l instanceof HTMLCanvasElement&&(y=l.getContext("2d",T));return y&&(this.renderCanvas(x,this,f.TargetCamera,null,y,!1),m&&m.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new d,p.exports=f},32768:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85592),c=t(20926),a=function(r,n,e,s,h,i){var o=n.commandBuffer,f=o.length,l=h||r.currentContext;if(!(f===0||!c(r,l,n,e,s))){e.addToRenderList(n);var u=1,v=1,g=0,x=0,m=1,y=0,T=0,E=0;l.beginPath();for(var C=0;C>>16,T=(g&65280)>>>8,E=g&255,l.strokeStyle="rgba("+y+","+T+","+E+","+u+")",l.lineWidth=m,C+=3;break;case d.FILL_STYLE:x=o[C+1],v=o[C+2],y=(x&16711680)>>>16,T=(x&65280)>>>8,E=x&255,l.fillStyle="rgba("+y+","+T+","+E+","+v+")",C+=2;break;case d.BEGIN_PATH:l.beginPath();break;case d.CLOSE_PATH:l.closePath();break;case d.FILL_PATH:i||l.fill();break;case d.STROKE_PATH:i||l.stroke();break;case d.FILL_RECT:i?l.rect(o[C+1],o[C+2],o[C+3],o[C+4]):l.fillRect(o[C+1],o[C+2],o[C+3],o[C+4]),C+=4;break;case d.FILL_TRIANGLE:l.beginPath(),l.moveTo(o[C+1],o[C+2]),l.lineTo(o[C+3],o[C+4]),l.lineTo(o[C+5],o[C+6]),l.closePath(),i||l.fill(),C+=6;break;case d.STROKE_TRIANGLE:l.beginPath(),l.moveTo(o[C+1],o[C+2]),l.lineTo(o[C+3],o[C+4]),l.lineTo(o[C+5],o[C+6]),l.closePath(),i||l.stroke(),C+=6;break;case d.LINE_TO:l.lineTo(o[C+1],o[C+2]),C+=2;break;case d.MOVE_TO:l.moveTo(o[C+1],o[C+2]),C+=2;break;case d.LINE_FX_TO:l.lineTo(o[C+1],o[C+2]),C+=5;break;case d.MOVE_FX_TO:l.moveTo(o[C+1],o[C+2]),C+=5;break;case d.SAVE:l.save();break;case d.RESTORE:l.restore();break;case d.TRANSLATE:l.translate(o[C+1],o[C+2]),C+=2;break;case d.SCALE:l.scale(o[C+1],o[C+2]),C+=2;break;case d.ROTATE:l.rotate(o[C+1]),C+=1;break;case d.GRADIENT_FILL_STYLE:C+=5;break;case d.GRADIENT_LINE_STYLE:C+=6;break}}l.restore()}};p.exports=a},87079:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44603),c=t(43831);d.register("graphics",function(a,r){a===void 0&&(a={}),r!==void 0&&(a.add=r);var n=new c(this.scene,a);return a.add&&this.scene.sys.displayList.add(n),n})},1201:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43831),c=t(39429);c.register("graphics",function(a){return this.displayList.add(new d(this.scene,a))})},84503:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(77545),a=t(32768),a=t(32768),p.exports={renderWebGL:c,renderCanvas:a}},77545:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85592),c=t(91296),a=t(61340),r=t(70554),n=function(o,f,l){this.x=o,this.y=f,this.width=l},e=function(o,f,l){this.points=[],this.pointsLength=1,this.points[0]=new n(o,f,l)},s=[],h=new a,i=function(o,f,l,u){if(f.commandBuffer.length!==0){l.addToRenderList(f);var v=o.pipelines.set(f.pipeline,f);o.pipelines.preBatch(f);for(var g=c(f,l,u).calc,x=h.loadIdentity(),m=f.commandBuffer,y=l.alpha*f.alpha,T=1,E=v.fillTint,C=v.strokeTint,A=0,P=0,M=0,F=.01,L=Math.PI*2,D,I=[],U=0,z=!0,w=null,G=r.getTintAppendFloatAlpha,R=0;R0&&(Q=-L+Q%L):Q>L?Q=L:Q<0&&(Q=L+Q%L),w===null&&(w=new e($+Math.cos(_)*tt,q+Math.sin(_)*tt,T),I.push(w),Z+=F);Z<1+j;)M=Q*Z+_,A=$+Math.cos(M)*tt,P=q+Math.sin(M)*tt,w.points.push(new n(A,P,T)),Z+=F;M=Q+_,A=$+Math.cos(M)*tt,P=q+Math.sin(M)*tt,w.points.push(new n(A,P,T));break}case d.FILL_RECT:{v.batchFillRect(m[++R],m[++R],m[++R],m[++R],x,g);break}case d.FILL_TRIANGLE:{v.batchFillTriangle(m[++R],m[++R],m[++R],m[++R],m[++R],m[++R],x,g);break}case d.STROKE_TRIANGLE:{v.batchStrokeTriangle(m[++R],m[++R],m[++R],m[++R],m[++R],m[++R],T,x,g);break}case d.LINE_TO:{w!==null?w.points.push(new n(m[++R],m[++R],T)):(w=new e(m[++R],m[++R],T),I.push(w));break}case d.MOVE_TO:{w=new e(m[++R],m[++R],T),I.push(w);break}case d.SAVE:{s.push(x.copyToArray());break}case d.RESTORE:{x.copyFromArray(s.pop());break}case d.TRANSLATE:{$=m[++R],q=m[++R],x.translate($,q);break}case d.SCALE:{$=m[++R],q=m[++R],x.scale($,q);break}case d.ROTATE:{x.rotate(m[++R]);break}}o.pipelines.postBatch(f)}};p.exports=i},26479:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61061),c=t(83419),a=t(51708),r=t(50792),n=t(46710),e=t(95540),s=t(35154),h=t(97022),i=t(41212),o=t(88492),f=t(35072),l=t(68287),u=new c({Extends:r,initialize:function(g,x,m){r.call(this),m?x&&!Array.isArray(x)&&(x=[x]):Array.isArray(x)?i(x[0])&&(m=x,x=null):i(x)&&(m=x,x=null),this.scene=g,this.children=new f,this.isParent=!0,this.type="Group",this.classType=e(m,"classType",l),this.name=e(m,"name",""),this.active=e(m,"active",!0),this.maxSize=e(m,"maxSize",-1),this.defaultKey=e(m,"defaultKey",null),this.defaultFrame=e(m,"defaultFrame",null),this.runChildUpdate=e(m,"runChildUpdate",!1),this.createCallback=e(m,"createCallback",null),this.removeCallback=e(m,"removeCallback",null),this.createMultipleCallback=e(m,"createMultipleCallback",null),this.internalCreateCallback=e(m,"internalCreateCallback",null),this.internalRemoveCallback=e(m,"internalRemoveCallback",null),x&&this.addMultiple(x),m&&this.createMultiple(m),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(v,g,x,m,y,T){if(v===void 0&&(v=0),g===void 0&&(g=0),x===void 0&&(x=this.defaultKey),m===void 0&&(m=this.defaultFrame),y===void 0&&(y=!0),T===void 0&&(T=!0),this.isFull())return null;var E=new this.classType(this.scene,v,g,x,m);return E.addToDisplayList(this.scene.sys.displayList),E.addToUpdateList(),E.visible=y,E.setActive(T),this.add(E),E},createMultiple:function(v){if(this.isFull())return[];Array.isArray(v)||(v=[v]);var g=[];if(v[0].key)for(var x=0;x=0;M--)if(P=L[M],P.active===x){if(F++,F===g)break}else P=null;return P?(typeof y=="number"&&(P.x=y),typeof T=="number"&&(P.y=T),P):m?this.create(y,T,E,C,A):null},get:function(v,g,x,m,y){return this.getFirst(!1,!0,v,g,x,m,y)},getFirstAlive:function(v,g,x,m,y,T){return this.getFirst(!0,v,g,x,m,y,T)},getFirstDead:function(v,g,x,m,y,T){return this.getFirst(!1,v,g,x,m,y,T)},playAnimation:function(v,g){return d.PlayAnimation(this.children.entries,v,g),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(v){v===void 0&&(v=!0);for(var g=0,x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44603),c=t(26479);d.register("group",function(a){return new c(this.scene,null,a)})},3385:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26479),c=t(39429);c.register("group",function(a,r){return this.updateList.add(new d(this.scene,a,r))})},88571:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(95643),r=t(59819),n=new d({Extends:a,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.TextureCrop,c.Tint,c.Transform,c.Visible,r],initialize:function(s,h,i,o,f){a.call(this,s,"Image"),this._crop=this.resetCropObject(),this.setTexture(o,f),this.setPosition(h,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=n},40652:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c.addToRenderList(d),t.batchSprite(d,d.frame,c,a)};p.exports=S},82459:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(88571);c.register("image",function(n,e){n===void 0&&(n={});var s=a(n,"key",null),h=a(n,"frame",null),i=new r(this.scene,0,0,s,h);return e!==void 0&&(n.add=e),d(this.scene,i,n),i})},2117:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88571),c=t(39429);c.register("image",function(a,r,n,e){return this.displayList.add(new d(this.scene,a,r,n,e))})},59819:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(99517),a=t(40652),p.exports={renderWebGL:c,renderCanvas:a}},99517:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c.addToRenderList(d),this.pipeline.batchSprite(d,c,a)};p.exports=S},77856:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={Events:t(51708),DisplayList:t(8050),GameObjectCreator:t(44603),GameObjectFactory:t(39429),UpdateList:t(45027),Components:t(31401),GetCalcMatrix:t(91296),BuildGameObject:t(25305),BuildGameObjectAnimation:t(13059),GameObject:t(95643),BitmapText:t(22186),Blitter:t(6107),Bob:t(46590),Container:t(31559),DOMElement:t(3069),DynamicBitmapText:t(2638),Extern:t(42421),Graphics:t(43831),Group:t(26479),Image:t(88571),Layer:t(93595),Particles:t(18404),PathFollower:t(1159),RenderTexture:t(591),RetroFont:t(196),Rope:t(77757),Sprite:t(68287),Text:t(50171),GetTextSize:t(14220),MeasureText:t(79557),TextStyle:t(35762),TileSprite:t(20839),Zone:t(41481),Video:t(18471),Shape:t(17803),Arc:t(23629),Curve:t(89),Ellipse:t(19921),Grid:t(30479),IsoBox:t(61475),IsoTriangle:t(16933),Line:t(57847),Polygon:t(24949),Rectangle:t(74561),Star:t(55911),Triangle:t(36931),Factories:{Blitter:t(12709),Container:t(24961),DOMElement:t(2611),DynamicBitmapText:t(72566),Extern:t(56315),Graphics:t(1201),Group:t(3385),Image:t(2117),Layer:t(20005),Particles:t(676),PathFollower:t(90145),RenderTexture:t(60505),Rope:t(96819),Sprite:t(46409),StaticBitmapText:t(34914),Text:t(68005),TileSprite:t(91681),Zone:t(84175),Video:t(89025),Arc:t(42563),Curve:t(40511),Ellipse:t(1543),Grid:t(34137),IsoBox:t(3933),IsoTriangle:t(49803),Line:t(2481),Polygon:t(64827),Rectangle:t(87959),Star:t(93697),Triangle:t(45245)},Creators:{Blitter:t(9403),Container:t(77143),DynamicBitmapText:t(11164),Graphics:t(87079),Group:t(94975),Image:t(82459),Layer:t(25179),Particles:t(92730),RenderTexture:t(34495),Rope:t(26209),Sprite:t(15567),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};d.Shader=t(20071),d.Mesh=t(4703),d.NineSlice=t(28103),d.PointLight=t(80321),d.Plane=t(33663),d.Factories.Shader=t(74177),d.Factories.Mesh=t(9225),d.Factories.NineSlice=t(47521),d.Factories.PointLight=t(71255),d.Factories.Plane=t(30985),d.Creators.Shader=t(54935),d.Creators.Mesh=t(20527),d.Creators.NineSlice=t(28279),d.Creators.PointLight=t(39829),d.Creators.Plane=t(56015),d.Light=t(41432),d.LightsManager=t(61356),d.LightsPlugin=t(88992),p.exports=d},93595:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c=t(83419),a=t(31401),r=t(53774),n=t(45893),e=t(50792),s=t(51708),h=t(73162),i=t(33963),o=t(44594),f=t(19186),l=new c({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.PostPipeline,a.Visible,e,i],initialize:function(v,g){h.call(this,v),e.call(this),this.scene=v,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=v.sys,this.events=v.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),g&&this.add(g),v.sys.queueDepthSort()},setActive:function(u){return this.active=u,this},setName:function(u){return this.name=u,this},setState:function(u){return this.state=u,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(u,v){return this.data||(this.data=new n(this)),this.data.set(u,v),this},incData:function(u,v){return this.data||(this.data=new n(this)),this.data.inc(u,v),this},toggleData:function(u){return this.data||(this.data=new n(this)),this.data.toggle(u),this},getData:function(u){return this.data||(this.data=new n(this)),this.data.get(u)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(u){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&u.id)},getIndexList:function(){for(var u=this,v=this.parentContainer,g=[];v&&(g.unshift(v.getIndex(u)),u=v,v.parentContainer);)v=v.parentContainer;return g.unshift(this.displayList.getIndex(u)),g},addChildCallback:function(u){var v=u.displayList;v&&v!==this&&u.removeFromDisplayList(),u.displayList||(this.queueDepthSort(),u.displayList=this,u.emit(s.ADDED_TO_SCENE,u,this.scene),this.events.emit(o.ADDED_TO_SCENE,u,this.scene))},removeChildCallback:function(u){this.queueDepthSort(),u.displayList=null,u.emit(s.REMOVED_FROM_SCENE,u,this.scene),this.events.emit(o.REMOVED_FROM_SCENE,u,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(u,v){return u._depth-v._depth},getChildren:function(){return this.list},addToDisplayList:function(u){return u===void 0&&(u=this.scene.sys.displayList),this.displayList&&this.displayList!==u&&this.removeFromDisplayList(),u.exists(this)||(this.displayList=u,u.add(this,!0),u.queueDepthSort(),this.emit(s.ADDED_TO_SCENE,this,this.scene),u.events.emit(o.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var u=this.displayList||this.scene.sys.displayList;return u.exists(this)&&(u.remove(this,!0),u.queueDepthSort(),this.displayList=null,this.emit(s.REMOVED_FROM_SCENE,this,this.scene),u.events.emit(o.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(u){if(!(!this.scene||this.ignoreDestroy)){this.emit(s.DESTROY,this);for(var v=this.list;v.length;)v[0].destroy(u);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});p.exports=l},2956:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=d.list;if(a.length!==0){d.depthSort();var r=d.blendMode!==-1;r||t.setBlendMode(0);var n=d._alpha;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(93595),a=t(44603),r=t(23568);a.register("layer",function(n,e){n===void 0&&(n={});var s=r(n,"children",null),h=new c(this.scene,s);return e!==void 0&&(n.add=e),d(this.scene,h,n),h})},20005:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93595),c=t(39429);c.register("layer",function(a){return this.displayList.add(new d(this.scene,a))})},33963:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(15869),a=t(2956),p.exports={renderWebGL:c,renderCanvas:a}},15869:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=d.list,r=a.length;if(r!==0){d.depthSort(),t.pipelines.preBatch(d);var n=d.blendMode!==-1;n||t.setBlendMode(0);for(var e=d.alpha,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(96503),c=t(83419),a=t(31401),r=t(51767),n=t(70554),e=new c({Extends:d,Mixins:[a.Origin,a.ScrollFactor,a.Transform,a.Visible],initialize:function(h,i,o,f,l,u,v){d.call(this,h,i,o),this.color=new r(f,l,u),this.intensity=v,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(o)},displayWidth:{get:function(){return this.diameter},set:function(s){this.diameter=s}},displayHeight:{get:function(){return this.diameter},set:function(s){this.diameter=s}},width:{get:function(){return this.diameter},set:function(s){this.diameter=s}},height:{get:function(){return this.diameter},set:function(s){this.diameter=s}},willRender:function(s){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&s.id)},setColor:function(s){var h=n.getFloatsFromUintRGB(s);return this.color.set(h[0],h[1],h[2]),this},setIntensity:function(s){return this.intensity=s,this},setRadius:function(s){return this.radius=s,this}});e.RENDER_MASK=15,p.exports=e},61356:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(81491),c=t(83419),a=t(20339),r=t(41432),n=t(80321),e=t(51767),s=t(19133),h=t(19186),i=t(70554),o=new c({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,l,u,v,g,x){return this.systems.displayList.add(new n(this.scene,f,l,u,v,g,x))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var l=this.lights,u=f.worldView,v=[],g=0;gthis.maxLights&&(h(v,this.sortByDistance),v=v.slice(0,this.maxLights)),this.visibleLights=v.length,v},sortByDistance:function(f,l){return f.distance>=l.distance},setAmbientColor:function(f){var l=i.getFloatsFromUintRGB(f);return this.ambientColor.set(l[0],l[1],l[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,l,u,v,g){f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=128),v===void 0&&(v=16777215),g===void 0&&(g=1);var x=i.getFloatsFromUintRGB(v),m=new r(f,l,u,x[0],x[1],x[2],g);return this.lights.push(m),m},removeLight:function(f){var l=this.lights.indexOf(f);return l>=0&&s(this.lights,l),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});p.exports=o},88992:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(61356),a=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){this.scene=s,this.systems=s.sys,s.sys.settings.isBooted||s.sys.events.once(r.BOOT,this.boot,this),c.call(this)},boot:function(){var e=this.systems.events;e.on(r.SHUTDOWN,this.shutdown,this),e.on(r.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});a.register("LightsPlugin",n,"lights"),p.exports=n},4703:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(39506),r=t(83997),n=t(95643),e=t(34684),s=t(92515),h=t(91296),i=t(37867),o=t(29807),f=t(43396),l=t(19186),u=t(25836),v=t(39318),g=new d({Extends:n,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.Texture,c.Transform,c.Visible,o],initialize:function(m,y,T,E,C,A,P,M,F,L,D,I){y===void 0&&(y=0),T===void 0&&(T=0),E===void 0&&(E="__WHITE"),n.call(this,m,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new u,this.modelScale=new u(1,1,1),this.modelRotation=new u,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new u,this.viewMatrix=new i,this.projectionMatrix=new i,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var U=m.sys.renderer;this.setPosition(y,T),this.setTexture(E,C),this.setSize(U.width,U.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(U.width,U.height),A&&this.addVertices(A,P,M,F,L,D,I)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(x){return this.viewPosition.addScale(u.LEFT,x),this.dirtyCache[10]=1,this},panY:function(x){return this.viewPosition.y+=u.DOWN.y*x,this.dirtyCache[10]=1,this},panZ:function(x){return this.viewPosition.z+=x,this.dirtyCache[10]=1,this},setPerspective:function(x,m,y,T,E){return y===void 0&&(y=45),T===void 0&&(T=.01),E===void 0&&(E=1e3),this.fov=y,this.projectionMatrix.perspective(a(y),x/m,T,E),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(x,m,y,T){return x===void 0&&(x=this.scene.sys.renderer.getAspectRatio()),m===void 0&&(m=1),y===void 0&&(y=-1e3),T===void 0&&(T=1e3),this.fov=0,this.projectionMatrix.ortho(-x,x,-m,m,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(x){x.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(x,m,y,T,E,C,A,P,M){var F=this.scene.sys.cache.obj.get(x),L;return F&&(L=e(F,this,m,y,T,E,C,A,P,M)),(!L||L.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",x),this},sortByDepth:function(x,m){return x.depth-m.depth},depthSort:function(){return l(this.faces,this.sortByDepth),this},addVertex:function(x,m,y,T,E,C,A){var P=new v(x,m,y,T,E,C,A);return this.vertices.push(P),P},addFace:function(x,m,y){var T=new r(x,m,y);return this.faces.push(T),this.dirtyCache[9]=-1,T},addVertices:function(x,m,y,T,E,C,A){var P=s(x,m,y,T,E,C,A);return P?(this.faces=this.faces.concat(P.faces),this.vertices=this.vertices.concat(P.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(x){return this.faces[x]},hasFaceAt:function(x,m,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=h(this,y).calc,E=this.faces,C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},20527:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(35154),n=t(4703);c.register("mesh",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=a(e,"frame",null),o=r(e,"vertices",[]),f=r(e,"uvs",[]),l=r(e,"indicies",[]),u=r(e,"containsZ",!1),v=r(e,"normals",[]),g=r(e,"colors",16777215),x=r(e,"alphas",1),m=new n(this.scene,0,0,h,i,o,f,l,u,v,g,x);return s!==void 0&&(e.add=s),d(this.scene,m,e),m})},9225:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(4703),c=t(39429);c.register("mesh",function(a,r,n,e,s,h,i,o,f,l,u){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i,o,f,l,u))})},29807:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(48833),a=t(36488),p.exports={renderWebGL:c,renderCanvas:a}},48833:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=function(a,r,n,e){var s=r.faces,h=s.length;if(h!==0){n.addToRenderList(r);var i=a.pipelines.set(r.pipeline,r),o=d(r,n,e).calc;a.pipelines.preBatch(r);for(var f=i.setGameObject(r),l=i.vertexViewF32,u=i.vertexViewU32,v=i.vertexCount*i.currentShader.vertexComponentCount-1,g=r.tintFill,x=[],m=r.debugCallback,y=o.a,T=o.b,E=o.c,C=o.d,A=o.e,P=o.f,M=r.viewPosition.z,F=r.hideCCW,L=n.roundPixels,D=n.alpha*r.alpha,I=0,U=0;U{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(95643),r=t(78023),n=t(39318),e=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,r],initialize:function(h,i,o,f,l,u,v,g,x,m,y){a.call(this,h,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var T=h.textures.getFrame(f,l);this.is3Slice=!m&&!y,T.scale9&&(this.is3Slice=T.is3Slice);for(var E=this.is3Slice?18:54,C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(35154),n=t(28103);c.register("nineslice",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=a(e,"frame",null),o=r(e,"width",256),f=r(e,"height",256),l=r(e,"leftWidth",10),u=r(e,"rightWidth",10),v=r(e,"topHeight",0),g=r(e,"bottomHeight",0),x=new n(this.scene,0,0,h,i,o,f,l,u,v,g);return s!==void 0&&(e.add=s),d(this.scene,x,e),x})},47521:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28103),c=t(39429);c.register("nineslice",function(a,r,n,e,s,h,i,o,f,l){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i,o,f,l))})},78023:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(52230),p.exports={renderWebGL:c,renderCanvas:a}},52230:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(70554),a=function(r,n,e,s){var h=n.vertices,i=h.length;if(i!==0){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline,n),f=d(n,e,s,!1).calc;r.pipelines.preBatch(n);var l=o.setGameObject(n),u=o.vertexViewF32,v=o.vertexViewU32,g=o.vertexCount*o.currentShader.vertexComponentCount-1,x=e.roundPixels,m=n.tintFill,y=e.alpha*n.alpha,T=c.getTintAppendFloatAlpha(n.tint,y),E=o.vertexAvailable(),C=-1;E{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(44777),a=t(37589),r=t(6113),n=t(91389),e=t(90664),s=new d({Extends:c,initialize:function(i){c.call(this,i,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var h=this.propertyValue,i=h,o=this.defaultEmit,f=this.defaultUpdate;if(this.method===9){this.start=h[0],this.ease=r("Linear"),this.interpolation=n("linear"),o=this.easedValueEmit,f=this.easeValueUpdate,i=h[0],this.active=!0;for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30976),c=t(45319),a=t(83419),r=t(99472),n=t(6113),e=t(95540),s=t(91389),h=t(77720),i=t(15994),o=new a({initialize:function(l,u,v){v===void 0&&(v=!1),this.propertyKey=l,this.propertyValue=u,this.defaultValue=u,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=v,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(f,l){f===void 0&&(f={}),l&&(this.propertyKey=l),this.propertyValue=e(f,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(f){var l;switch(this.method){case 1:case 3:case 8:l=f;break;case 2:this.propertyValue.indexOf(f)>=0&&(l=f);break;case 4:var u=(this.end-this.start)/this.steps;l=h(f,u),this.counter=l;break;case 5:case 6:case 7:l=c(f,this.start,this.end);break;case 9:l=this.start[0];break}return this.current=l,this},getMethod:function(){var f=this.propertyValue;if(f===null)return 0;var l=typeof f;if(l==="number")return 1;if(Array.isArray(f))return 2;if(l==="function")return 3;if(l==="object"){if(this.hasBoth(f,"start","end"))return this.has(f,"steps")?4:5;if(this.hasBoth(f,"min","max"))return 6;if(this.has(f,"random"))return 7;if(this.hasEither(f,"onEmit","onUpdate"))return 8;if(this.hasEither(f,"values","interpolation"))return 9}return 0},setMethods:function(){var f=this.propertyValue,l=f,u=this.defaultEmit,v=this.defaultUpdate;switch(this.method){case 1:u=this.staticValueEmit;break;case 2:u=this.randomStaticValueEmit,l=f[0];break;case 3:this._onEmit=f,u=this.proxyEmit;break;case 4:this.start=f.start,this.end=f.end,this.steps=f.steps,this.counter=this.start,this.yoyo=this.has(f,"yoyo")?f.yoyo:!1,this.direction=0,u=this.steppedEmit,l=this.start;break;case 5:this.start=f.start,this.end=f.end;var g=this.has(f,"ease")?f.ease:"Linear";this.ease=n(g,f.easeParams),u=this.has(f,"random")&&f.random?this.randomRangedValueEmit:this.easedValueEmit,v=this.easeValueUpdate,l=this.start;break;case 6:this.start=f.min,this.end=f.max,u=this.has(f,"int")&&f.int?this.randomRangedIntEmit:this.randomRangedValueEmit,l=this.start;break;case 7:var x=f.random;Array.isArray(x)&&(this.start=x[0],this.end=x[1]),u=this.randomRangedIntEmit,l=this.start;break;case 8:this._onEmit=this.has(f,"onEmit")?f.onEmit:this.defaultEmit,this._onUpdate=this.has(f,"onUpdate")?f.onUpdate:this.defaultUpdate,u=this.proxyEmit,v=this.proxyUpdate;break;case 9:this.start=f.values;var m=this.has(f,"ease")?f.ease:"Linear";this.ease=n(m,f.easeParams),this.interpolation=s(f.interpolation),u=this.easedValueEmit,v=this.easeValueUpdate,l=this.start[0];break}return this.onEmit=u,this.onUpdate=v,this.current=l,this},has:function(f,l){return f.hasOwnProperty(l)},hasBoth:function(f,l,u){return f.hasOwnProperty(l)&&f.hasOwnProperty(u)},hasEither:function(f,l,u){return f.hasOwnProperty(l)||f.hasOwnProperty(u)},defaultEmit:function(f,l,u){return u},defaultUpdate:function(f,l,u,v){return v},proxyEmit:function(f,l,u){var v=this._onEmit(f,l,u);return this.current=v,v},proxyUpdate:function(f,l,u,v){var g=this._onUpdate(f,l,u,v);return this.current=g,g},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var f=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[f],this.current},randomRangedValueEmit:function(f,l){var u=r(this.start,this.end);return f&&f.data[l]&&(f.data[l].min=u,f.data[l].max=this.end),this.current=u,u},randomRangedIntEmit:function(f,l){var u=d(this.start,this.end);return f&&f.data[l]&&(f.data[l].min=u,f.data[l].max=this.end),this.current=u,u},steppedEmit:function(){var f=this.counter,l=f,u=(this.end-this.start)/this.steps;if(this.yoyo){var v;this.direction===0?(l+=u,l>=this.end&&(v=l-this.end,l=this.end-v,this.direction=1)):(l-=u,l<=this.start&&(v=this.start-l,l=this.start+v,this.direction=0)),this.counter=l}else this.counter=i(l+u,this.start,this.end);return this.current=f,f},easedValueEmit:function(f,l){if(f&&f.data[l]){var u=f.data[l];u.min=this.start,u.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(f,l,u){var v=f.data[l],g,x=this.ease(u);return this.interpolation?g=this.interpolation(this.start,x):g=(v.max-v.min)*x+v.min,this.current=g,g},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});p.exports=o},24502:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(20286),r=new d({Extends:a,initialize:function(e,s,h,i,o){if(typeof e=="object"){var f=e;e=c(f,"x",0),s=c(f,"y",0),h=c(f,"power",0),i=c(f,"epsilon",100),o=c(f,"gravity",50)}else e===void 0&&(e=0),s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=100),o===void 0&&(o=50);a.call(this,e,s,!0),this._gravity=o,this._power=h*o,this._epsilon=i*i},update:function(n,e){var s=this.x-n.x,h=this.y-n.y,i=s*s+h*h;if(i!==0){var o=Math.sqrt(i);i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(9674),c=t(45319),a=t(83419),r=t(39506),n=t(87841),e=t(11520),s=t(26099),h=new a({initialize:function(o){this.emitter=o,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new s,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=o.scene,this.anims=new d(this),this.bounds=new n},emit:function(i,o,f,l,u,v){return this.emitter.emit(i,o,f,l,u,v)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,o){i===void 0&&(i=0),o===void 0&&(o=0),this.x=i,this.y=o},fire:function(i,o){var f=this.emitter,l=f.ops,u=f.getAnim();if(u?this.anims.play(u):(this.frame=f.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(f.getEmitZone(this),i===void 0?this.x+=l.x.onEmit(this,"x"):l.x.steps>0?this.x+=i+l.x.onEmit(this,"x"):this.x+=i,o===void 0?this.y+=l.y.onEmit(this,"y"):l.y.steps>0?this.y+=o+l.y.onEmit(this,"y"):this.y+=o,this.life=l.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=l.delay.onEmit(this,"delay"),this.holdCurrent=l.hold.onEmit(this,"hold"),this.scaleX=l.scaleX.onEmit(this,"scaleX"),this.scaleY=l.scaleY.active?l.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=l.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),f.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&f.getDeathZone(this))return this.lifeCurrent=0,!1;var v=l.speedX.onEmit(this,"speedX"),g=l.speedY.active?l.speedY.onEmit(this,"speedY"):v;if(f.radial){var x=r(l.angle.onEmit(this,"angle"));this.velocityX=Math.cos(x)*Math.abs(v),this.velocityY=Math.sin(x)*Math.abs(g)}else if(f.moveTo){var m=l.moveToX.onEmit(this,"moveToX"),y=l.moveToY.onEmit(this,"moveToY"),T=this.life/1e3;this.velocityX=(m-this.x)/T,this.velocityY=(y-this.y)/T}else this.velocityX=v,this.velocityY=g;return f.acceleration&&(this.accelerationX=l.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=l.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=l.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=l.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=l.bounce.onEmit(this,"bounce"),this.alpha=l.alpha.onEmit(this,"alpha"),l.color.active?this.tint=l.color.onEmit(this,"tint"):this.tint=l.tint.onEmit(this,"tint"),!0},update:function(i,o,f){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=i,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=i,!1;this.anims.update(0,i);var l=this.emitter,u=l.ops,v=1-this.lifeCurrent/this.life;if(this.lifeT=v,this.x=u.x.onUpdate(this,"x",v,this.x),this.y=u.y.onUpdate(this,"y",v,this.y),l.moveTo){var g=u.moveToX.onUpdate(this,"moveToX",v,l.moveToX),x=u.moveToY.onUpdate(this,"moveToY",v,l.moveToY),m=this.lifeCurrent/1e3;this.velocityX=(g-this.x)/m,this.velocityY=(x-this.y)/m}return this.computeVelocity(l,i,o,f,v),this.scaleX=u.scaleX.onUpdate(this,"scaleX",v,this.scaleX),u.scaleY.active?this.scaleY=u.scaleY.onUpdate(this,"scaleY",v,this.scaleY):this.scaleY=this.scaleX,this.angle=u.rotate.onUpdate(this,"rotate",v,this.angle),this.rotation=r(this.angle),l.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=c(u.alpha.onUpdate(this,"alpha",v,this.alpha),0,1),u.color.active?this.tint=u.color.onUpdate(this,"color",v,this.tint):this.tint=u.tint.onUpdate(this,"tint",v,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,o,f,l,u){var v=i.ops,g=this.velocityX,x=this.velocityY,m=v.accelerationX.onUpdate(this,"accelerationX",u,this.accelerationX),y=v.accelerationY.onUpdate(this,"accelerationY",u,this.accelerationY),T=v.maxVelocityX.onUpdate(this,"maxVelocityX",u,this.maxVelocityX),E=v.maxVelocityY.onUpdate(this,"maxVelocityY",u,this.maxVelocityY);this.bounce=v.bounce.onUpdate(this,"bounce",u,this.bounce),g+=i.gravityX*f+m*f,x+=i.gravityY*f+y*f,g=c(g,-T,T),x=c(x,-E,E),this.velocityX=g,this.velocityY=x,this.x+=g*f,this.y+=x*f,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(20286),a=t(87841),r=new d({Extends:c,initialize:function(e,s,h,i,o,f,l,u){o===void 0&&(o=!0),f===void 0&&(f=!0),l===void 0&&(l=!0),u===void 0&&(u=!0),c.call(this,e,s,!0),this.bounds=new a(e,s,h,i),this.collideLeft=o,this.collideRight=f,this.collideTop=l,this.collideBottom=u},update:function(n){var e=this.bounds,s=-n.bounce,h=n.worldPosition;h.xe.right&&this.collideRight&&(n.x-=h.x-e.right,n.velocityX*=s),h.ye.bottom&&this.collideBottom&&(n.y-=h.y-e.bottom,n.velocityY*=s)}});p.exports=r},31600:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(53774),r=t(43459),n=t(26388),e=t(19909),s=t(76472),h=t(44777),i=t(20696),o=t(95643),f=t(95540),l=t(26546),u=t(24502),v=t(1985),g=t(97022),x=t(86091),m=t(73162),y=t(20074),T=t(56480),E=t(68875),C=t(87841),A=t(59996),P=t(72905),M=t(90668),F=t(19186),L=t(61340),D=t(26099),I=t(15994),U=t(69601),z=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],w=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],G=new d({Extends:o,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,M],initialize:function(O,B,N,X,V){o.call(this,O,"ParticleEmitter"),this.particleClass=T,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new s("color"),delay:new h("delay",0,!0),hold:new h("hold",0,!0),lifespan:new h("lifespan",1e3,!0),maxVelocityX:new h("maxVelocityX",1e4),maxVelocityY:new h("maxVelocityY",1e4),moveToX:new h("moveToX",0),moveToY:new h("moveToY",0),quantity:new h("quantity",1,!0),rotate:new h("rotate",0),scaleX:new h("scaleX",1),scaleY:new h("scaleY",1),speedX:new h("speedX",0,!0),speedY:new h("speedY",0,!0),tint:new h("tint",16777215),x:new h("x",0),y:new h("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new D,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new L,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new m(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(B,N),this.setTexture(X),V&&this.setConfig(V)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(R){if(!R)return this;var O=0,B="",N=this.ops;for(O=0;O=this.animQuantity&&(this.animCounter=0,this.currentAnim=I(this.currentAnim+1,0,O)),B},setAnim:function(R,O,B){O===void 0&&(O=!0),B===void 0&&(B=1),this.randomAnim=O,this.animQuantity=B,this.currentAnim=0;var N=typeof R;if(this.anims.length=0,Array.isArray(R))this.anims=this.anims.concat(R);else if(N==="string")this.anims.push(R);else if(N==="object"){var X=R;R=f(X,"anims",null),R&&(this.anims=this.anims.concat(R));var V=f(X,"cycle",!1);this.randomAnim=!V,this.animQuantity=f(X,"quantity",B)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(R){return R===void 0&&(R=!0),this.radial=R,this},addParticleBounds:function(R,O,B,N,X,V,Y,W){if(typeof R=="object"){var H=R;R=H.x,O=H.y,B=g(H,"w")?H.w:H.width,N=g(H,"h")?H.h:H.height}return this.addParticleProcessor(new U(R,O,B,N,X,V,Y,W))},setParticleSpeed:function(R,O){return O===void 0&&(O=R),this.ops.speedX.onChange(R),R===O?this.ops.speedY.active=!1:this.ops.speedY.onChange(O),this.radial=!0,this},setParticleScale:function(R,O){return R===void 0&&(R=1),O===void 0&&(O=R),this.ops.scaleX.onChange(R),this.ops.scaleY.onChange(O),this},setParticleGravity:function(R,O){return this.gravityX=R,this.gravityY=O,this},setParticleAlpha:function(R){return this.ops.alpha.onChange(R),this},setParticleTint:function(R){return this.ops.tint.onChange(R),this},setEmitterAngle:function(R){return this.ops.angle.onChange(R),this},setParticleLifespan:function(R){return this.ops.lifespan.onChange(R),this},setQuantity:function(R){return this.quantity=R,this},setFrequency:function(R,O){return this.frequency=R,this.flowCounter=R>0?R:0,O&&(this.quantity=O),this},addDeathZone:function(R){Array.isArray(R)||(R=[R]);for(var O,B=[],N=0;N-1&&(this.zoneTotal++,this.zoneTotal===N.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===B&&(this.zoneIndex=0)))}},getDeathZone:function(R){for(var O=this.deathZones,B=0;B=0&&(this.zoneIndex=O),this},addParticleProcessor:function(R){return this.processors.exists(R)||(R.emitter&&R.emitter.removeParticleProcessor(R),this.processors.add(R),R.emitter=this),R},removeParticleProcessor:function(R){return this.processors.exists(R)&&(this.processors.remove(R,!0),R.emitter=null),R},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(R){return this.addParticleProcessor(new u(R))},reserve:function(R){var O=this.dead;if(this.maxParticles>0){var B=this.getParticleCount();B+R>this.maxParticles&&(R=this.maxParticles-(B+R))}for(var N=0;N0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(R,O){return R===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof R=="function"&&(this.emitCallback=R,O&&(this.emitCallbackScope=O)),this},onParticleDeath:function(R,O){return R===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof R=="function"&&(this.deathCallback=R,O&&(this.deathCallbackScope=O)),this},killAll:function(){for(var R=this.dead,O=this.alive;O.length>0;)R.push(O.pop());return this},forEachAlive:function(R,O){for(var B=this.alive,N=B.length,X=0;X0&&this.fastForward(R),this.emitting=!0,this.resetCounters(this.frequency,!0),O!==void 0&&(this.duration=Math.abs(O)),this.emit(i.START,this)),this},stop:function(R){return R===void 0&&(R=!1),this.emitting&&(this.emitting=!1,R&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(R,O){return R===void 0&&(R=""),O===void 0&&(O=this.true),this.sortProperty=R,this.sortOrderAsc=O,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(R){return this.sortProperty!==""?R=this.depthSortCallback:R=null,this.sortCallback=R,this},depthSort:function(){return F(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(R,O){var B=this.sortProperty;return this.sortOrderAsc?R[B]-O[B]:O[B]-R[B]},flow:function(R,O,B){return O===void 0&&(O=1),this.emitting=!1,this.frequency=R,this.quantity=O,B!==void 0&&(this.stopAfter=B),this.start()},explode:function(R,O,B){this.frequency=-1,this.resetCounters(-1,!0);var N=this.emitParticle(R,O,B);return this.emit(i.EXPLODE,this,N),N},emitParticleAt:function(R,O,B){return this.emitParticle(B,R,O)},emitParticle:function(R,O,B){if(!this.atLimit()){R===void 0&&(R=this.ops.quantity.onEmit());for(var N=this.dead,X=this.stopAfter,V=this.follow?this.follow.x+this.followOffset.x:O,Y=this.follow?this.follow.y+this.followOffset.y:B,W=0;W0&&(this.stopCounter++,this.stopCounter>=X)||this.atLimit())break}return H}},fastForward:function(R,O){O===void 0&&(O=1e3/60);var B=0;for(this.skipping=!0;B0){var K=this.deathCallback,J=this.deathCallbackScope;for(Y=H-1;Y>=0;Y--){var Z=W[Y];X.splice(Z.index,1),V.push(Z.particle),K&&K.call(J,Z.particle),Z.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&X.length===0&&(this.completeFlag=0,this.emit(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=O;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=O,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(R){for(var O=this.getWorldTransformMatrix(),B=this.alive,N=B.length,X=[],V=0;V0){var b=0;for(this.skipping=!0;b0&&x(N,R,R),N},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(R){this.ops.x.onChange(R)}},particleY:{get:function(){return this.ops.y.current},set:function(R){this.ops.y.onChange(R)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(R){this.ops.accelerationX.onChange(R)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(R){this.ops.accelerationY.onChange(R)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(R){this.ops.maxVelocityX.onChange(R)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(R){this.ops.maxVelocityY.onChange(R)}},speed:{get:function(){return this.ops.speedX.current},set:function(R){this.ops.speedX.onChange(R),this.ops.speedY.onChange(R)}},speedX:{get:function(){return this.ops.speedX.current},set:function(R){this.ops.speedX.onChange(R)}},speedY:{get:function(){return this.ops.speedY.current},set:function(R){this.ops.speedY.onChange(R)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(R){this.ops.moveToX.onChange(R)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(R){this.ops.moveToY.onChange(R)}},bounce:{get:function(){return this.ops.bounce.current},set:function(R){this.ops.bounce.onChange(R)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(R){this.ops.scaleX.onChange(R)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(R){this.ops.scaleY.onChange(R)}},particleColor:{get:function(){return this.ops.color.current},set:function(R){this.ops.color.onChange(R)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(R){this.ops.color.setEase(R)}},particleTint:{get:function(){return this.ops.tint.current},set:function(R){this.ops.tint.onChange(R)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(R){this.ops.alpha.onChange(R)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(R){this.ops.lifespan.onChange(R)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(R){this.ops.angle.onChange(R)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(R){this.ops.rotate.onChange(R)}},quantity:{get:function(){return this.ops.quantity.current},set:function(R){this.ops.quantity.onChange(R)}},delay:{get:function(){return this.ops.delay.current},set:function(R){this.ops.delay.onChange(R)}},hold:{get:function(){return this.ops.hold.current},set:function(R){this.ops.hold.onChange(R)}},flowCounter:{get:function(){return this.counters[0]},set:function(R){this.counters[0]=R}},frameCounter:{get:function(){return this.counters[1]},set:function(R){this.counters[1]=R}},animCounter:{get:function(){return this.counters[2]},set:function(R){this.counters[2]=R}},elapsed:{get:function(){return this.counters[3]},set:function(R){this.counters[3]=R}},stopCounter:{get:function(){return this.counters[4]},set:function(R){this.counters[4]=R}},completeFlag:{get:function(){return this.counters[5]},set:function(R){this.counters[5]=R}},zoneIndex:{get:function(){return this.counters[6]},set:function(R){this.counters[6]=R}},zoneTotal:{get:function(){return this.counters[7]},set:function(R){this.counters[7]=R}},currentFrame:{get:function(){return this.counters[8]},set:function(R){this.counters[8]=R}},currentAnim:{get:function(){return this.counters[9]},set:function(R){this.counters[9]=R}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var R,O=this.ops;for(R=0;R{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59996),c=t(61340),a=new c,r=new c,n=new c,e=new c,s=function(h,i,o,f){var l=a,u=r,v=n,g=e;f?(g.loadIdentity(),g.multiply(f),g.translate(i.x,i.y),g.rotate(i.rotation),g.scale(i.scaleX,i.scaleY)):g.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var x=h.currentContext,m=o.roundPixels,y=o.alpha,T=i.alpha,E=i.alive,C=E.length,A=i.viewBounds;if(!(!i.visible||C===0||A&&!d(A,o.worldView))){i.sortCallback&&i.depthSort(),o.addToRenderList(i);var P=i.scrollFactorX,M=i.scrollFactorY;x.save(),x.globalCompositeOperation=h.blendModes[i.blendMode];for(var F=0;F0&&U.height>0){var z=-I.halfWidth,w=-I.halfHeight;x.globalAlpha=D,x.save(),u.setToContext(x),m&&(z=Math.round(z),w=Math.round(w)),x.imageSmoothingEnabled=!I.source.scaleMode,x.drawImage(I.source.image,U.x,U.y,U.width,U.height,z,w,U.width,U.height),x.restore()}}}x.restore()}};p.exports=s},92730:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(95540),n=t(31600);c.register("particles",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=r(e,"config",null),o=new n(this.scene,0,0,h);return s!==void 0&&(e.add=s),d(this.scene,o,e),i&&o.setConfig(i),o})},676:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(31600);d.register("particles",function(a,r,n,e){return a!==void 0&&typeof a=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new c(this.scene,a,r,n,e))})},90668:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(21188),a=t(9871),p.exports={renderWebGL:c,renderCanvas:a}},21188:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59996),c=t(61340),a=t(70554),r=new c,n=new c,e=new c,s=new c,h=function(i,o,f,l){var u=i.pipelines.set(o.pipeline),v=r,g=n,x=e,m=s;l?(m.loadIdentity(),m.multiply(l),m.translate(o.x,o.y),m.rotate(o.rotation),m.scale(o.scaleX,o.scaleY)):m.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY);var y=a.getTintAppendFloatAlpha,T=f.alpha,E=o.alpha;i.pipelines.preBatch(o);var C=o.alive,A=C.length,P=o.viewBounds;if(!(A===0||P&&!d(P,f.worldView))){o.sortCallback&&o.depthSort(),f.addToRenderList(o),v.copyFrom(f.matrix),v.multiplyWithOffset(m,-f.scrollX*o.scrollFactorX,-f.scrollY*o.scrollFactorY),i.setBlendMode(o.blendMode),o.mask&&(o.mask.preRenderWebGL(i,o,f),i.pipelines.set(o.pipeline));for(var M=o.tintFill,F,L,D=0;D{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=new d({initialize:function(r,n,e){r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=!0),this.emitter,this.x=r,this.y=n,this.active=e},update:function(){},destroy:function(){this.emitter=null}});p.exports=c},9774:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},812:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="deathzone"},30522:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="explode"},96695:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},18677:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},20696:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={EmitterColorOp:t(76472),EmitterOp:t(44777),Events:t(20696),GravityWell:t(24502),Particle:t(56480),ParticleBounds:t(69601),ParticleEmitter:t(31600),ParticleProcessor:t(20286),Zones:t(21024)}},26388:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=new d({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(a){var r=a.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});p.exports=c},19909:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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,h,i){s===void 0&&(s=!1),h===void 0&&(h=!0),i===void 0&&(i=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=s,this.counter=-1,this.seamless=h,this._length=0,this._direction=0,this.total=i,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var a=this.points[0],r=this.points[this.points.length-1];a.x===r.x&&a.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(a){return this.source=a,this.updateSource()},getPoint:function(a){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(a.x=r.x,a.y=r.y)}});p.exports=c},68875:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(26099),a=new d({initialize:function(n){this.source=n,this._tempVec=new c,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});p.exports=a},21024:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(68287),r=new d({Extends:a,Mixins:[c.PathFollower],initialize:function(e,s,h,i,o,f){a.call(this,e,h,i,o,f),this.path=s},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});p.exports=r},90145:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(1159);d.register("follower",function(a,r,n,e,s){var h=new c(this.scene,a,r,n,e,s);return this.displayList.add(h),this.updateList.add(h),h})},33663:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(9674),c=t(83419),a=t(48803),r=t(90664),n=t(4703),e=t(45650),s=new c({Extends:n,initialize:function(i,o,f,l,u,v,g,x){l||(l="__DEFAULT"),n.call(this,i,o,f,l,u),this.type="Plane",this.anims=new d(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(v,g,x),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(h,i,o){h===void 0&&(h=8),i===void 0&&(i=8),o===void 0&&(o=!1);var f=!1;return o&&(f=!0),this.gridWidth=h,this.gridHeight=i,this.isTiled=o,this.clear(),a({mesh:this,widthSegments:h,heightSegments:i,isOrtho:!1,tile:o,flipY:f}),this},setSizeToFrame:function(h){h===void 0&&(h=!0);var i=this.frame;if(this.setPerspective(this.width/i.width,this.height/i.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!h)return this;var o=this.gridWidth,f=this.gridHeight,l=this.vertices,u=i.u0,v=i.u1,g=i.v0,x=i.v1,m,y,T=0;if(this.isTiled)for(g=i.v1,x=i.v0,y=0;y7&&m>7?g.push(u.r,u.g,u.b,o):g.push(v.r,v.g,v.b,f);var y=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(g),16,16);return this.removeCheckerboard(),this.setTexture(y),this.setSizeToFrame(),this.setViewHeight(l),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(h,i){return this.anims.play(h,i)},playReverse:function(h,i){return this.anims.playReverse(h,i)},playAfterDelay:function(h,i){return this.anims.playAfterDelay(h,i)},playAfterRepeat:function(h,i){return this.anims.playAfterRepeat(h,i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(h){return this.anims.stopAfterDelay(h)},stopAfterRepeat:function(h){return this.anims.stopAfterRepeat(h)},stopOnFrame:function(h){return this.anims.stopOnFrame(h)},preUpdate:function(h,i){n.prototype.preUpdate.call(this,h,i),this.anims.update(h,i)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});p.exports=s},56015:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(13059),a=t(44603),r=t(23568),n=t(35154),e=t(33663);a.register("plane",function(s,h){s===void 0&&(s={});var i=r(s,"key",null),o=r(s,"frame",null),f=n(s,"width",8),l=n(s,"height",8),u=n(s,"tile",!1),v=new e(this.scene,0,0,i,o,f,l,u);h!==void 0&&(s.add=h);var g=n(s,"checkerboard",null);if(g){var x=n(g,"color1",16777215),m=n(g,"color2",255),y=n(g,"alpha1",255),T=n(g,"alpha2",255),E=n(g,"height",128);v.createCheckerboard(x,m,y,T,E)}return d(this.scene,v,s),c(v,s),v})},30985:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33663),c=t(39429);c.register("plane",function(a,r,n,e,s,h,i){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i))})},80321:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(95643),r=t(30100),n=t(36060),e=t(67277),s=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible,e],initialize:function(i,o,f,l,u,v,g){l===void 0&&(l=16777215),u===void 0&&(u=128),v===void 0&&(v=1),g===void 0&&(g=.1),a.call(this,i,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(o,f),this.color=r(l),this.intensity=v,this.attenuation=g,this.width=u*2,this.height=u*2,this._radius=u},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this.width=h*2,this.height=h*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});p.exports=s},39829:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(80321);c.register("pointlight",function(n,e){n===void 0&&(n={});var s=a(n,"color",16777215),h=a(n,"radius",128),i=a(n,"intensity",1),o=a(n,"attenuation",.1),f=new r(this.scene,0,0,s,h,i,o);return e!==void 0&&(n.add=e),d(this.scene,f,n),f})},71255:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(80321);d.register("pointlight",function(a,r,n,e,s,h){return this.displayList.add(new c(this.scene,a,r,n,e,s,h))})},67277:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(57787),p.exports={renderWebGL:c,renderCanvas:a}},57787:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=function(a,r,n,e){n.addToRenderList(r);var s=a.pipelines.set(r.pipeline),h=d(r,n,e).calc,i=r.width,o=r.height,f=-r._radius,l=-r._radius,u=f+i,v=l+o,g=h.getX(0,0),x=h.getY(0,0),m=h.getX(f,l),y=h.getY(f,l),T=h.getX(f,v),E=h.getY(f,v),C=h.getX(u,v),A=h.getY(u,v),P=h.getX(u,l),M=h.getY(u,l);a.pipelines.preBatch(r),s.batchPointLight(r,n,m,y,T,E,C,A,P,M,g,x),a.pipelines.postBatch(r)};p.exports=c},591:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(81320),a=t(88571),r=new d({Extends:a,initialize:function(e,s,h,i,o){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=32),o===void 0&&(o=32);var f=new c(e.sys.textures,"",i,o);a.call(this,e,s,h,f),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.texture.setSize(n,e),this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=n,s.hitArea.height=e),this},resize:function(n,e){return this.setSize(n,e),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,s,h,i,o){return this.texture.fill(n,e,s,h,i,o),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,s,h,i){return this.texture.stamp(n,e,s,h,i),this},erase:function(n,e,s){return this.texture.erase(n,e,s),this},draw:function(n,e,s,h,i){return this.texture.draw(n,e,s,h,i),this},drawFrame:function(n,e,s,h,i,o){return this.texture.drawFrame(n,e,s,h,i,o),this},repeat:function(n,e,s,h,i,o,f,l,u){return this.texture.repeat(n,e,s,h,i,o,f,l,u),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,s,h,i){return this.texture.batchDraw(n,e,s,h,i),this},batchDrawFrame:function(n,e,s,h,i,o){return this.texture.batchDrawFrame(n,e,s,h,i,o),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,s,h,i,o,f){return this.texture.snapshotArea(n,e,s,h,i,o,f),this},snapshot:function(n,e,s){return this.snapshotArea(0,0,this.width,this.height,n,e,s)},snapshotPixel:function(n,e,s){return this.snapshotArea(n,e,1,1,s,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});p.exports=r},34495:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(591);c.register("renderTexture",function(n,e){n===void 0&&(n={});var s=a(n,"x",0),h=a(n,"y",0),i=a(n,"width",32),o=a(n,"height",32),f=new r(this.scene,s,h,i,o);return e!==void 0&&(n.add=e),d(this.scene,f,n),f})},60505:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(591);d.register("renderTexture",function(a,r,n,e){return this.displayList.add(new c(this.scene,a,r,n,e))})},77757:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(9674),c=t(83419),a=t(31401),r=t(95643),n=t(36060),e=t(38745),s=t(26099),h=new c({Extends:r,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Flip,a.Mask,a.Pipeline,a.PostPipeline,a.Size,a.Texture,a.Transform,a.Visible,a.ScrollFactor,e],initialize:function(o,f,l,u,v,g,x,m,y){u===void 0&&(u="__DEFAULT"),g===void 0&&(g=2),x===void 0&&(x=!0),r.call(this,o,"Rope"),this.anims=new d(this),this.points=g,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=u==="__DEFAULT",this.dirty=!1,this.horizontal=x,this._flipX=!1,this._flipY=!1,this._perp=new s,this.debugCallback=null,this.debugGraphic=null,this.setTexture(u,v),this.setPosition(f,l),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(g)&&this.resizeArrays(g.length),this.setPoints(g,m,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,o){var f=this.anims.currentFrame;this.anims.update(i,o),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(i,o,f){return this.anims.play(i,o,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,o,f){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,o,f))},setVertical:function(i,o,f){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,o,f)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,o){var f=this.points.length;if(f<1)return this;var l=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&o===void 0&&(i=[i]);var u,v=0;if(o!==void 0)for(u=0;uv&&(g=i[v]),l[v]=g,i.length>v+1&&(g=i[v+1]),l[v+1]=g}return this},setColors:function(i){var o=this.points.length;if(o<1)return this;var f=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var l,u=0;if(i.length===o)for(l=0;lu&&(v=i[u]),f[u]=v,i.length>u+1&&(v=i[u+1]),f[u+1]=v}return this},setPoints:function(i,o,f){if(i===void 0&&(i=2),typeof i=="number"){var l=i;l<2&&(l=2),i=[];var u,v,g;if(this.horizontal)for(g=-this.frame.halfWidth,v=this.frame.width/(l-1),u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},26209:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(35154),n=t(77757);c.register("rope",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=a(e,"frame",null),o=a(e,"horizontal",!0),f=r(e,"points",void 0),l=r(e,"colors",void 0),u=r(e,"alphas",void 0),v=new n(this.scene,0,0,h,i,f,o,l,u);return s!==void 0&&(e.add=s),d(this.scene,v,e),v})},96819:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(77757),c=t(39429);c.register("rope",function(a,r,n,e,s,h,i,o){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i,o))})},38745:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(20439),a=t(95262),p.exports={renderWebGL:c,renderCanvas:a}},20439:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(70554),a=function(r,n,e,s){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline,n),i=d(n,e,s).calc,o=n.vertices,f=n.uv,l=n.colors,u=n.alphas,v=n.alpha,g=c.getTintAppendFloatAlpha,x=e.roundPixels,m=o.length,y=Math.floor(m*.5);h.flush(),r.pipelines.preBatch(n);var T=h.setGameObject(n),E=h.vertexViewF32,C=h.vertexViewU32,A=h.vertexCount*h.currentShader.vertexComponentCount-1,P=0,M=n.tintFill;n.dirty&&n.updateVertices();for(var F=n.debugCallback,L=[],D=0;D{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(95643),r=t(95540),n=t(79291),e=t(61622),s=t(25479),h=t(61340),i=t(95428),o=t(92503),f=new d({Extends:a,Mixins:[c.ComputedSize,c.Depth,c.GetBounds,c.Mask,c.Origin,c.ScrollFactor,c.Transform,c.Visible,s],initialize:function(u,v,g,x,m,y,T,E){g===void 0&&(g=0),x===void 0&&(x=0),m===void 0&&(m=128),y===void 0&&(y=128),a.call(this,u,"Shader"),this.blendMode=-1,this.shader;var C=u.sys.renderer;this.renderer=C,this.gl=C.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=C.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=C.width,this._rendererHeight=C.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(g,x),this.setSize(m,y),this.setOrigin(.5,.5),this.setShader(v,T,E),this.renderer.on(o.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(l){return this.renderToTexture?!0:!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&l.id)},setRenderToTexture:function(l,u){if(u===void 0&&(u=!1),!this.renderToTexture){var v=this.width,g=this.height,x=this.renderer;this.glTexture=x.createTextureFromSource(null,v,g,0),this.glTexture.flipY=u,this.framebuffer=x.createFramebuffer(v,g,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=g,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),l&&(this.texture=this.scene.sys.textures.addGLTexture(l,this.glTexture))}return this.shader&&(x.pipelines.clear(),this.load(),this.flush(),x.pipelines.rebind()),this},setShader:function(l,u,v){if(this.renderer.contextLost)return this._deferSetShader={key:l,textures:u,textureData:v},this;if(u===void 0&&(u=[]),typeof l=="string"){var g=this.scene.sys.cache.shader;if(!g.has(l))return console.warn("Shader missing: "+l),this;this.shader=g.get(l)}else this.shader=l;var x=this.gl,m=this.renderer;this.program&&m.deleteProgram(this.program);var y=m.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);x.uniformMatrix4fv(x.getUniformLocation(y.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),x.uniformMatrix4fv(x.getUniformLocation(y.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),x.uniform2f(x.getUniformLocation(y.webGLProgram,"uResolution"),this.width,this.height),this.program=y;var T=new Date,E={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[T.getFullYear(),T.getMonth(),T.getDate(),T.getHours()*60*60+T.getMinutes()*60+T.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=n(!0,{},this.shader.uniforms,E):this.uniforms=E;for(var C=0;C<4;C++)u[C]&&this.setSampler2D("iChannel"+C,u[C],C,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(l){return this.pointer=l,this},projOrtho:function(l,u,v,g){if(this.renderer.contextLost){this._deferProjOrtho={left:l,right:u,bottom:v,top:g};return}var x=-1e3,m=1e3,y=1/(l-u),T=1/(v-g),E=1/(x-m),C=this.projectionMatrix;C[0]=-2*y,C[5]=-2*T,C[10]=2*E,C[12]=(l+u)*y,C[13]=(g+v)*T,C[14]=(m+x)*E;var A=this.program,P=this.gl,M=this.renderer;M.setProgram(A),P.uniformMatrix4fv(P.getUniformLocation(A.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=u,this._rendererHeight=v},initUniforms:function(){var l=this.renderer.glFuncMap,u=this.program;this._textureCount=0;for(var v in this.uniforms){var g=this.uniforms[v],x=g.type,m=l[x];g.uniformLocation=this.renderer.createUniformLocation(u,v),x!=="sampler2D"&&(g.glMatrix=m.matrix,g.glValueLength=m.length,g.glFunc=m.func)}},setSampler2DBuffer:function(l,u,v,g,x,m){x===void 0&&(x=0),m===void 0&&(m={});var y=this.uniforms[l];return y.value=u,m.width=v,m.height=g,y.textureData=m,this._textureCount=x,this.initSampler2D(y),this},setSampler2D:function(l,u,v,g){v===void 0&&(v=0);var x=this.scene.sys.textures;if(x.exists(u)){var m=x.getFrame(u);if(m.glTexture&&m.glTexture.isRenderTexture)return this.setSampler2DBuffer(l,m.glTexture,m.width,m.height,v,g);var y=this.uniforms[l],T=m.source;y.textureKey=u,y.source=T.image,y.value=m.glTexture,T.isGLTexture&&(g||(g={}),g.width=T.width,g.height=T.height),g&&(y.textureData=g),this._textureCount=v,this.initSampler2D(y)}return this},setUniform:function(l,u){return e(this.uniforms,l,u),this},getUniform:function(l){return r(this.uniforms,l,null)},setChannel0:function(l,u){return this.setSampler2D("iChannel0",l,0,u)},setChannel1:function(l,u){return this.setSampler2D("iChannel1",l,1,u)},setChannel2:function(l,u){return this.setSampler2D("iChannel2",l,2,u)},setChannel3:function(l,u){return this.setSampler2D("iChannel3",l,3,u)},initSampler2D:function(l){if(l.value){var u=this.gl;u.activeTexture(u.TEXTURE0+this._textureCount),u.bindTexture(u.TEXTURE_2D,l.value.webGLTexture);var v=l.textureData;if(v&&!l.value.isRenderTexture){var g=l.value,x=u[r(v,"magFilter","linear").toUpperCase()],m=u[r(v,"minFilter","linear").toUpperCase()],y=u[r(v,"wrapS","repeat").toUpperCase()],T=u[r(v,"wrapT","repeat").toUpperCase()],E=u[r(v,"format","rgba").toUpperCase()];if(v.repeat&&(y=u.REPEAT,T=u.REPEAT),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,!!v.flipY),v.width){var C=r(v,"width",512),A=r(v,"height",2),P=r(v,"border",0);u.texImage2D(u.TEXTURE_2D,0,E,C,A,P,E,u.UNSIGNED_BYTE,null),g.width=C,g.height=A}else u.texImage2D(u.TEXTURE_2D,0,E,u.RGBA,u.UNSIGNED_BYTE,l.source);u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,x),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,m),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,y),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,T),g.magFilter=x,g.minFilter=m,g.wrapS=y,g.wrapT=T,g.format=E,g.flipY=!!v.flipY,g.pixels=l.source}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var l=this.gl,u=this.uniforms,v,g,x,m,y,T=0;for(var E in u)v=u[E],x=v.glFunc,g=v.glValueLength,m=v.uniformLocation,y=v.value,y!==null&&(g===1?v.glMatrix?x.call(l,m.webGLUniformLocation,v.transpose,y):x.call(l,m.webGLUniformLocation,y):g===2?x.call(l,m.webGLUniformLocation,y.x,y.y):g===3?x.call(l,m.webGLUniformLocation,y.x,y.y,y.z):g===4?x.call(l,m.webGLUniformLocation,y.x,y.y,y.z,y.w):v.type==="sampler2D"&&(l.activeTexture(l.TEXTURE0+T),l.bindTexture(l.TEXTURE_2D,y.webGLTexture),l.uniform1i(m.webGLUniformLocation,T),T++))},load:function(l){var u=this.gl,v=this.width,g=this.height,x=this.renderer,m=this.program,y=this.viewMatrix;if(!this.renderToTexture){var T=-this._displayOriginX,E=-this._displayOriginY;y[0]=l[0],y[1]=l[1],y[4]=l[2],y[5]=l[3],y[8]=l[4],y[9]=l[5],y[12]=y[0]*T+y[4]*E,y[13]=y[1]*T+y[5]*E}u.useProgram(m.webGLProgram),u.uniformMatrix4fv(u.getUniformLocation(m.webGLProgram,"uViewMatrix"),!1,y),u.uniformMatrix4fv(u.getUniformLocation(m.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),u.uniform2f(u.getUniformLocation(m.webGLProgram,"uResolution"),this.width,this.height);var C=this.uniforms,A=C.resolution;A.value.x=v,A.value.y=g,C.time.value=x.game.loop.getDuration();var P=this.pointer;if(P){var M=C.mouse,F=P.x/v,L=1-P.y/g;M.value.x=F.toFixed(2),M.value.y=L.toFixed(2)}this.syncUniforms()},flush:function(){var l=this.width,u=this.height,v=this.program,g=this.gl,x=this.vertexBuffer,m=this.renderer,y=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(m.setFramebuffer(this.framebuffer),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT)),g.bindBuffer(g.ARRAY_BUFFER,x.webGLBuffer);var T=g.getAttribLocation(v.webGLProgram,"inPosition");T!==-1&&(g.enableVertexAttribArray(T),g.vertexAttribPointer(T,2,g.FLOAT,!1,y,0));var E=this.vertexViewF32;E[3]=u,E[4]=l,E[5]=u,E[8]=l,E[9]=u,E[10]=l;var C=6;g.bufferSubData(g.ARRAY_BUFFER,0,this.bytes.subarray(0,C*y)),g.drawArrays(g.TRIANGLES,0,C),this.renderToTexture&&m.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var l=this._deferSetShader.key,u=this._deferSetShader.textures,v=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(l,u,v)}if(this._deferProjOrtho!==null){var g=this._deferProjOrtho.left,x=this._deferProjOrtho.right,m=this._deferProjOrtho.bottom,y=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(g,x,m,y)}},preDestroy:function(){var l=this.renderer;l.off(o.RESTORE_WEBGL,this.onContextRestored,this),l.deleteProgram(this.program),l.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(l.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),i(this.uniforms,function(u){l.deleteUniformLocation(u.uniformLocation),u.uniformLocation=null})}});p.exports=f},80464:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},54935:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(20071);c.register("shader",function(n,e){n===void 0&&(n={});var s=a(n,"key",null),h=a(n,"x",0),i=a(n,"y",0),o=a(n,"width",128),f=a(n,"height",128),l=new r(this.scene,s,h,i,o,f);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})},74177:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20071),c=t(39429);c.register("shader",function(a,r,n,e,s,h,i){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i))})},25479:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(19257),a=t(80464),p.exports={renderWebGL:c,renderCanvas:a}},19257:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=function(a,r,n,e){if(r.shader){if(n.addToRenderList(r),a.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var s=d(r,n,e).calc;(a.width!==r._rendererWidth||a.height!==r._rendererHeight)&&r.projOrtho(0,a.width,a.height,0),r.load(s.matrix),r.flush()}a.pipelines.rebind()}};p.exports=c},10441:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70554),c=function(a,r,n,e,s,h){for(var i=d.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),o=n.pathData,f=n.pathIndexes,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=c||d.fillColor,n=a||d.fillAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,h=r&255;t.fillStyle="rgba("+e+","+s+","+h+","+n+")"};p.exports=S},75177:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=c||d.strokeColor,n=a||d.strokeAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,h=r&255;t.strokeStyle="rgba("+e+","+s+","+h+","+n+")",t.lineWidth=d.lineWidth};p.exports=S},17803:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(95643),r=t(23031),n=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible],initialize:function(s,h,i){h===void 0&&(h="Shape"),a.call(this,s,h),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,s){return s===void 0&&(s=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=s,this.isFilled=!0),this},setStrokeStyle:function(e,s,h){return h===void 0&&(h=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=s,this.strokeAlpha=h,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,s){return this.width=e,this.height=s,this},setDisplaySize:function(e,s){return this.displayWidth=e,this.displayHeight=s,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});p.exports=n},34682:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70554),c=function(a,r,n,e,s){var h=a.strokeTint,i=d.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);h.TL=i,h.TR=i,h.BL=i,h.BR=i;var o=r.pathData,f=o.length-1,l=r.lineWidth,u=l/2,v=o[0]-e,g=o[1]-s;r.closePath||(f-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13609),c=t(83419),a=t(39506),r=t(94811),n=t(96503),e=t(36383),s=t(17803),h=new c({Extends:s,Mixins:[d],initialize:function(o,f,l,u,v,g,x,m,y){f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=128),v===void 0&&(v=0),g===void 0&&(g=360),x===void 0&&(x=!1),s.call(this,o,"Arc",new n(0,0,u)),this._startAngle=v,this._endAngle=g,this._anticlockwise=x,this._iterations=.01,this.setPosition(f,l);var T=this.geom.radius*2;this.setSize(T,T),m!==void 0&&this.setFillStyle(m,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(i){this._iterations=i,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(i){this.geom.radius=i;var o=i*2;this.setSize(o,o),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(i){this._startAngle=i,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(i){this._endAngle=i,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(i){this._anticlockwise=i,this.updateData()}},setRadius:function(i){return this.radius=i,this},setIterations:function(i){return i===void 0&&(i=.01),this.iterations=i,this},setStartAngle:function(i,o){return this._startAngle=i,o!==void 0&&(this._anticlockwise=o),this.updateData()},setEndAngle:function(i,o){return this._endAngle=i,o!==void 0&&(this._anticlockwise=o),this.updateData()},updateData:function(){var i=this._iterations,o=i,f=this.geom.radius,l=a(this._startAngle),u=a(this._endAngle),v=this._anticlockwise,g=f,x=f;u-=l,v?u<-e.PI2?u=-e.PI2:u>0&&(u=-e.PI2+u%e.PI2):u>e.PI2?u=e.PI2:u<0&&(u=e.PI2+u%e.PI2);for(var m=[g+Math.cos(l)*f,x+Math.sin(l)*f],y;o<1;)y=u*o+l,m.push(g+Math.cos(y)*f,x+Math.sin(y)*f),o+=i;return y=u+l,m.push(g+Math.cos(y)*f,x+Math.sin(y)*f),m.push(g+Math.cos(l)*f,x+Math.sin(l)*f),this.pathIndexes=r(m),this.pathData=m,this}});p.exports=h},42542:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39506),c=t(65960),a=t(75177),r=t(20926),n=function(e,s,h,i){h.addToRenderList(s);var o=e.currentContext;if(r(e,o,s,h,i)){var f=s.radius;o.beginPath(),o.arc(f-s.originX*(f*2),f-s.originY*(f*2),f,d(s._startAngle),d(s._endAngle),s.anticlockwise),s.closePath&&o.closePath(),s.isFilled&&(c(o,s),o.fill()),s.isStroked&&(a(o,s),o.stroke()),o.restore()}};p.exports=n},42563:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23629),c=t(39429);c.register("arc",function(a,r,n,e,s,h,i,o){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i,o))}),c.register("circle",function(a,r,n,e,s){return this.displayList.add(new d(this.scene,a,r,n,0,360,!1,e,s))})},13609:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(41447),a=t(42542),p.exports={renderWebGL:c,renderCanvas:a}},41447:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(10441),a=t(34682),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=d(e,s,h),f=i.calcMatrix.copyFrom(o.calc),l=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&c(i,f,e,v,l,u),e.isStroked&&a(i,e,v,l,u),n.pipelines.postBatch(e)};p.exports=r},89:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(33141),a=t(94811),r=t(87841),n=t(17803),e=new d({Extends:n,Mixins:[c],initialize:function(h,i,o,f,l,u){i===void 0&&(i=0),o===void 0&&(o=0),n.call(this,h,"Curve",f),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(i,o),l!==void 0&&this.setFillStyle(l,u),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){var s=this._curveBounds,h=this._smoothness;this.geom.getBounds(s,h),this.setSize(s.width,s.height),this.updateDisplayOrigin();for(var i=[],o=this.geom.getPoints(h),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,l=e.pathData,u=l.length-1,v=l[0]-o,g=l[1]-f;i.beginPath(),i.moveTo(v,g),e.closePath||(u-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(89);d.register("curve",function(a,r,n,e,s){return this.displayList.add(new c(this.scene,a,r,n,e,s))})},33141:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(53987),a=t(3170),p.exports={renderWebGL:c,renderCanvas:a}},53987:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10441),c=t(91296),a=t(34682),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=c(e,s,h),f=i.calcMatrix.copyFrom(o.calc),l=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,f,e,v,l,u),e.isStroked&&a(i,e,v,l,u),n.pipelines.postBatch(e)};p.exports=r},19921:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(94811),a=t(54205),r=t(8497),n=t(17803),e=new d({Extends:n,Mixins:[a],initialize:function(h,i,o,f,l,u,v){i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=128),l===void 0&&(l=128),n.call(this,h,"Ellipse",new r(f/2,l/2,f,l)),this._smoothness=64,this.setPosition(i,o),this.width=f,this.height=l,u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSize:function(s,h){return this.width=s,this.height=h,this.geom.setPosition(s/2,h/2),this.geom.setSize(s,h),this.updateData()},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){for(var s=[],h=this.geom.getPoints(this._smoothness),i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=e._displayOriginX,f=e._displayOriginY,l=e.pathData,u=l.length-1,v=l[0]-o,g=l[1]-f;i.beginPath(),i.moveTo(v,g),e.closePath||(u-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19921),c=t(39429);c.register("ellipse",function(a,r,n,e,s,h){return this.displayList.add(new d(this.scene,a,r,n,e,s,h))})},54205:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(19467),a=t(7930),p.exports={renderWebGL:c,renderCanvas:a}},19467:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10441),c=t(91296),a=t(34682),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=c(e,s,h),f=i.calcMatrix.copyFrom(o.calc),l=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,f,e,v,l,u),e.isStroked&&a(i,e,v,l,u),n.pipelines.postBatch(e)};p.exports=r},30479:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(17803),a=t(26015),r=new d({Extends:c,Mixins:[a],initialize:function(e,s,h,i,o,f,l,u,v,g,x){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=128),o===void 0&&(o=128),f===void 0&&(f=32),l===void 0&&(l=32),c.call(this,e,"Grid",null),this.cellWidth=f,this.cellHeight=l,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(s,h),this.setSize(i,o),this.setFillStyle(u,v),g!==void 0&&this.setOutlineStyle(g,x),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});p.exports=r},49912:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=-e._displayOriginX,f=-e._displayOriginY,l=s.alpha*e.alpha,u=e.width,v=e.height,g=e.cellWidth,x=e.cellHeight,m=Math.ceil(u/g),y=Math.ceil(v/x),T=g,E=x,C=g-(m*g-u),A=x-(y*x-v),P=e.showCells,M=e.showAltCells,F=e.showOutline,L=0,D=0,I=0,U=0,z=0;if(F&&(T--,E--,C===g&&C--,A===x&&A--),P&&e.fillAlpha>0)for(d(i,e),D=0;D0)for(d(i,e,e.altFillColor,e.altFillAlpha*l),D=0;D0){for(c(i,e,e.outlineFillColor,e.outlineFillAlpha*l),L=1;L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(30479);d.register("grid",function(a,r,n,e,s,h,i,o,f,l){return this.displayList.add(new c(this.scene,a,r,n,e,s,h,i,o,f,l))})},26015:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(46161),a=t(49912),p.exports={renderWebGL:c,renderCanvas:a}},46161:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(70554),a=function(r,n,e,s){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),i=d(n,e,s),o=h.calcMatrix.copyFrom(i.calc);o.translate(-n._displayOriginX,-n._displayOriginY);var f=e.alpha*n.alpha,l=n.width,u=n.height,v=n.cellWidth,g=n.cellHeight,x=Math.ceil(l/v),m=Math.ceil(u/g),y=v,T=g,E=v-(x*v-l),C=g-(m*g-u),A,P,M=n.showCells,F=n.showAltCells,L=n.showOutline,D=0,I=0,U=0,z=0,w=0;if(L&&(y--,T--,E===v&&E--,C===g&&C--),r.pipelines.preBatch(n),M&&n.fillAlpha>0)for(A=h.fillTint,P=c.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*f),A.TL=P,A.TR=P,A.BL=P,A.BR=P,I=0;I0)for(A=h.fillTint,P=c.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*f),A.TL=P,A.TR=P,A.BL=P,A.BR=P,I=0;I0){var G=h.strokeTint,R=c.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*f);for(G.TL=R,G.TR=R,G.BL=R,G.BR=R,D=1;D{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99651),c=t(83419),a=t(17803),r=new c({Extends:a,Mixins:[d],initialize:function(e,s,h,i,o,f,l,u){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=48),o===void 0&&(o=32),f===void 0&&(f=15658734),l===void 0&&(l=10066329),u===void 0&&(u=13421772),a.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=l,this.fillRight=u,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(s,h),this.setSize(i,o),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r},11508:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(20926),a=function(r,n,e,s){e.addToRenderList(n);var h=r.currentContext;if(c(r,h,n,e,s)&&n.isFilled){var i=n.width,o=n.height,f=i/2,l=i/n.projection;n.showTop&&(d(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-o),h.lineTo(0,-l-o),h.lineTo(f,-o),h.lineTo(f,-1),h.lineTo(0,l-1),h.lineTo(-f,-1),h.lineTo(-f,-o),h.fill()),n.showLeft&&(d(h,n,n.fillLeft),h.beginPath(),h.moveTo(-f,0),h.lineTo(0,l),h.lineTo(0,l-o),h.lineTo(-f,-o),h.lineTo(-f,0),h.fill()),n.showRight&&(d(h,n,n.fillRight),h.beginPath(),h.moveTo(f,0),h.lineTo(0,l),h.lineTo(0,l-o),h.lineTo(f,-o),h.lineTo(f,0),h.fill()),h.restore()}};p.exports=a},3933:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(61475);d.register("isobox",function(a,r,n,e,s,h,i){return this.displayList.add(new c(this.scene,a,r,n,e,s,h,i))})},99651:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(68149),a=t(11508),p.exports={renderWebGL:c,renderCanvas:a}},68149:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(70554),a=function(r,n,e,s){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),i=d(n,e,s),o=h.calcMatrix.copyFrom(i.calc),f=n.width,l=n.height,u=f/2,v=f/n.projection,g=e.alpha*n.alpha;if(n.isFilled){var x,m,y,T,E,C,A,P,M;r.pipelines.preBatch(n),n.showTop&&(x=c.getTintAppendFloatAlpha(n.fillTop,g),m=o.getX(-u,-l),y=o.getY(-u,-l),T=o.getX(0,-v-l),E=o.getY(0,-v-l),C=o.getX(u,-l),A=o.getY(u,-l),P=o.getX(0,v-l),M=o.getY(0,v-l),h.batchQuad(n,m,y,T,E,C,A,P,M,0,0,1,1,x,x,x,x,2)),n.showLeft&&(x=c.getTintAppendFloatAlpha(n.fillLeft,g),m=o.getX(-u,0),y=o.getY(-u,0),T=o.getX(0,v),E=o.getY(0,v),C=o.getX(0,v-l),A=o.getY(0,v-l),P=o.getX(-u,-l),M=o.getY(-u,-l),h.batchQuad(n,m,y,T,E,C,A,P,M,0,0,1,1,x,x,x,x,2)),n.showRight&&(x=c.getTintAppendFloatAlpha(n.fillRight,g),m=o.getX(u,0),y=o.getY(u,0),T=o.getX(0,v),E=o.getY(0,v),C=o.getX(0,v-l),A=o.getY(0,v-l),P=o.getX(u,-l),M=o.getY(u,-l),h.batchQuad(n,m,y,T,E,C,A,P,M,0,0,1,1,x,x,x,x,2)),r.pipelines.postBatch(n)}};p.exports=a},16933:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(60561),a=t(17803),r=new d({Extends:a,Mixins:[c],initialize:function(e,s,h,i,o,f,l,u,v){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=48),o===void 0&&(o=32),f===void 0&&(f=!1),l===void 0&&(l=15658734),u===void 0&&(u=10066329),v===void 0&&(v=13421772),a.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=l,this.fillLeft=u,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(s,h),this.setSize(i,o),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r},79590:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(20926),a=function(r,n,e,s){e.addToRenderList(n);var h=r.currentContext;if(c(r,h,n,e,s)&&n.isFilled){var i=n.width,o=n.height,f=i/2,l=i/n.projection,u=n.isReversed;n.showTop&&u&&(d(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-o),h.lineTo(0,-l-o),h.lineTo(f,-o),h.lineTo(0,l-o),h.fill()),n.showLeft&&(d(h,n,n.fillLeft),h.beginPath(),u?(h.moveTo(-f,-o),h.lineTo(0,l),h.lineTo(0,l-o)):(h.moveTo(-f,0),h.lineTo(0,l),h.lineTo(0,l-o)),h.fill()),n.showRight&&(d(h,n,n.fillRight),h.beginPath(),u?(h.moveTo(f,-o),h.lineTo(0,l),h.lineTo(0,l-o)):(h.moveTo(f,0),h.lineTo(0,l),h.lineTo(0,l-o)),h.fill()),h.restore()}};p.exports=a},49803:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(16933);d.register("isotriangle",function(a,r,n,e,s,h,i,o){return this.displayList.add(new c(this.scene,a,r,n,e,s,h,i,o))})},60561:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(51503),a=t(79590),p.exports={renderWebGL:c,renderCanvas:a}},51503:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(70554),a=function(r,n,e,s){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),i=d(n,e,s),o=h.calcMatrix.copyFrom(i.calc),f=n.width,l=n.height,u=f/2,v=f/n.projection,g=n.isReversed,x=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var m,y,T,E,C,A,P;if(n.showTop&&g){m=c.getTintAppendFloatAlpha(n.fillTop,x),y=o.getX(-u,-l),T=o.getY(-u,-l),E=o.getX(0,-v-l),C=o.getY(0,-v-l),A=o.getX(u,-l),P=o.getY(u,-l);var M=o.getX(0,v-l),F=o.getY(0,v-l);h.batchQuad(n,y,T,E,C,A,P,M,F,0,0,1,1,m,m,m,m,2)}n.showLeft&&(m=c.getTintAppendFloatAlpha(n.fillLeft,x),g?(y=o.getX(-u,-l),T=o.getY(-u,-l),E=o.getX(0,v),C=o.getY(0,v),A=o.getX(0,v-l),P=o.getY(0,v-l)):(y=o.getX(-u,0),T=o.getY(-u,0),E=o.getX(0,v),C=o.getY(0,v),A=o.getX(0,v-l),P=o.getY(0,v-l)),h.batchTri(n,y,T,E,C,A,P,0,0,1,1,m,m,m,2)),n.showRight&&(m=c.getTintAppendFloatAlpha(n.fillRight,x),g?(y=o.getX(u,-l),T=o.getY(u,-l),E=o.getX(0,v),C=o.getY(0,v),A=o.getX(0,v-l),P=o.getY(0,v-l)):(y=o.getX(u,0),T=o.getY(u,0),E=o.getX(0,v),C=o.getY(0,v),A=o.getX(0,v-l),P=o.getY(0,v-l)),h.batchTri(n,y,T,E,C,A,P,0,0,1,1,m,m,m,2)),r.pipelines.postBatch(n)}};p.exports=a},57847:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(17803),a=t(23031),r=t(36823),n=new d({Extends:c,Mixins:[r],initialize:function(s,h,i,o,f,l,u,v,g){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=128),u===void 0&&(u=0),c.call(this,s,"Line",new a(o,f,l,u));var x=Math.max(1,this.geom.right-this.geom.left),m=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(h,i),this.setSize(x,m),v!==void 0&&this.setStrokeStyle(1,v,g),this.updateDisplayOrigin()},setLineWidth:function(e,s){return s===void 0&&(s=e),this._startWidth=e,this._endWidth=s,this.lineWidth=e,this},setTo:function(e,s,h,i){return this.geom.setTo(e,s,h,i),this}});p.exports=n},17440:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75177),c=t(20926),a=function(r,n,e,s){e.addToRenderList(n);var h=r.currentContext;if(c(r,h,n,e,s)){var i=n._displayOriginX,o=n._displayOriginY;n.isStroked&&(d(h,n),h.beginPath(),h.moveTo(n.geom.x1-i,n.geom.y1-o),h.lineTo(n.geom.x2-i,n.geom.y2-o),h.stroke()),h.restore()}};p.exports=a},2481:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(57847);d.register("line",function(a,r,n,e,s,h,i,o){return this.displayList.add(new c(this.scene,a,r,n,e,s,h,i,o))})},36823:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(77385),a=t(17440),p.exports={renderWebGL:c,renderCanvas:a}},77385:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(70554),a=function(r,n,e,s){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),i=d(n,e,s);h.calcMatrix.copyFrom(i.calc);var o=n._displayOriginX,f=n._displayOriginY,l=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var u=h.strokeTint,v=c.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*l);u.TL=v,u.TR=v,u.BL=v,u.BR=v,h.batchLine(n.geom.x1-o,n.geom.y1-f,n.geom.x2-o,n.geom.y2-f,n._startWidth/2,n._endWidth/2,1,0,!1,i.sprite,i.camera)}r.pipelines.postBatch(n)};p.exports=a},24949:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(90273),c=t(83419),a=t(94811),r=t(13829),n=t(25717),e=t(17803),s=t(5469),h=new c({Extends:e,Mixins:[d],initialize:function(o,f,l,u,v,g){f===void 0&&(f=0),l===void 0&&(l=0),e.call(this,o,"Polygon",new n(u));var x=r(this.geom);this.setPosition(f,l),this.setSize(x.width,x.height),v!==void 0&&this.setFillStyle(v,g),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=e._displayOriginX,f=e._displayOriginY,l=e.pathData,u=l.length-1,v=l[0]-o,g=l[1]-f;i.beginPath(),i.moveTo(v,g),e.closePath||(u-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(24949);d.register("polygon",function(a,r,n,e,s){return this.displayList.add(new c(this.scene,a,r,n,e,s))})},90273:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(73695),a=t(38710),p.exports={renderWebGL:c,renderCanvas:a}},73695:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10441),c=t(91296),a=t(34682),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=c(e,s,h),f=i.calcMatrix.copyFrom(o.calc),l=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,f,e,v,l,u),e.isStroked&&a(i,e,v,l,u),n.pipelines.postBatch(e)};p.exports=r},74561:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(87841),a=t(17803),r=t(95597),n=new d({Extends:a,Mixins:[r],initialize:function(s,h,i,o,f,l,u){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=128),f===void 0&&(f=128),a.call(this,s,"Rectangle",new c(0,0,o,f)),this.setPosition(h,i),this.setSize(o,f),l!==void 0&&this.setFillStyle(l,u),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,s){this.width=e,this.height=s,this.geom.setSize(e,s),this.updateData(),this.updateDisplayOrigin();var h=this.input;return h&&!h.customHitArea&&(h.hitArea.width=e,h.hitArea.height=s),this},updateData:function(){var e=[],s=this.geom,h=this._tempLine;return s.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),s.getLineB(h),e.push(h.x2,h.y2),s.getLineC(h),e.push(h.x2,h.y2),s.getLineD(h),e.push(h.x2,h.y2),this.pathData=e,this}});p.exports=n},48682:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=e._displayOriginX,f=e._displayOriginY;e.isFilled&&(d(i,e),i.fillRect(-o,-f,e.width,e.height)),e.isStroked&&(c(i,e),i.beginPath(),i.rect(-o,-f,e.width,e.height),i.stroke()),i.restore()}};p.exports=r},87959:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(74561);d.register("rectangle",function(a,r,n,e,s,h){return this.displayList.add(new c(this.scene,a,r,n,e,s,h))})},95597:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(52059),a=t(48682),p.exports={renderWebGL:c,renderCanvas:a}},52059:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(34682),a=t(70554),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=d(e,s,h);i.calcMatrix.copyFrom(o.calc);var f=e._displayOriginX,l=e._displayOriginY,u=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,g=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);v.TL=g,v.TR=g,v.BL=g,v.BR=g,i.batchFillRect(-f,-l,e.width,e.height)}e.isStroked&&c(i,e,u,f,l),n.pipelines.postBatch(e)};p.exports=r},55911:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(81991),c=t(83419),a=t(94811),r=t(17803),n=new c({Extends:r,Mixins:[d],initialize:function(s,h,i,o,f,l,u,v){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=5),f===void 0&&(f=32),l===void 0&&(l=64),r.call(this,s,"Star",null),this._points=o,this._innerRadius=f,this._outerRadius=l,this.setPosition(h,i),this.setSize(l*2,l*2),u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],s=this._points,h=this._innerRadius,i=this._outerRadius,o=Math.PI/2*3,f=Math.PI/s,l=i,u=i;e.push(l,u+-i);for(var v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=e._displayOriginX,f=e._displayOriginY,l=e.pathData,u=l.length-1,v=l[0]-o,g=l[1]-f;i.beginPath(),i.moveTo(v,g),e.closePath||(u-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(55911),c=t(39429);c.register("star",function(a,r,n,e,s,h,i){return this.displayList.add(new d(this.scene,a,r,n,e,s,h,i))})},81991:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(57017),a=t(64272),p.exports={renderWebGL:c,renderCanvas:a}},57017:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10441),c=t(91296),a=t(34682),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=c(e,s,h),f=i.calcMatrix.copyFrom(o.calc),l=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,f,e,v,l,u),e.isStroked&&a(i,e,v,l,u),n.pipelines.postBatch(e)};p.exports=r},36931:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(17803),a=t(16483),r=t(96195),n=new d({Extends:c,Mixins:[r],initialize:function(s,h,i,o,f,l,u,v,g,x,m){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=128),l===void 0&&(l=64),u===void 0&&(u=0),v===void 0&&(v=128),g===void 0&&(g=128),c.call(this,s,"Triangle",new a(o,f,l,u,v,g));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(h,i),this.setSize(y,T),x!==void 0&&this.setFillStyle(x,m),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,s,h,i,o,f){return this.geom.setTo(e,s,h,i,o,f),this.updateData()},updateData:function(){var e=[],s=this.geom,h=this._tempLine;return s.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),s.getLineB(h),e.push(h.x2,h.y2),s.getLineC(h),e.push(h.x2,h.y2),this.pathData=e,this}});p.exports=n},85172:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65960),c=t(75177),a=t(20926),r=function(n,e,s,h){s.addToRenderList(e);var i=n.currentContext;if(a(n,i,e,s,h)){var o=e._displayOriginX,f=e._displayOriginY,l=e.geom.x1-o,u=e.geom.y1-f,v=e.geom.x2-o,g=e.geom.y2-f,x=e.geom.x3-o,m=e.geom.y3-f;i.beginPath(),i.moveTo(l,u),i.lineTo(v,g),i.lineTo(x,m),i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},45245:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(36931);d.register("triangle",function(a,r,n,e,s,h,i,o,f,l){return this.displayList.add(new c(this.scene,a,r,n,e,s,h,i,o,f,l))})},96195:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(83253),a=t(85172),p.exports={renderWebGL:c,renderCanvas:a}},83253:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=t(34682),a=t(70554),r=function(n,e,s,h){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),o=d(e,s,h);i.calcMatrix.copyFrom(o.calc);var f=e._displayOriginX,l=e._displayOriginY,u=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,g=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);v.TL=g,v.TR=g,v.BL=g,v.BR=g;var x=e.geom.x1-f,m=e.geom.y1-l,y=e.geom.x2-f,T=e.geom.y2-l,E=e.geom.x3-f,C=e.geom.y3-l;i.batchFillTriangle(x,m,y,T,E,C,o.sprite,o.camera)}e.isStroked&&c(i,e,u,f,l),n.pipelines.postBatch(e)};p.exports=r},68287:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(9674),c=t(83419),a=t(31401),r=t(95643),n=t(92751),e=new c({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Size,a.TextureCrop,a.Tint,a.Transform,a.Visible,n],initialize:function(h,i,o,f,l){r.call(this,h,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(f,l),this.setPosition(i,o),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,h){this.anims.update(s,h)},play:function(s,h){return this.anims.play(s,h)},playReverse:function(s,h){return this.anims.playReverse(s,h)},playAfterDelay:function(s,h){return this.anims.playAfterDelay(s,h)},playAfterRepeat:function(s,h){return this.anims.playAfterRepeat(s,h)},chain:function(s){return this.anims.chain(s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(s){return this.anims.stopAfterDelay(s)},stopAfterRepeat:function(s){return this.anims.stopAfterRepeat(s)},stopOnFrame:function(s){return this.anims.stopOnFrame(s)},toJSON:function(){return a.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});p.exports=e},76552:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c.addToRenderList(d),t.batchSprite(d,d.frame,c,a)};p.exports=S},15567:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(13059),a=t(44603),r=t(23568),n=t(68287);a.register("sprite",function(e,s){e===void 0&&(e={});var h=r(e,"key",null),i=r(e,"frame",null),o=new n(this.scene,0,0,h,i);return s!==void 0&&(e.add=s),d(this.scene,o,e),c(o,e),o})},46409:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(68287);d.register("sprite",function(a,r,n,e){return this.displayList.add(new c(this.scene,a,r,n,e))})},92751:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(9409),a=t(76552),p.exports={renderWebGL:c,renderCanvas:a}},9409:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c.addToRenderList(d),d.pipeline.batchSprite(d,c,a)};p.exports=S},14220:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=t.canvas,r=t.context,n=t.style,e=[],s=0,h=c.length;n.maxLines>0&&n.maxLines1&&(o+=t.letterSpacing*(c[i].length-1)),n.wordWrap&&(o-=r.measureText(" ").width),e[i]=Math.ceil(o),s=Math.max(s,e[i])}var f=d.fontSize+n.strokeThickness,l=f*h,u=t.lineSpacing;return h>1&&(l+=u*(h-1)),{width:s,height:l,lines:h,lineWidths:e,lineSpacing:u,lineHeight:f}};p.exports=S},79557:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c=function(a){var r=d.create(this),n=r.getContext("2d",{willReadFrequently:!0});a.syncFont(r,n);var e=n.measureText(a.testString);if("actualBoundingBoxAscent"in e){var s=e.actualBoundingBoxAscent,h=e.actualBoundingBoxDescent;return d.remove(r),{ascent:s,descent:h,fontSize:s+h}}var i=Math.ceil(e.width*a.baselineX),o=i,f=2*o;o=o*a.baselineY|0,r.width=i,r.height=f,n.fillStyle="#f00",n.fillRect(0,0,i,f),n.font=a._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(a.testString,0,o);var l={ascent:0,descent:0,fontSize:0},u=n.getImageData(0,0,i,f);if(!u)return l.ascent=o,l.descent=o+6,l.fontSize=l.ascent+l.descent,d.remove(r),l;var v=u.data,g=v.length,x=i*4,m,y,T=0,E=!1;for(m=0;mo;m--){for(y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40366),c=t(27919),a=t(83419),r=t(31401),n=t(95643),e=t(14220),s=t(35154),h=t(35846),i=t(61771),o=t(35762),f=t(45650),l=new a({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,i],initialize:function(v,g,x,m,y){g===void 0&&(g=0),x===void 0&&(x=0),n.call(this,v,"Text"),this.renderer=v.sys.renderer,this.setPosition(g,x),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=c.create(this),this.context,this.style=new o(this,y),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=f(),this.texture=v.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(m),y&&y.padding&&this.setPadding(y.padding),y&&y.lineSpacing&&this.setLineSpacing(y.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(u){var v=this.style;if(v.wordWrapCallback){var g=v.wordWrapCallback.call(v.wordWrapCallbackScope,u,this);return Array.isArray(g)&&(g=g.join(` +`)),g}else return v.wordWrapWidth?v.wordWrapUseAdvanced?this.advancedWordWrap(u,this.context,this.style.wordWrapWidth):this.basicWordWrap(u,this.context,this.style.wordWrapWidth):u},advancedWordWrap:function(u,v,g){for(var x="",m=u.replace(/ +/gi," ").split(this.splitRegExp),y=m.length,T=0;TP){if(F===0){for(var U=D;U.length&&(U=U.slice(0,-1),I=v.measureText(U).width,!(I<=P)););if(!U.length)throw new Error("wordWrapWidth < a single character");var z=L.substr(U.length);M[F]=z,C+=U}var w=M[F].length?F:F+1,G=M.slice(w).join(" ").replace(/[ \n]*$/gi,"");m.splice(T+1,0,G),y=m.length;break}else C+=D,P-=I}x+=C.replace(/[ \n]*$/gi,"")+` +`}return x=x.replace(/[\s|\n]*$/gi,""),x},basicWordWrap:function(u,v,g){for(var x="",m=u.split(this.splitRegExp),y=m.length-1,T=v.measureText(" ").width,E=0;E<=y;E++){for(var C=g,A=m[E].split(" "),P=A.length-1,M=0;M<=P;M++){var F=A[M],L=v.measureText(F).width,D=L;MC&&M>0&&(x+=` +`,C=g),x+=F,M0&&(L+=E.lineSpacing*D),g.rtl)F=P-F-C.left-C.right;else if(g.align==="right")F+=A-E.lineWidths[D];else if(g.align==="center")F+=(A-E.lineWidths[D])/2;else if(g.align==="justify"){var I=.85;if(E.lineWidths[D]/E.width>=I){var U=E.width-E.lineWidths[D],z=v.measureText(" ").width,w=T[D].trim(),G=w.split(" ");U+=(T[D].length-w.length)*z;for(var R=Math.floor(U/z),O=0;R>0;)G[O]+=" ",O=(O+1)%(G.length-1||1),--R;T[D]=G.join(" ")}}if(this.autoRound&&(F=Math.round(F),L=Math.round(L)),g.strokeThickness&&(g.syncShadow(v,g.shadowStroke),v.strokeText(T[D],F,L)),g.color){g.syncShadow(v,g.shadowFill);var B=this.letterSpacing;if(B!==0)for(var N=0,X=T[D].split(""),V=0;V{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d.width===0||d.height===0||(c.addToRenderList(d),t.batchSprite(d,d.frame,c,a))};p.exports=S},71259:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(50171);c.register("text",function(n,e){n===void 0&&(n={});var s=a(n,"text",""),h=a(n,"style",null),i=a(n,"padding",null);i!==null&&(h.padding=i);var o=new r(this.scene,0,0,s,h);return e!==void 0&&(n.add=e),d(this.scene,o,n),o.autoRound=a(n,"autoRound",!0),o.resolution=a(n,"resolution",1),o})},68005:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50171),c=t(39429);c.register("text",function(a,r,n,e){return this.displayList.add(new d(this.scene,a,r,n,e))})},61771:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(34397),a=t(79724),p.exports={renderWebGL:c,renderCanvas:a}},35762:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23568),a=t(35154),r=t(79557),n={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},e=new d({initialize:function(h,i){this.parent=h,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(i,!1,!0)},setStyle:function(s,h,i){h===void 0&&(h=!0),i===void 0&&(i=!1),s&&s.hasOwnProperty("fontSize")&&typeof s.fontSize=="number"&&(s.fontSize=s.fontSize.toString()+"px");for(var o in n){var f=i?n[o][1]:this[o];o==="wordWrapCallback"||o==="wordWrapCallbackScope"?this[o]=a(s,n[o][0],f):this[o]=c(s,n[o][0],f)}var l=a(s,"font",null);l!==null&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=a(s,"fill",null);u!==null&&(this.color=u);var v=a(s,"metrics",!1);return v?this.metrics={ascent:a(v,"ascent",0),descent:a(v,"descent",0),fontSize:a(v,"fontSize",0)}:(h||!this.metrics)&&(this.metrics=r(this)),h?this.parent.updateText():this.parent},syncFont:function(s,h){h.font=this._font},syncStyle:function(s,h){h.textBaseline="alphabetic",h.fillStyle=this.color,h.strokeStyle=this.stroke,h.lineWidth=this.strokeThickness,h.lineCap="round",h.lineJoin="round"},syncShadow:function(s,h){h?(s.shadowOffsetX=this.shadowOffsetX,s.shadowOffsetY=this.shadowOffsetY,s.shadowColor=this.shadowColor,s.shadowBlur=this.shadowBlur):(s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowColor=0,s.shadowBlur=0)},update:function(s){return s&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(s,h){h===void 0&&(h=!0);var i=s,o="",f="";if(typeof s!="string")i=a(s,"fontFamily","Courier"),o=a(s,"fontSize","16px"),f=a(s,"fontStyle","");else{var l=s.split(" "),u=0;f=l.length>2?l[u++]:"",o=l[u++]||"16px",i=l[u++]||"Courier"}return(i!==this.fontFamily||o!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=o,this.fontStyle=f,h&&this.update(!0)),this.parent},setFontFamily:function(s){return this.fontFamily!==s&&(this.fontFamily=s,this.update(!0)),this.parent},setFontStyle:function(s){return this.fontStyle!==s&&(this.fontStyle=s,this.update(!0)),this.parent},setFontSize:function(s){return typeof s=="number"&&(s=s.toString()+"px"),this.fontSize!==s&&(this.fontSize=s,this.update(!0)),this.parent},setTestString:function(s){return this.testString=s,this.update(!0)},setFixedSize:function(s,h){return this.fixedWidth=s,this.fixedHeight=h,s&&(this.parent.width=s),h&&(this.parent.height=h),this.update(!1)},setBackgroundColor:function(s){return this.backgroundColor=s,this.update(!1)},setFill:function(s){return this.color=s,this.update(!1)},setColor:function(s){return this.color=s,this.update(!1)},setResolution:function(s){return this.resolution=s,this.update(!1)},setStroke:function(s,h){return h===void 0&&(h=this.strokeThickness),s===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==s||this.strokeThickness!==h)&&(this.stroke=s,this.strokeThickness=h,this.update(!0)),this.parent},setShadow:function(s,h,i,o,f,l){return s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i="#000"),o===void 0&&(o=0),f===void 0&&(f=!1),l===void 0&&(l=!0),this.shadowOffsetX=s,this.shadowOffsetY=h,this.shadowColor=i,this.shadowBlur=o,this.shadowStroke=f,this.shadowFill=l,this.update(!1)},setShadowOffset:function(s,h){return s===void 0&&(s=0),h===void 0&&(h=s),this.shadowOffsetX=s,this.shadowOffsetY=h,this.update(!1)},setShadowColor:function(s){return s===void 0&&(s="#000"),this.shadowColor=s,this.update(!1)},setShadowBlur:function(s){return s===void 0&&(s=0),this.shadowBlur=s,this.update(!1)},setShadowStroke:function(s){return this.shadowStroke=s,this.update(!1)},setShadowFill:function(s){return this.shadowFill=s,this.update(!1)},setWordWrapWidth:function(s,h){return h===void 0&&(h=!1),this.wordWrapWidth=s,this.wordWrapUseAdvanced=h,this.update(!1)},setWordWrapCallback:function(s,h){return h===void 0&&(h=null),this.wordWrapCallback=s,this.wordWrapCallbackScope=h,this.update(!1)},setAlign:function(s){return s===void 0&&(s="left"),this.align=s,this.update(!1)},setMaxLines:function(s){return s===void 0&&(s=0),this.maxLines=s,this.update(!1)},getTextMetrics:function(){var s=this.metrics;return{ascent:s.ascent,descent:s.descent,fontSize:s.fontSize}},toJSON:function(){var s={};for(var h in n)s[h]=this[h];return s.metrics=this.getTextMetrics(),s},destroy:function(){this.parent=void 0}});p.exports=e},34397:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70554),c=function(a,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var s=r.frame,h=s.width,i=s.height,o=d.getTintAppendFloatAlpha,f=a.pipelines.set(r.pipeline,r),l=f.setTexture2D(s.glTexture,r);f.batchTexture(r,s.glTexture,h,i,r.x,r.y,h/r.style.resolution,i/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,h,i,o(r.tintTopLeft,n.alpha*r._alphaTL),o(r.tintTopRight,n.alpha*r._alphaTR),o(r.tintBottomLeft,n.alpha*r._alphaBL),o(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,l)}};p.exports=c},20839:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c=t(83419),a=t(31401),r=t(95643),n=t(98439),e=t(68703),s=t(56295),h=t(45650),i=t(26099),o=8,f=new c({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,s],initialize:function(u,v,g,x,m,y,T){var E=u.sys.renderer;r.call(this,u,"TileSprite");var C=u.sys.textures.get(y),A=C.get(T);A.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),C=u.sys.textures.get("__MISSING"),A=C.get()),C.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),C=u.sys.textures.get("__MISSING"),A=C.get()),!x||!m?(x=A.width,m=A.height):(x=Math.floor(x),m=Math.floor(m)),this._tilePosition=new i,this._tileScale=new i(1,1),this.dirty=!1,this.renderer=E,this.canvas=d.create(this,x,m),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=C,this.displayFrame=A,this._crop=this.resetCropObject(),this._textureKey=h(),this.texture=u.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(A.width),this.potHeight=n(A.height),this.fillCanvas=d.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(v,g),this.setSize(x,m),this.setFrame(T),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(l,u){return this.displayTexture=this.scene.sys.textures.get(l),this.setFrame(u)},setFrame:function(l){var u=this.displayTexture.get(l);return this.potWidth=n(u.width),this.potHeight=n(u.height),this.canvas.width=0,!u.cutWidth||!u.cutHeight?this.renderFlags&=~o:this.renderFlags|=o,this.displayFrame=u,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(l,u){return l!==void 0&&(this.tilePositionX=l),u!==void 0&&(this.tilePositionY=u),this},setTileScale:function(l,u){return l===void 0&&(l=this.tileScaleX),u===void 0&&(u=l),this.tileScaleX=l,this.tileScaleY=u,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var l=this.displayFrame;if(l.source.isRenderTexture||l.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var u=this.fillContext,v=this.fillCanvas,g=this.potWidth,x=this.potHeight;(!this.renderer||!this.renderer.gl)&&(g=l.cutWidth,x=l.cutHeight),u.clearRect(0,0,g,x),v.width=g,v.height=x,u.drawImage(l.source.image,l.cutX,l.cutY,l.cutWidth,l.cutHeight,0,0,g,x),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(v,this.fillPattern):this.fillPattern=u.createPattern(v,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var l=this.canvas;if((l.width!==this.width||l.height!==this.height)&&(l.width=this.width,l.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var u=this.context;this.scene.sys.game.config.antialias||e.disable(u);var v=this._tileScale.x,g=this._tileScale.y,x=this._tilePosition.x,m=this._tilePosition.y;u.clearRect(0,0,this.width,this.height),u.save(),u.scale(v,g),u.translate(-x,-m),u.fillStyle=this.fillPattern,u.fillRect(x,m,this.width/v,this.height/g),u.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),d.remove(this.canvas),d.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var l=this.texture;l&&l.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(l){this._tilePosition.x=l,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(l){this._tilePosition.y=l,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(l){this._tileScale.x=l,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(l){this._tileScale.y=l,this.dirty=!0}}});p.exports=f},46992:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d.updateCanvas(),c.addToRenderList(d),t.batchSprite(d,d.frame,c,a)};p.exports=S},14167:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(20839);c.register("tileSprite",function(n,e){n===void 0&&(n={});var s=a(n,"x",0),h=a(n,"y",0),i=a(n,"width",512),o=a(n,"height",512),f=a(n,"key",""),l=a(n,"frame",""),u=new r(this.scene,s,h,i,o,f,l);return e!==void 0&&(n.add=e),d(this.scene,u,n),u})},91681:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20839),c=t(39429);c.register("tileSprite",function(a,r,n,e,s,h){return this.displayList.add(new d(this.scene,a,r,n,e,s,h))})},56295:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(18553),a=t(46992),p.exports={renderWebGL:c,renderCanvas:a}},18553:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70554),c=function(a,r,n,e){r.updateCanvas();var s=r.width,h=r.height;if(!(s===0||h===0)){n.addToRenderList(r);var i=d.getTintAppendFloatAlpha,o=a.pipelines.set(r.pipeline,r),f=o.setTexture2D(r.fillPattern,r);o.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,s,h,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*s,r.originY*h,0,0,s,h,i(r.tintTopLeft,n.alpha*r._alphaTL),i(r.tintTopRight,n.alpha*r._alphaTR),i(r.tintBottomLeft,n.alpha*r._alphaBL),i(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,r.tilePositionX%r.displayFrame.width/r.displayFrame.width,r.tilePositionY%r.displayFrame.height/r.displayFrame.height,n,e,!1,f)}};p.exports=c},18471:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(31401),r=t(51708),n=t(8443),e=t(95643),s=t(36383),h=t(14463),i=t(45650),o=t(10247),f=new c({Extends:e,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.TextureCrop,a.Tint,a.Transform,a.Visible,o],initialize:function(u,v,g,x){e.call(this,u,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=i(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var m=u.sys.game;this._device=m.device.video,this.setPosition(v,g),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),m.events.on(n.PAUSE,this.globalPause,this),m.events.on(n.RESUME,this.globalResume,this);var y=u.sys.sound;y&&y.on(h.GLOBAL_MUTE,this.globalMute,this),x&&this.load(x)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(l){var u=this.scene.sys.cache.video.get(l);return u?(this.cacheKey=l,this.loadHandler(u.url,u.noAudio,u.crossOrigin)):console.warn("No video in cache for key: "+l),this},changeSource:function(l,u,v,g,x){u===void 0&&(u=!0),v===void 0&&(v=!1),this.cacheKey!==l&&(this.load(l),u&&this.play(v,g,x))},getVideoKey:function(){return this.cacheKey},loadURL:function(l,u,v){u===void 0&&(u=!1);var g=this._device.getVideoURL(l);return g?(this.cacheKey="",this.loadHandler(g.url,u,v)):console.warn("No supported video format found for "+l),this},loadMediaStream:function(l,u,v){return this.loadHandler(null,u,v,l)},loadHandler:function(l,u,v,g){u||(u=!1);var x=this.video;if(x?(this.removeLoadEventHandlers(),this.stop()):(x=document.createElement("video"),x.controls=!1,x.setAttribute("playsinline","playsinline"),x.setAttribute("preload","auto"),x.setAttribute("disablePictureInPicture","true")),u?(x.muted=!0,x.defaultMuted=!0,x.setAttribute("autoplay","autoplay")):(x.muted=!1,x.defaultMuted=!1,x.removeAttribute("autoplay")),v?x.setAttribute("crossorigin",v):x.removeAttribute("crossorigin"),g)if("srcObject"in x)try{x.srcObject=g}catch(y){if(y.name!=="TypeError")throw y;x.src=URL.createObjectURL(g)}else x.src=URL.createObjectURL(g);else x.src=l;this.retry=0,this.video=x,this._playCalled=!1,x.load(),this.addLoadEventHandlers();var m=this.scene.sys.textures.get(this._key);return this.setTexture(m),this},requestVideoFrame:function(l,u){var v=this.video;if(v){var g=u.width,x=u.height,m=this.videoTexture,y=this.videoTextureSource,T=!m||y.source!==v;T?(this._codePaused=v.paused,this._codeMuted=v.muted,m?(y.source=v,y.width=g,y.height=x,m.get().setSize(g,x)):(m=this.scene.sys.textures.create(this._key,v,g,x),m.add("__BASE",0,0,0,g,x),this.setTexture(m),this.videoTexture=m,this.videoTextureSource=m.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,m)),this.setSizeToFrame(),this.updateDisplayOrigin()):y.update(),this.isStalled=!1,this.metadata=u;var E=u.mediaTime;T&&(this._lastUpdate=E,this.emit(r.VIDEO_CREATED,this,g,x),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?E>=this._markerOut&&(v.loop?(v.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):E-1&&v>u&&v=0&&!isNaN(v)&&v>u&&(this.markers[l]=[u,v]),this},playMarker:function(l,u){var v=this.markers[l];return v&&this.play(u,v[0],v[1]),this},removeMarker:function(l){return delete this.markers[l],this},snapshot:function(l,u){return l===void 0&&(l=this.width),u===void 0&&(u=this.height),this.snapshotArea(0,0,this.width,this.height,l,u)},snapshotArea:function(l,u,v,g,x,m){l===void 0&&(l=0),u===void 0&&(u=0),v===void 0&&(v=this.width),g===void 0&&(g=this.height),x===void 0&&(x=v),m===void 0&&(m=g);var y=this.video,T=this.snapshotTexture;return T?(T.setSize(x,m),y&&T.context.drawImage(y,l,u,v,g,0,0,x,m)):(T=this.scene.sys.textures.createCanvas(i(),x,m),this.snapshotTexture=T,y&&T.context.drawImage(y,l,u,v,g,0,0,x,m)),T.update()},saveSnapshotTexture:function(l){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,l):this.snapshotTexture=this.scene.sys.textures.createCanvas(l,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var l=this.scene.sys.sound;l&&l.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(l){var u=l.name;u==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):u==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,l)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,l))},legacyPlayHandler:function(){var l=this.video;l&&(this.playSuccess(),l.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(l){this.stop(!1),this.emit(r.VIDEO_ERROR,this,l)},metadataHandler:function(l){this.emit(r.VIDEO_METADATA,this,l)},setSizeToFrame:function(l){l||(l=this.frame),this.width=l.realWidth,this.height=l.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=this.width,u.hitArea.height=this.height),this},stalledHandler:function(l){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,l)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(l,u){var v=this.video;!v||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=u,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(l){var u=this.video;if(u){var v=u.duration;if(v!==1/0&&!isNaN(v)){var g=v*l;this.setCurrentTime(g)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(l){var u=this.video;if(u){if(typeof l=="string"){var v=l[0],g=parseFloat(l.substr(1));v==="+"?l=u.currentTime+g:v==="-"&&(l=u.currentTime-g)}u.currentTime=l}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var l=this.video;if(l){var u=l.duration;if(u!==1/0&&!isNaN(u))return l.currentTime/u}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(l){l===void 0&&(l=!0),this._codeMuted=l;var u=this.video;return u&&(u.muted=this._systemMuted?!0:l),this},isMuted:function(){return this._codeMuted},globalMute:function(l,u){this._systemMuted=u;var v=this.video;v&&(v.muted=this._codeMuted?!0:u)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(l){l===void 0&&(l=!0);var u=this.video;return this._codePaused=l,u&&!u.ended&&(l?u.paused||(this.removeEventHandlers(),u.pause()):l||(this._playCalled?u.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(l){return l===void 0&&(l=1),this.video&&(this.video.volume=d(l,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(l){return this.video&&(this.video.playbackRate=l),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(l){return l===void 0&&(l=!0),this.video&&(this.video.loop=l),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(l,u){return u===void 0&&(u=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,l),this.videoTextureSource.setFlipY(u)),this._key=l,this.flipY=u,!!this.videoTexture},stop:function(l){l===void 0&&(l=!0);var u=this.video;return u&&(this.removeEventHandlers(),u.cancelVideoFrameCallback(this._rfvCallbackId),u.pause()),this.retry=0,this._playCalled=!1,l&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var l=this.video;if(l){for(l.parentNode&&l.parentNode.removeChild(l);l.hasChildNodes();)l.removeChild(l.firstChild);l.removeAttribute("autoplay"),l.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var l=this.scene.sys.game.events;l.off(n.PAUSE,this.globalPause,this),l.off(n.RESUME,this.globalResume,this);var u=this.scene.sys.sound;u&&u.off(h.GLOBAL_MUTE,this.globalMute,this)}});p.exports=f},58352:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d.videoTexture&&(c.addToRenderList(d),t.batchSprite(d,d.frame,c,a))};p.exports=S},11511:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25305),c=t(44603),a=t(23568),r=t(18471);c.register("video",function(n,e){n===void 0&&(n={});var s=a(n,"key",null),h=new r(this.scene,0,0,s);return e!==void 0&&(n.add=e),d(this.scene,h,n),h})},89025:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(18471),c=t(39429);c.register("video",function(a,r,n){return this.displayList.add(new d(this.scene,a,r,n))})},10247:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(29849),a=t(58352),p.exports={renderWebGL:c,renderCanvas:a}},29849:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d.videoTexture&&(c.addToRenderList(d),d.pipeline.batchSprite(d,c,a))};p.exports=S},41481:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c=t(96503),a=t(87902),r=t(83419),n=t(31401),e=t(95643),s=t(87841),h=t(37303),i=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(f,l,u,v,g){v===void 0&&(v=1),g===void 0&&(g=v),e.call(this,f,"Zone"),this.setPosition(l,u),this.width=v,this.height=g,this.blendMode=d.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(o){this.scaleX=o/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(o){this.scaleY=o/this.height}},setSize:function(o,f,l){l===void 0&&(l=!0),this.width=o,this.height=f,this.updateDisplayOrigin();var u=this.input;return l&&u&&!u.customHitArea&&(u.hitArea.width=o,u.hitArea.height=f),this},setDisplaySize:function(o,f){return this.displayWidth=o,this.displayHeight=f,this},setCircleDropZone:function(o){return this.setDropZone(new c(0,0,o),a)},setRectangleDropZone:function(o,f){return this.setDropZone(new s(0,0,o,f),h)},setDropZone:function(o,f){return this.input||this.setInteractive(o,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(o,f,l){l.addToRenderList(f)},renderWebGL:function(o,f,l){l.addToRenderList(f)}});p.exports=i},95261:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44603),c=t(23568),a=t(41481);d.register("zone",function(r){var n=c(r,"x",0),e=c(r,"y",0),s=c(r,"width",1),h=c(r,"height",s);return new a(this.scene,n,e,s,h)})},84175:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41481),c=t(39429);c.register("zone",function(a,r,n,e){return this.displayList.add(new d(this.scene,a,r,n,e))})},95166:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};p.exports=S},96503:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(87902),a=t(26241),r=t(79124),n=t(23777),e=t(28176),s=new d({initialize:function(i,o,f){i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=0),this.type=n.CIRCLE,this.x=i,this.y=o,this._radius=f,this._diameter=f*2},contains:function(h,i){return c(this,h,i)},getPoint:function(h,i){return a(this,h,i)},getPoints:function(h,i,o){return r(this,h,i,o)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,i,o){return this.x=h,this.y=i,this._radius=o,this._diameter=o*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(h,i){return i===void 0&&(i=h),this.x=h,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this._diameter=h*2}},diameter:{get:function(){return this._diameter},set:function(h){this._diameter=h,this._radius=h*.5}},left:{get:function(){return this.x-this._radius},set:function(h){this.x=h+this._radius}},right:{get:function(){return this.x+this._radius},set:function(h){this.x=h-this._radius}},top:{get:function(){return this.y-this._radius},set:function(h){this.y=h+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(h){this.y=h-this._radius}}});p.exports=s},71562:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 2*(Math.PI*t.radius)};p.exports=S},92110:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r,n){return n===void 0&&(n=new d),n.x=a.x+a.radius*Math.cos(r),n.y=a.y+a.radius*Math.sin(r),n};p.exports=c},42250:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(96503),c=function(a){return new d(a.x,a.y,a.radius)};p.exports=c},87902:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(t.radius>0&&d>=t.left&&d<=t.right&&c>=t.top&&c<=t.bottom){var a=(t.x-d)*(t.x-d),r=(t.y-c)*(t.y-c);return a+r<=t.radius*t.radius}else return!1};p.exports=S},5698:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87902),c=function(a,r){return d(a,r.x,r.y)};p.exports=c},70588:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87902),c=function(a,r){return d(a,r.x,r.y)&&d(a,r.right,r.y)&&d(a,r.x,r.bottom)&&d(a,r.right,r.bottom)};p.exports=c},26394:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y,t.radius)};p.exports=S},76278:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.radius===d.radius};p.exports=S},2074:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a,r){return r===void 0&&(r=new d),r.x=a.left,r.y=a.top,r.width=a.diameter,r.height=a.diameter,r};p.exports=c},26241:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(92110),c=t(62945),a=t(36383),r=t(2141),n=function(e,s,h){h===void 0&&(h=new r);var i=c(s,0,a.PI2);return d(e,i,h)};p.exports=n},79124:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71562),c=t(92110),a=t(62945),r=t(36383),n=function(e,s,h,i){i===void 0&&(i=[]),!s&&h>0&&(s=d(e)/h);for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},39212:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},28176:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){r===void 0&&(r=new d);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),s=e>1?2-e:e,h=s*Math.cos(n),i=s*Math.sin(n);return r.x=a.x+h*a.radius,r.y=a.y+i*a.radius,r};p.exports=c},88911:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(96503);d.Area=t(95166),d.Circumference=t(71562),d.CircumferencePoint=t(92110),d.Clone=t(42250),d.Contains=t(87902),d.ContainsPoint=t(5698),d.ContainsRect=t(70588),d.CopyFrom=t(26394),d.Equals=t(76278),d.GetBounds=t(2074),d.GetPoint=t(26241),d.GetPoints=t(79124),d.Offset=t(50884),d.OffsetPoint=t(39212),d.Random=t(28176),p.exports=d},23777:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};p.exports=S},78874:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};p.exports=S},92990:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.width/2,c=t.height/2,a=Math.pow(d-c,2)/Math.pow(d+c,2);return Math.PI*(d+c)*(1+3*a/(10+Math.sqrt(4-3*a)))};p.exports=S},79522:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r,n){n===void 0&&(n=new d);var e=a.width/2,s=a.height/2;return n.x=a.x+e*Math.cos(r),n.y=a.y+s*Math.sin(r),n};p.exports=c},58102:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8497),c=function(a){return new d(a.x,a.y,a.width,a.height)};p.exports=c},81154:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(t.width<=0||t.height<=0)return!1;var a=(d-t.x)/t.width,r=(c-t.y)/t.height;return a*=a,r*=r,a+r<.25};p.exports=S},46662:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(81154),c=function(a,r){return d(a,r.x,r.y)};p.exports=c},1632:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(81154),c=function(a,r){return d(a,r.x,r.y)&&d(a,r.right,r.y)&&d(a,r.x,r.bottom)&&d(a,r.right,r.bottom)};p.exports=c},65534:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S},8497:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(81154),a=t(90549),r=t(48320),n=t(23777),e=t(24820),s=new d({initialize:function(i,o,f,l){i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=0),this.type=n.ELLIPSE,this.x=i,this.y=o,this.width=f,this.height=l},contains:function(h,i){return c(this,h,i)},getPoint:function(h,i){return a(this,h,i)},getPoints:function(h,i,o){return r(this,h,i,o)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,i,o,f){return this.x=h,this.y=i,this.width=o,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(h,i){return i===void 0&&(i=h),this.x=h,this.y=i,this},setSize:function(h,i){return i===void 0&&(i=h),this.width=h,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(h){this.x=h+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(h){this.x=h-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(h){this.y=h+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(h){this.y=h-this.height/2}}});p.exports=s},36146:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S},23694:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a,r){return r===void 0&&(r=new d),r.x=a.left,r.y=a.top,r.width=a.width,r.height=a.height,r};p.exports=c},90549:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79522),c=t(62945),a=t(36383),r=t(2141),n=function(e,s,h){h===void 0&&(h=new r);var i=c(s,0,a.PI2);return d(e,i,h)};p.exports=n},48320:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(92990),c=t(79522),a=t(62945),r=t(36383),n=function(e,s,h,i){i===void 0&&(i=[]),!s&&h>0&&(s=d(e)/h);for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},44808:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},24820:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){r===void 0&&(r=new d);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=a.x+e*Math.cos(n)*a.width/2,r.y=a.y+e*Math.sin(n)*a.height/2,r};p.exports=c},49203:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8497);d.Area=t(78874),d.Circumference=t(92990),d.CircumferencePoint=t(79522),d.Clone=t(58102),d.Contains=t(81154),d.ContainsPoint=t(46662),d.ContainsRect=t(1632),d.CopyFrom=t(65534),d.Equals=t(36146),d.GetBounds=t(23694),d.GetPoint=t(90549),d.GetPoints=t(48320),d.Offset=t(73424),d.OffsetPoint=t(44808),d.Random=t(24820),p.exports=d},55738:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23777),c=t(79291),a={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Mesh:t(73090),Point:t(43711),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};a=c(!1,a,d),p.exports=a},2044:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20339),c=function(a,r){return d(a.x,a.y,r.x,r.y)<=a.radius+r.radius};p.exports=c},81491:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=d.width/2,a=d.height/2,r=Math.abs(t.x-d.x-c),n=Math.abs(t.y-d.y-a),e=c+t.radius,s=a+t.radius;if(r>e||n>s)return!1;if(r<=c||n<=a)return!0;var h=r-c,i=n-a,o=h*h,f=i*i,l=t.radius*t.radius;return o+f<=l};p.exports=S},63376:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(2044),a=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x,h=r.y,i=r.radius,o=n.x,f=n.y,l=n.radius,u,v,g,x,m;if(h===f)m=(l*l-i*i-o*o+s*s)/(2*(s-o)),u=1,v=-2*f,g=o*o+m*m-2*o*m+f*f-l*l,x=v*v-4*u*g,x===0?e.push(new d(m,-v/(2*u))):x>0&&(e.push(new d(m,(-v+Math.sqrt(x))/(2*u))),e.push(new d(m,(-v-Math.sqrt(x))/(2*u))));else{var y=(s-o)/(h-f),T=(l*l-i*i-o*o+s*s-f*f+h*h)/(2*(h-f));u=y*y+1,v=2*h*y-2*T*y-2*s,g=s*s+h*h+T*T-i*i-2*h*T,x=v*v-4*u*g,x===0?(m=-v/(2*u),e.push(new d(m,T-m*y))):x>0&&(m=(-v+Math.sqrt(x))/(2*u),e.push(new d(m,T-m*y)),m=(-v-Math.sqrt(x))/(2*u),e.push(new d(m,T-m*y)))}}return e};p.exports=a},97439:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(4042),c=t(81491),a=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=n.getLineA(),h=n.getLineB(),i=n.getLineC(),o=n.getLineD();d(s,r,e),d(h,r,e),d(i,r,e),d(o,r,e)}return e};p.exports=a},4042:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(80462),a=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x1,h=r.y1,i=r.x2,o=r.y2,f=n.x,l=n.y,u=n.radius,v=i-s,g=o-h,x=s-f,m=h-l,y=v*v+g*g,T=2*(v*x+g*m),E=x*x+m*m-u*u,C=T*T-4*y*E,A,P;if(C===0){var M=-T/(2*y);A=s+M*v,P=h+M*g,M>=0&&M<=1&&e.push(new d(A,P))}else if(C>0){var F=(-T-Math.sqrt(C))/(2*y);A=s+F*v,P=h+F*g,F>=0&&F<=1&&e.push(new d(A,P));var L=(-T+Math.sqrt(C))/(2*y);A=s+L*v,P=h+L*g,L>=0&&L<=1&&e.push(new d(A,P))}}return e};p.exports=a},36100:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25836),c=function(a,r,n,e){n===void 0&&(n=!1);var s=a.x1,h=a.y1,i=a.x2,o=a.y2,f=r.x1,l=r.y1,u=r.x2,v=r.y2,g=i-s,x=o-h,m=u-f,y=v-l,T=g*y-x*m;if(T===0)return null;var E,C,A;if(n){if(E=(g*(l-h)+x*(s-f))/(m*x-y*g),C=(f+m*E-s)/g,C<0||E<0||E>1)return null;A=C}else{if(E=((f-s)*y-(l-h)*m)/T,C=((h-l)*g-(s-f)*x)/T,E<0||E>1||C<0||C>1)return null;A=E}return e===void 0&&(e=new d),e.set(s+g*A,h+x*A,A)};p.exports=c},3073:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36100),c=t(23031),a=t(25836),r=new c,n=new a,e=function(s,h,i,o){i===void 0&&(i=!1),o===void 0&&(o=new a);var f=!1;o.set(),n.set();for(var l=h[h.length-1],u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25836),c=t(61369),a=t(3073),r=new d,n=function(e,s,h,i){i===void 0&&(i=new c),Array.isArray(s)||(s=[s]);var o=!1;i.set(),r.set();for(var f=0;f{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(76112),a=t(92773),r=function(n,e,s){if(s===void 0&&(s=[]),a(n,e))for(var h=e.getLineA(),i=e.getLineB(),o=e.getLineC(),f=e.getLineD(),l=[new d,new d,new d,new d],u=[c(h,n,l[0]),c(i,n,l[1]),c(o,n,l[2]),c(f,n,l[3])],v=0;v<4;v++)u[v]&&s.push(l[v]);return s};p.exports=r},71147:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61369),c=t(56362),a=t(23031),r=new a;function n(h,i,o,f,l){var u=Math.cos(h),v=Math.sin(h);r.setTo(i,o,i+u,o+v);var g=c(r,f,!0);g&&l.push(new d(g.x,g.y,h,g.w))}function e(h,i){return h.z-i.z}var s=function(h,i,o){Array.isArray(o)||(o=[o]);for(var f=[],l=[],u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=t(59996),a=function(r,n,e){return e===void 0&&(e=new d),c(r,n)&&(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y),e};p.exports=a},52784:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60646),c=t(59996),a=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),h=r.getLineB(),i=r.getLineC(),o=r.getLineD();d(s,n,e),d(h,n,e),d(i,n,e),d(o,n,e)}return e};p.exports=a},26341:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(89265),c=t(60646),a=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),h=n.getLineB(),i=n.getLineC();c(s,r,e),c(h,r,e),c(i,r,e)}return e};p.exports=a},38720:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(4042),c=t(67636),a=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),h=r.getLineB(),i=r.getLineC();d(s,n,e),d(h,n,e),d(i,n,e)}return e};p.exports=a},13882:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(2822),a=t(76112),r=function(n,e,s){if(s===void 0&&(s=[]),c(n,e))for(var h=n.getLineA(),i=n.getLineB(),o=n.getLineC(),f=[new d,new d,new d],l=[a(h,e,f[0]),a(i,e,f[1]),a(o,e,f[2])],u=0;u<3;u++)l[u]&&s.push(f[u]);return s};p.exports=r},75636:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82944),c=t(13882),a=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),h=n.getLineB(),i=n.getLineC();c(r,s,e),c(r,h,e),c(r,i,e)}return e};p.exports=a},80462:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87902),c=t(2141),a=new c,r=function(n,e,s){if(s===void 0&&(s=a),d(e,n.x1,n.y1))return s.x=n.x1,s.y=n.y1,!0;if(d(e,n.x2,n.y2))return s.x=n.x2,s.y=n.y2,!0;var h=n.x2-n.x1,i=n.y2-n.y1,o=e.x-n.x1,f=e.y-n.y1,l=h*h+i*i,u=h,v=i;if(l>0){var g=(o*h+f*i)/l;u*=g,v*=g}s.x=n.x1+u,s.y=n.y1+v;var x=u*u+v*v;return x<=l&&u*h+v*i>=0&&d(e,s.x,s.y)};p.exports=r},76112:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=t.x1,r=t.y1,n=t.x2,e=t.y2,s=d.x1,h=d.y1,i=d.x2,o=d.y2;if(a===n&&r===e||s===i&&h===o)return!1;var f=(o-h)*(n-a)-(i-s)*(e-r);if(f===0)return!1;var l=((i-s)*(r-h)-(o-h)*(a-s))/f,u=((n-a)*(r-h)-(e-r)*(a-s))/f;return l<0||l>1||u<0||u>1?!1:(c&&(c.x=a+l*(n-a),c.y=r+l*(e-r)),!0)};p.exports=S},92773:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x1,a=t.y1,r=t.x2,n=t.y2,e=d.x,s=d.y,h=d.right,i=d.bottom,o=0;if(c>=e&&c<=h&&a>=s&&a<=i||r>=e&&r<=h&&n>=s&&n<=i)return!0;if(c=e){if(o=a+(n-a)*(e-c)/(r-c),o>s&&o<=i)return!0}else if(c>h&&r<=h&&(o=a+(n-a)*(h-c)/(r-c),o>=s&&o<=i))return!0;if(a=s){if(o=c+(r-c)*(s-a)/(n-a),o>=e&&o<=h)return!0}else if(a>i&&n<=i&&(o=c+(r-c)*(i-a)/(n-a),o>=e&&o<=h))return!0;return!1};p.exports=S},16204:p=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){c===void 0&&(c=1);var a=d.x1,r=d.y1,n=d.x2,e=d.y2,s=t.x,h=t.y,i=(n-a)*(n-a)+(e-r)*(e-r);if(i===0)return!1;var o=((s-a)*(n-a)+(h-r)*(e-r))/i;if(o<0)return Math.sqrt((a-s)*(a-s)+(r-h)*(r-h))<=c;if(o>=0&&o<=1){var f=((r-h)*(n-a)-(a-s)*(e-r))/i;return Math.abs(f)*Math.sqrt(i)<=c}else return Math.sqrt((n-s)*(n-s)+(e-h)*(e-h))<=c};p.exports=S},14199:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16204),c=function(a,r){if(!d(a,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),s=Math.min(r.y1,r.y2),h=Math.max(r.y1,r.y2);return a.x>=n&&a.x<=e&&a.y>=s&&a.y<=h};p.exports=c},59996:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.width<=0||t.height<=0||d.width<=0||d.height<=0?!1:!(t.rightd.right||t.y>d.bottom)};p.exports=S},89265:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(76112),c=t(37303),a=t(48653),r=t(77493),n=function(e,s){if(s.left>e.right||s.righte.bottom||s.bottom0};p.exports=n},84411:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r,n){return n===void 0&&(n=0),!(d>t.right+n||ct.bottom+n||r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(80462),c=t(10690),a=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(76112),c=function(a,r){return!!(a.contains(r.x1,r.y1)||a.contains(r.x2,r.y2)||d(a.getLineA(),r)||d(a.getLineB(),r)||d(a.getLineC(),r))};p.exports=c},82944:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(48653),c=t(71694),a=t(76112),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(u=c(e),v=d(n,u,!0),v.length>0)};p.exports=r},91865:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CircleToCircle:t(2044),CircleToRectangle:t(81491),GetCircleToCircle:t(63376),GetCircleToRectangle:t(97439),GetLineToCircle:t(4042),GetLineToLine:t(36100),GetLineToPoints:t(3073),GetLineToPolygon:t(56362),GetLineToRectangle:t(60646),GetRaysFromPointToPolygon:t(71147),GetRectangleIntersection:t(68389),GetRectangleToRectangle:t(52784),GetRectangleToTriangle:t(26341),GetTriangleToCircle:t(38720),GetTriangleToLine:t(13882),GetTriangleToTriangle:t(75636),LineToCircle:t(80462),LineToLine:t(76112),LineToRectangle:t(92773),PointToLine:t(16204),PointToLineSegment:t(14199),RectangleToRectangle:t(59996),RectangleToTriangle:t(89265),RectangleToValues:t(84411),TriangleToCircle:t(67636),TriangleToLine:t(2822),TriangleToTriangle:t(82944)}},91938:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};p.exports=S},84993:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){d===void 0&&(d=1),c===void 0&&(c=[]);var a=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),s=Math.abs(n-a),h=Math.abs(e-r),i=a-h&&(f-=h,a+=i),u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=d-(t.x1+t.x2)/2,r=c-(t.y1+t.y2)/2;return t.x1+=a,t.y1+=r,t.x2+=a,t.y2+=r,t};p.exports=S},31116:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23031),c=function(a){return new d(a.x1,a.y1,a.x2,a.y2)};p.exports=c},59944:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2)};p.exports=S},59220:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2};p.exports=S},78177:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35001),c=function(a,r,n){n===void 0&&(n=r);var e=d(a),s=a.x2-a.x1,h=a.y2-a.y1;return r&&(a.x1=a.x1-s/e*r,a.y1=a.y1-h/e*r),n&&(a.x2=a.x2+s/e*n,a.y2=a.y2+h/e*n),a};p.exports=c},26708:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(52816),c=t(6113),a=t(2141),r=function(n,e,s,h,i){h===void 0&&(h=0),i===void 0&&(i=[]);var o=[],f=n.x1,l=n.y1,u=n.x2-f,v=n.y2-l,g=c(e,i),x,m,y=s-1;for(x=0;x0){var T=o[0],E=[T];for(x=1;x=h&&(E.push(C),T=C)}var A=o[o.length-1];return d(T,A){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){return r===void 0&&(r=new d),r.x=(a.x1+a.x2)/2,r.y=(a.y1+a.y2)/2,r};p.exports=c},99569:(p,S,t)=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r,n){n===void 0&&(n=new d);var e=a.x1,s=a.y1,h=a.x2,i=a.y2,o=(h-e)*(h-e)+(i-s)*(i-s);if(o===0)return n;var f=((r.x-e)*(h-e)+(r.y-s)*(i-s))/o;return n.x=e+f*(h-e),n.y=s+f*(i-s),n};p.exports=c},34638:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=t(91938),a=t(2141),r=function(n,e){e===void 0&&(e=new a);var s=c(n)-d.TAU;return e.x=Math.cos(s),e.y=Math.sin(s),e};p.exports=r},13151:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r,n){return n===void 0&&(n=new d),n.x=a.x1+(a.x2-a.x1)*r,n.y=a.y1+(a.y2-a.y1)*r,n};p.exports=c},15258:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35001),c=t(2141),a=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=d(r)/e);for(var h=r.x1,i=r.y1,o=r.x2,f=r.y2,l=0;l{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x1,a=t.y1,r=t.x2,n=t.y2,e=(r-c)*(r-c)+(n-a)*(n-a);if(e===0)return!1;var s=((a-d.y)*(r-c)-(c-d.x)*(n-a))/e;return Math.abs(s)*Math.sqrt(e)};p.exports=S},98770:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.abs(t.y1-t.y2)};p.exports=S},35001:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};p.exports=S},23031:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(13151),a=t(15258),r=t(23777),n=t(65822),e=t(26099),s=new d({initialize:function(i,o,f,l){i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=0),this.type=r.LINE,this.x1=i,this.y1=o,this.x2=f,this.y2=l},getPoint:function(h,i){return c(this,h,i)},getPoints:function(h,i,o){return a(this,h,i,o)},getRandomPoint:function(h){return n(this,h)},setTo:function(h,i,o,f){return h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=0),this.x1=h,this.y1=i,this.x2=o,this.y2=f,this},setFromObjects:function(h,i){return this.x1=h.x,this.y1=h.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(h){return h===void 0&&(h=new e),h.set(this.x1,this.y1),h},getPointB:function(h){return h===void 0&&(h=new e),h.set(this.x2,this.y2),h},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(h){this.x1<=this.x2?this.x1=h:this.x2=h}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(h){this.x1>this.x2?this.x1=h:this.x2=h}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(h){this.y1<=this.y2?this.y1=h:this.y2=h}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(h){this.y1>this.y2?this.y1=h:this.y2=h}}});p.exports=s},64795:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=t(15994),a=t(91938),r=function(n){var e=a(n)-d.TAU;return c(e,-Math.PI,Math.PI)};p.exports=r},52616:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=t(91938),a=function(r){return Math.cos(c(r)-d.TAU)};p.exports=a},87231:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=t(91938),a=function(r){return Math.sin(c(r)-d.TAU)};p.exports=a},89662:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t};p.exports=S},71165:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};p.exports=S},65822:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){r===void 0&&(r=new d);var n=Math.random();return r.x=a.x1+n*(a.x2-a.x1),r.y=a.y1+n*(a.y2-a.y1),r};p.exports=c},69777:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91938),c=t(64795),a=function(r,n){return 2*c(n)-Math.PI-d(r)};p.exports=a},39706:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(64400),c=function(a,r){var n=(a.x1+a.x2)/2,e=(a.y1+a.y2)/2;return d(a,n,e,r)};p.exports=c},82585:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(64400),c=function(a,r,n){return d(a,r.x,r.y,n)};p.exports=c},64400:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=Math.cos(a),n=Math.sin(a),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,t};p.exports=S},62377:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){return t.x1=d,t.y1=c,t.x2=d+Math.cos(a)*r,t.y2=c+Math.sin(a)*r,t};p.exports=S},71366:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};p.exports=S},10809:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.abs(t.x1-t.x2)};p.exports=S},2529:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23031);d.Angle=t(91938),d.BresenhamPoints=t(84993),d.CenterOn=t(36469),d.Clone=t(31116),d.CopyFrom=t(59944),d.Equals=t(59220),d.Extend=t(78177),d.GetEasedPoints=t(26708),d.GetMidPoint=t(32125),d.GetNearestPoint=t(99569),d.GetNormal=t(34638),d.GetPoint=t(13151),d.GetPoints=t(15258),d.GetShortestDistance=t(26408),d.Height=t(98770),d.Length=t(35001),d.NormalAngle=t(64795),d.NormalX=t(52616),d.NormalY=t(87231),d.Offset=t(89662),d.PerpSlope=t(71165),d.Random=t(65822),d.ReflectAngle=t(69777),d.Rotate=t(39706),d.RotateAroundPoint=t(82585),d.RotateAroundXY=t(64400),d.SetToAngle=t(62377),d.Slope=t(71366),d.Width=t(10809),p.exports=d},83997:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(87841),a=t(26099);function r(e,s,h,i){var o=e-h,f=s-i,l=o*o+f*f;return Math.sqrt(l)}var n=new d({initialize:function(s,h,i){this.vertex1=s,this.vertex2=h,this.vertex3=i,this.bounds=new c,this._inCenter=new a},getInCenter:function(e){e===void 0&&(e=!0);var s=this.vertex1,h=this.vertex2,i=this.vertex3,o,f,l,u,v,g;e?(o=s.x,f=s.y,l=h.x,u=h.y,v=i.x,g=i.y):(o=s.vx,f=s.vy,l=h.vx,u=h.vy,v=i.vx,g=i.vy);var x=r(v,g,l,u),m=r(o,f,v,g),y=r(l,u,o,f),T=x+m+y;return this._inCenter.set((o*x+l*m+v*y)/T,(f*x+u*m+g*y)/T)},contains:function(e,s,h){var i=this.vertex1,o=this.vertex2,f=this.vertex3,l=i.vx,u=i.vy,v=o.vx,g=o.vy,x=f.vx,m=f.vy;if(h){var y=h.a,T=h.b,E=h.c,C=h.d,A=h.e,P=h.f;l=i.vx*y+i.vy*E+A,u=i.vx*T+i.vy*C+P,v=o.vx*y+o.vy*E+A,g=o.vx*T+o.vy*C+P,x=f.vx*y+f.vy*E+A,m=f.vx*T+f.vy*C+P}var M=x-l,F=m-u,L=v-l,D=g-u,I=e-l,U=s-u,z=M*M+F*F,w=M*L+F*D,G=M*I+F*U,R=L*L+D*D,O=L*I+D*U,B=z*R-w*w,N=B===0?0:1/B,X=(R*G-w*O)*N,V=(z*O-w*G)*N;return X>=0&&V>=0&&X+V<1},isCounterClockwise:function(e){var s=this.vertex1,h=this.vertex2,i=this.vertex3,o=(h.vx-s.vx)*(i.vy-s.vy)-(h.vy-s.vy)*(i.vx-s.vx);return e<=0?o>=0:o<0},load:function(e,s,h,i,o){return h=this.vertex1.load(e,s,h,i,o),h=this.vertex2.load(e,s,h,i,o),h=this.vertex3.load(e,s,h,i,o),h},transformCoordinatesLocal:function(e,s,h,i){return this.vertex1.transformCoordinatesLocal(e,s,h,i),this.vertex2.transformCoordinatesLocal(e,s,h,i),this.vertex3.transformCoordinatesLocal(e,s,h,i),this},updateBounds:function(){var e=this.vertex1,s=this.vertex2,h=this.vertex3,i=this.bounds;return i.x=Math.min(e.vx,s.vx,h.vx),i.y=Math.min(e.vy,s.vy,h.vy),i.width=Math.max(e.vx,s.vx,h.vx)-i.x,i.height=Math.max(e.vy,s.vy,h.vy)-i.y,this},isInView:function(e,s,h,i,o,f,l,u,v,g,x){this.update(i,o,f,l,u,v,g,x);var m=this.vertex1,y=this.vertex2,T=this.vertex3;if(m.ta<=0&&y.ta<=0&&T.ta<=0||s&&!this.isCounterClockwise(h))return!1;var E=this.bounds;E.x=Math.min(m.tx,y.tx,T.tx),E.y=Math.min(m.ty,y.ty,T.ty),E.width=Math.max(m.tx,y.tx,T.tx)-E.x,E.height=Math.max(m.ty,y.ty,T.ty)-E.y;var C=e.x+e.width,A=e.y+e.height;return E.width<=0||E.height<=0||e.width<=0||e.height<=0?!1:!(E.rightC||E.y>A)},scrollUV:function(e,s){return this.vertex1.scrollUV(e,s),this.vertex2.scrollUV(e,s),this.vertex3.scrollUV(e,s),this},scaleUV:function(e,s){return this.vertex1.scaleUV(e,s),this.vertex2.scaleUV(e,s),this.vertex3.scaleUV(e,s),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,s,h,i,o,f,l,u){return this.vertex1.update(s,h,i,o,f,l,u,e),this.vertex2.update(s,h,i,o,f,l,u,e),this.vertex3.update(s,h,i,o,f,l,u,e),this},translate:function(e,s){s===void 0&&(s=0);var h=this.vertex1,i=this.vertex2,o=this.vertex3;return h.x+=e,h.y+=s,i.x+=e,i.y+=s,o.x+=e,o.y+=s,this},x:{get:function(){return this.getInCenter().x},set:function(e){var s=this.getInCenter();this.translate(e-s.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var s=this.getInCenter();this.translate(0,e-s.y)}},alpha:{get:function(){var e=this.vertex1,s=this.vertex2,h=this.vertex3;return(e.alpha+s.alpha+h.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,s=this.vertex2,h=this.vertex3;return(e.vz+s.vz+h.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});p.exports=n},48803:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83997),c=t(95540),a=t(37867),r=t(25836),n=t(39318),e=new r,s=new r,h=new a,i=function(o){var f=c(o,"mesh"),l=c(o,"texture",null),u=c(o,"frame"),v=c(o,"width",1),g=c(o,"height",v),x=c(o,"widthSegments",1),m=c(o,"heightSegments",x),y=c(o,"x",0),T=c(o,"y",0),E=c(o,"z",0),C=c(o,"rotateX",0),A=c(o,"rotateY",0),P=c(o,"rotateZ",0),M=c(o,"zIsUp",!0),F=c(o,"isOrtho",f?f.dirtyCache[11]:!1),L=c(o,"colors",[16777215]),D=c(o,"alphas",[1]),I=c(o,"tile",!1),U=c(o,"flipY",!1),z=c(o,"width",null),w={faces:[],verts:[]};e.set(y,T,E),s.set(C,A,P),h.fromRotationXYTranslation(s,e,M);var G;if(!l&&f)l=f.texture,u||(G=f.frame);else if(f&&typeof l=="string")l=f.scene.sys.textures.get(l);else if(!l)return w;G||(G=l.get(u)),!z&&F&&l&&f&&(v=G.width/f.height,g=G.height/f.height);var R=v/2,O=g/2,B=Math.floor(x),N=Math.floor(m),X=B+1,V=N+1,Y=v/B,W=g/N,H=[],b=[],K,J,Z=0,$=1,q=0,tt=1;G&&(Z=G.u0,$=G.u1,U?(q=G.v1,tt=G.v0):(q=G.v0,tt=G.v1));var _=$-Z,Q=tt-q;for(J=0;J{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83997),c=t(37867),a=t(25836),r=t(39318),n=new a,e=new a,s=new c,h=function(i,o,f,l,u,v,g,x,m,y){f===void 0&&(f=1),l===void 0&&(l=0),u===void 0&&(u=0),v===void 0&&(v=0),g===void 0&&(g=0),x===void 0&&(x=0),m===void 0&&(m=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},E=i.materials;n.set(l,u,v),e.set(g,x,m),s.fromRotationXYTranslation(e,n,y);for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83997),c=t(39318),a=function(r,n,e,s,h,i,o,f){if(s===void 0&&(s=!1),i===void 0&&(i=16777215),o===void 0&&(o=1),f===void 0&&(f=!1),r.length!==n.length&&!s){console.warn("GenerateVerts: vertices and uvs count not equal");return}var l={faces:[],vertices:[]},u,v,g,x,m,y,T,E,C,A,P,M=s?3:2,F=Array.isArray(i),L=Array.isArray(o);if(Array.isArray(e)&&e.length>0)for(u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=!0,t="untitled",d="",c="";function a(v){var g=v.indexOf("#");return g>-1?v.substring(0,g):v}function r(v){return v.models.length===0&&v.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),d="",v.models[v.models.length-1]}function n(v,g){var x=v.length>=2?v[1]:t;g.models.push({faces:[],name:x,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function e(v){v.length===2&&(d=v[1])}function s(v,g){var x=v.length,m=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(g).vertices.push({x:m,y,z:T})}function h(v,g){var x=v.length,m=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;isNaN(m)&&(m=0),isNaN(y)&&(y=0),isNaN(T)&&(T=0),S&&(y=1-y),r(g).textureCoords.push({u:m,v:y,w:T})}function i(v,g){var x=v.length,m=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(g).vertexNormals.push({x:m,y,z:T})}function o(v,g){var x=v.length-1;if(!(x<3)){for(var m={group:d,material:c,vertices:[]},y=0;y3)){var A=0,P=0,M=0;A=parseInt(E[0],10),C>1&&E[1]!==""&&(P=parseInt(E[1],10)),C>2&&(M=parseInt(E[2],10)),A!==0&&(A<0&&(A=r(g).vertices.length+1+A),P-=1,A-=1,M-=1,m.vertices.push({textureCoordsIndex:P,vertexIndex:A,vertexNormalIndex:M}))}}r(g).faces.push(m)}}function f(v,g){v.length>=2&&g.materialLibraries.push(v[1])}function l(v){v.length>=2&&(c=v[1])}var u=function(v,g){g===void 0&&(g=!0),S=g;var x={materials:{},materialLibraries:[],models:[]};d="",c="";for(var m=v.split(` +`),y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37589),c=function(a){for(var r={},n=a.split(` +`),e="",s=0;s=2?Math.floor(i[2]*255):o,l=i.length>=3?Math.floor(i[3]*255):o;r[e]=d(o,f,l);break}}}}return r};p.exports=c},92570:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r,n;if(c===void 0&&a===void 0){var e=t.getInCenter();r=e.x,n=e.y}var s=Math.cos(d),h=Math.sin(d),i=t.vertex1,o=t.vertex2,f=t.vertex3,l=i.x-r,u=i.y-n;i.set(l*s-u*h+r,l*h+u*s+n),l=o.x-r,u=o.y-n,o.set(l*s-u*h+r,l*h+u*s+n),l=f.x-r,u=f.y-n,f.set(l*s-u*h+r,l*h+u*s+n)};p.exports=S},39318:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(70554),a=t(25836),r=new d({Extends:a,initialize:function(e,s,h,i,o,f,l,u,v,g){f===void 0&&(f=16777215),l===void 0&&(l=1),u===void 0&&(u=0),v===void 0&&(v=0),g===void 0&&(g=0),a.call(this,e,s,h),this.vx=0,this.vy=0,this.vz=0,this.nx=u,this.ny=v,this.nz=g,this.u=i,this.v=o,this.color=f,this.alpha=l,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=o},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,s,h){var i=this.x,o=this.y,f=this.z,l=n.val,u=i*l[0]+o*l[4]+f*l[8]+l[12],v=i*l[1]+o*l[5]+f*l[9]+l[13],g=i*l[2]+o*l[6]+f*l[10]+l[14],x=i*l[3]+o*l[7]+f*l[11]+l[15];this.vx=u/x*e,this.vy=-(v/x)*s,h<=0?this.vz=g/x:this.vz=-(g/x)},resize:function(n,e,s,h,i,o){return this.x=n,this.y=e,this.vx=this.x*s,this.vy=-this.y*h,this.vz=0,i<.5?this.vx+=s*(.5-i):i>.5&&(this.vx-=s*(i-.5)),o<.5?this.vy+=h*(.5-o):o>.5&&(this.vy-=h*(o-.5)),this},update:function(n,e,s,h,i,o,f,l){var u=this.vx*n+this.vy*s+i,v=this.vx*e+this.vy*h+o;return f&&(u=Math.round(u),v=Math.round(v)),this.tx=u,this.ty=v,this.ta=this.alpha*l,this},load:function(n,e,s,h,i){return n[++s]=this.tx,n[++s]=this.ty,n[++s]=this.tu,n[++s]=this.tv,n[++s]=h,n[++s]=i,e[++s]=c.getTintAppendFloatAlpha(this.color,this.ta),s}});p.exports=r},73090:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};p.exports=d},96550:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};p.exports=S},99706:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a){return new d(a.x,a.y)};p.exports=c},68010:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y)};p.exports=S},27814:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y};p.exports=S},73565:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};p.exports=S},87555:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){if(r===void 0&&(r=new d),!Array.isArray(a))throw new Error("GetCentroid points argument must be an array");var n=a.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=a[0].x,r.y=a[0].y;else{for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};p.exports=S},44405:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x*t.x+t.y*t.y};p.exports=S},20873:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a,r){r===void 0&&(r=new d);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,i=0;in&&(n=o.x),o.xs&&(s=o.y),o.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new d),e.x=a.x+(r.x-a.x)*n,e.y=a.y+(r.y-a.y)*n,e};p.exports=c},55767:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.setTo(t.y,t.x)};p.exports=S},79432:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){return r===void 0&&(r=new d),r.setTo(-a.x,-a.y)};p.exports=c},2141:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23777),a=new d({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=c.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});p.exports=a},72930:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(44405),a=function(r,n,e){e===void 0&&(e=new d);var s=r.x*n.x+r.y*n.y,h=s/c(n);return h!==0&&(e.x=h*n.x,e.y=h*n.y),e};p.exports=a},62880:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r,n){n===void 0&&(n=new d);var e=a.x*r.x+a.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};p.exports=c},15093:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28793),c=function(a,r){if(a.x!==0||a.y!==0){var n=d(a);a.x/=n,a.y/=n}return a.x*=r,a.y*=r,a};p.exports=c},43711:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141);d.Ceil=t(96550),d.Clone=t(99706),d.CopyFrom=t(68010),d.Equals=t(27814),d.Floor=t(73565),d.GetCentroid=t(87555),d.GetMagnitude=t(28793),d.GetMagnitudeSq=t(44405),d.GetRectangleFromPoints=t(20873),d.Interpolate=t(26152),d.Invert=t(55767),d.Negative=t(79432),d.Project=t(72930),d.ProjectUnit=t(62880),d.SetMagnitude=t(15093),p.exports=d},12306:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25717),c=function(a){return new d(a.points)};p.exports=c},63814:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var a=!1,r=-1,n=t.points.length-1;++r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63814),c=function(a,r){return d(a,r.x,r.y)};p.exports=c},94811:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(w,G,R){R=R||2;var O=G&&G.length,B=O?G[0]*R:w.length,N=t(w,0,B,R,!0),X=[];if(!N||N.next===N.prev)return X;var V,Y,W,H,b,K,J;if(O&&(N=s(w,G,N,R)),w.length>80*R){V=W=w[0],Y=H=w[1];for(var Z=R;ZW&&(W=b),K>H&&(H=K);J=Math.max(W-V,H-Y),J=J!==0?32767/J:0}return c(N,X,R,V,Y,J,0),X}function t(w,G,R,O,B){var N,X;if(B===z(w,G,R,O)>0)for(N=G;N=G;N-=O)X=D(N,w[N],w[N+1],X);return X&&T(X,X.next)&&(I(X),X=X.next),X}function d(w,G){if(!w)return w;G||(G=w);var R=w,O;do if(O=!1,!R.steiner&&(T(R,R.next)||y(R.prev,R,R.next)===0)){if(I(R),R=G=R.prev,R===R.next)break;O=!0}else R=R.next;while(O||R!==G);return G}function c(w,G,R,O,B,N,X){if(w){!X&&N&&l(w,O,B,N);for(var V=w,Y,W;w.prev!==w.next;){if(Y=w.prev,W=w.next,N?r(w,O,B,N):a(w)){G.push(Y.i/R|0),G.push(w.i/R|0),G.push(W.i/R|0),I(w),w=W.next,V=W.next;continue}if(w=W,w===V){X?X===1?(w=n(d(w),G,R),c(w,G,R,O,B,N,2)):X===2&&e(w,G,R,O,B,N):c(d(w),G,R,O,B,N,1);break}}}}function a(w){var G=w.prev,R=w,O=w.next;if(y(G,R,O)>=0)return!1;for(var B=G.x,N=R.x,X=O.x,V=G.y,Y=R.y,W=O.y,H=BN?B>X?B:X:N>X?N:X,J=V>Y?V>W?V:W:Y>W?Y:W,Z=O.next;Z!==G;){if(Z.x>=H&&Z.x<=K&&Z.y>=b&&Z.y<=J&&x(B,V,N,Y,X,W,Z.x,Z.y)&&y(Z.prev,Z,Z.next)>=0)return!1;Z=Z.next}return!0}function r(w,G,R,O){var B=w.prev,N=w,X=w.next;if(y(B,N,X)>=0)return!1;for(var V=B.x,Y=N.x,W=X.x,H=B.y,b=N.y,K=X.y,J=VY?V>W?V:W:Y>W?Y:W,q=H>b?H>K?H:K:b>K?b:K,tt=v(J,Z,G,R,O),_=v($,q,G,R,O),Q=w.prevZ,k=w.nextZ;Q&&Q.z>=tt&&k&&k.z<=_;){if(Q.x>=J&&Q.x<=$&&Q.y>=Z&&Q.y<=q&&Q!==B&&Q!==X&&x(V,H,Y,b,W,K,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0||(Q=Q.prevZ,k.x>=J&&k.x<=$&&k.y>=Z&&k.y<=q&&k!==B&&k!==X&&x(V,H,Y,b,W,K,k.x,k.y)&&y(k.prev,k,k.next)>=0))return!1;k=k.nextZ}for(;Q&&Q.z>=tt;){if(Q.x>=J&&Q.x<=$&&Q.y>=Z&&Q.y<=q&&Q!==B&&Q!==X&&x(V,H,Y,b,W,K,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0)return!1;Q=Q.prevZ}for(;k&&k.z<=_;){if(k.x>=J&&k.x<=$&&k.y>=Z&&k.y<=q&&k!==B&&k!==X&&x(V,H,Y,b,W,K,k.x,k.y)&&y(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function n(w,G,R){var O=w;do{var B=O.prev,N=O.next.next;!T(B,N)&&E(B,O,O.next,N)&&M(B,N)&&M(N,B)&&(G.push(B.i/R|0),G.push(O.i/R|0),G.push(N.i/R|0),I(O),I(O.next),O=w=N),O=O.next}while(O!==w);return d(O)}function e(w,G,R,O,B,N){var X=w;do{for(var V=X.next.next;V!==X.prev;){if(X.i!==V.i&&m(X,V)){var Y=L(X,V);X=d(X,X.next),Y=d(Y,Y.next),c(X,G,R,O,B,N,0),c(Y,G,R,O,B,N,0);return}V=V.next}X=X.next}while(X!==w)}function s(w,G,R,O){var B=[],N,X,V,Y,W;for(N=0,X=G.length;N=R.next.y&&R.next.y!==R.y){var V=R.x+(B-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if(V<=O&&V>N&&(N=V,X=R.x=R.x&&R.x>=W&&O!==R.x&&x(BX.x||R.x===X.x&&f(X,R)))&&(X=R,b=K)),R=R.next;while(R!==Y);return X}function f(w,G){return y(w.prev,w,G.prev)<0&&y(G.next,w,w.next)<0}function l(w,G,R,O){var B=w;do B.z===0&&(B.z=v(B.x,B.y,G,R,O)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==w);B.prevZ.nextZ=null,B.prevZ=null,u(B)}function u(w){var G,R,O,B,N,X,V,Y,W=1;do{for(R=w,w=null,N=null,X=0;R;){for(X++,O=R,V=0,G=0;G0||Y>0&&O;)V!==0&&(Y===0||!O||R.z<=O.z)?(B=R,R=R.nextZ,V--):(B=O,O=O.nextZ,Y--),N?N.nextZ=B:w=B,B.prevZ=N,N=B;R=O}N.nextZ=null,W*=2}while(X>1);return w}function v(w,G,R,O,B){return w=(w-R)*B|0,G=(G-O)*B|0,w=(w|w<<8)&16711935,w=(w|w<<4)&252645135,w=(w|w<<2)&858993459,w=(w|w<<1)&1431655765,G=(G|G<<8)&16711935,G=(G|G<<4)&252645135,G=(G|G<<2)&858993459,G=(G|G<<1)&1431655765,w|G<<1}function g(w){var G=w,R=w;do(G.x=(w-X)*(N-V)&&(w-X)*(O-V)>=(R-X)*(G-V)&&(R-X)*(N-V)>=(B-X)*(O-V)}function m(w,G){return w.next.i!==G.i&&w.prev.i!==G.i&&!P(w,G)&&(M(w,G)&&M(G,w)&&F(w,G)&&(y(w.prev,w,G.prev)||y(w,G.prev,G))||T(w,G)&&y(w.prev,w,w.next)>0&&y(G.prev,G,G.next)>0)}function y(w,G,R){return(G.y-w.y)*(R.x-G.x)-(G.x-w.x)*(R.y-G.y)}function T(w,G){return w.x===G.x&&w.y===G.y}function E(w,G,R,O){var B=A(y(w,G,R)),N=A(y(w,G,O)),X=A(y(R,O,w)),V=A(y(R,O,G));return!!(B!==N&&X!==V||B===0&&C(w,R,G)||N===0&&C(w,O,G)||X===0&&C(R,w,O)||V===0&&C(R,G,O))}function C(w,G,R){return G.x<=Math.max(w.x,R.x)&&G.x>=Math.min(w.x,R.x)&&G.y<=Math.max(w.y,R.y)&&G.y>=Math.min(w.y,R.y)}function A(w){return w>0?1:w<0?-1:0}function P(w,G){var R=w;do{if(R.i!==w.i&&R.next.i!==w.i&&R.i!==G.i&&R.next.i!==G.i&&E(R,R.next,w,G))return!0;R=R.next}while(R!==w);return!1}function M(w,G){return y(w.prev,w,w.next)<0?y(w,G,w.next)>=0&&y(w,w.prev,G)>=0:y(w,G,w.prev)<0||y(w,w.next,G)<0}function F(w,G){var R=w,O=!1,B=(w.x+G.x)/2,N=(w.y+G.y)/2;do R.y>N!=R.next.y>N&&R.next.y!==R.y&&B<(R.next.x-R.x)*(N-R.y)/(R.next.y-R.y)+R.x&&(O=!O),R=R.next;while(R!==w);return O}function L(w,G){var R=new U(w.i,w.x,w.y),O=new U(G.i,G.x,G.y),B=w.next,N=G.prev;return w.next=G,G.prev=w,R.next=B,B.prev=R,O.next=R,R.prev=O,N.next=O,O.prev=N,O}function D(w,G,R,O){var B=new U(w,G,R);return O?(B.next=O.next,B.prev=O,O.next.prev=B,O.next=B):(B.prev=B,B.next=B),B}function I(w){w.next.prev=w.prev,w.prev.next=w.next,w.prevZ&&(w.prevZ.nextZ=w.nextZ),w.nextZ&&(w.nextZ.prevZ=w.prevZ)}function U(w,G,R){this.i=w,this.x=G,this.y=R,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}S.deviation=function(w,G,R,O){var B=G&&G.length,N=B?G[0]*R:w.length,X=Math.abs(z(w,0,N,R));if(B)for(var V=0,Y=G.length;V0&&(O+=w[B-1].length,R.holes.push(O))}return R},p.exports=S},13829:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a,r){r===void 0&&(r=new d);for(var n=1/0,e=1/0,s=-n,h=-e,i,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35001),c=t(23031),a=t(30052),r=function(n,e,s,h){h===void 0&&(h=[]);var i=n.points,o=a(n);!e&&s>0&&(e=o/s);for(var f=0;fu+y){u+=y;continue}var T=m.getPoint((l-u)/y);h.push(T);break}return h};p.exports=r},30052:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35001),c=t(23031),a=function(r){for(var n=r.points,e=0,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(63814),a=t(9564),r=t(23777),n=new d({initialize:function(s){this.type=r.POLYGON,this.area=0,this.points=[],s&&this.setTo(s)},contains:function(e,s){return c(this,e,s)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var s,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.points.reverse(),t};p.exports=S},29524:p=>{function S(n,e){var s=n.x-e.x,h=n.y-e.y;return s*s+h*h}function t(n,e,s){var h=e.x,i=e.y,o=s.x-h,f=s.y-i;if(o!==0||f!==0){var l=((n.x-h)*o+(n.y-i)*f)/(o*o+f*f);l>1?(h=s.x,i=s.y):l>0&&(h+=o*l,i+=f*l)}return o=n.x-h,f=n.y-i,o*o+f*f}function d(n,e){for(var s=n[0],h=[s],i,o=1,f=n.length;oe&&(h.push(i),s=i);return s!==i&&h.push(i),h}function c(n,e,s,h,i){for(var o=h,f,l=e+1;lo&&(f=l,o=u)}o>h&&(f-e>1&&c(n,e,f,h,i),i.push(n[f]),s-f>1&&c(n,f,s,h,i))}function a(n,e){var s=n.length-1,h=[n[0]];return c(n,0,s,e,h),h.push(n[s]),h}var r=function(n,e,s){e===void 0&&(e=1),s===void 0&&(s=!1);var h=n.points;if(h.length>2){var i=e*e;s||(h=d(h,i)),n.setTo(a(h,i))}return n};p.exports=r},5469:p=>{/** + * @author Richard Davey + * @author Igor Ognichenko + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(d,c){return d[0]=c[0],d[1]=c[1],d},t=function(d){var c,a=[],r=d.points;for(c=0;c0&&n.push(S([0,0],a[0])),c=0;c1&&n.push(S([0,0],a[a.length-1])),d.setTo(n)};p.exports=t},24709:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var a=t.points,r=0;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25717);d.Clone=t(12306),d.Contains=t(63814),d.ContainsPoint=t(99338),d.Earcut=t(94811),d.GetAABB=t(13829),d.GetNumberArray=t(26173),d.GetPoints=t(9564),d.Perimeter=t(30052),d.Reverse=t(8133),d.Simplify=t(29524),d.Smooth=t(5469),d.Translate=t(24709),p.exports=d},62224:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.width*t.height};p.exports=S},98615:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};p.exports=S},31688:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};p.exports=S},67502:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x=d-t.width/2,t.y=c-t.height/2,t};p.exports=S},65085:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a){return new d(a.x,a.y,a.width,a.height)};p.exports=c},37303:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.width<=0||t.height<=0?!1:t.x<=d&&t.x+t.width>=d&&t.y<=c&&t.y+t.height>=c};p.exports=S},96553:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37303),c=function(a,r){return d(a,r.x,r.y)};p.exports=c},70273:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.width*d.height>t.width*t.height?!1:d.x>t.x&&d.xt.x&&d.rightt.y&&d.yt.y&&d.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S},77493:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x,y:t.y}),d.push({x:t.right,y:t.y}),d.push({x:t.right,y:t.bottom}),d.push({x:t.x,y:t.bottom}),d};p.exports=S},9219:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S},53751:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8249),c=function(a,r){var n=d(a);return n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8249),c=function(a,r){var n=d(a);return n>d(r)?a.setSize(r.height*n,r.height):a.setSize(r.width,r.width/n),a.setPosition(r.centerX-a.width/2,r.centerY-a.height/2)};p.exports=c},80774:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};p.exports=S},83859:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t};p.exports=S},19217:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=t(36383),a=function(r,n){if(n===void 0&&(n=new d),r.length===0)return n;for(var e=Number.MAX_VALUE,s=Number.MAX_VALUE,h=c.MIN_SAFE_INTEGER,i=c.MIN_SAFE_INTEGER,o,f,l,u=0;u{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a,r,n,e,s){return s===void 0&&(s=new d),s.setTo(Math.min(a,n),Math.min(r,e),Math.abs(a-n),Math.abs(r-e))};p.exports=c},8249:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.height===0?NaN:t.width/t.height};p.exports=S},27165:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){return r===void 0&&(r=new d),r.x=a.centerX,r.y=a.centerY,r};p.exports=c},20812:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13019),c=t(2141),a=function(r,n,e){if(e===void 0&&(e=new c),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var s=d(r)*n;return n>.5?(s-=r.width+r.height,s<=r.width?(e.x=r.right-s,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(s-r.width))):s<=r.width?(e.x=r.x+s,e.y=r.y):(e.x=r.right,e.y=r.y+(s-r.width)),e};p.exports=a},34819:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20812),c=t(13019),a=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=c(r)/e);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){return r===void 0&&(r=new d),r.x=a.width,r.y=a.height,r};p.exports=c},86091:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(67502),c=function(a,r,n){var e=a.centerX,s=a.centerY;return a.setSize(a.width+r*2,a.height+n*2),d(a,e,s)};p.exports=c},53951:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=t(59996),a=function(r,n,e){return e===void 0&&(e=new d),c(r,n)?(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y):e.setEmpty(),e};p.exports=a},14649:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13019),c=t(2141),a=function(r,n,e,s){if(s===void 0&&(s=[]),!n&&!e)return s;n?e=Math.round(d(r)/n):n=d(r)/e;for(var h=r.x,i=r.y,o=0,f=0;f=r.right&&(o=1,i+=h-r.right,h=r.right);break;case 1:i+=n,i>=r.bottom&&(o=2,h-=i-r.bottom,i=r.bottom);break;case 2:h-=n,h<=r.left&&(o=3,i-=r.left-h,h=r.left);break;case 3:i-=n,i<=r.top&&(o=0,i=r.top);break}return s};p.exports=a},33595:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){for(var c=t.x,a=t.right,r=t.y,n=t.bottom,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=Math.min(t.x,d.x),a=Math.max(t.right,d.right);t.x=c,t.width=a-c;var r=Math.min(t.y,d.y),n=Math.max(t.bottom,d.bottom);return t.y=r,t.height=n-r,t};p.exports=S},92171:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=Math.min(t.x,d),r=Math.max(t.right,d);t.x=a,t.width=r-a;var n=Math.min(t.y,c),e=Math.max(t.bottom,c);return t.y=n,t.height=e-n,t};p.exports=S},42981:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},46907:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},60170:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.xd.x&&t.yd.y};p.exports=S},13019:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 2*(t.width+t.height)};p.exports=S},85133:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(39506),a=function(r,n,e){e===void 0&&(e=new d),n=c(n);var s=Math.sin(n),h=Math.cos(n),i=h>0?r.width/2:r.width/-2,o=s>0?r.height/2:r.height/-2;return Math.abs(i*s){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){return r===void 0&&(r=new d),r.x=a.x+Math.random()*a.width,r.y=a.y+Math.random()*a.height,r};p.exports=c},86470:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30976),c=t(70273),a=t(2141),r=function(n,e,s){if(s===void 0&&(s=new a),c(n,e))switch(d(0,3)){case 0:s.x=n.x+Math.random()*(e.right-n.x),s.y=n.y+Math.random()*(e.top-n.y);break;case 1:s.x=e.x+Math.random()*(n.right-e.x),s.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:s.x=n.x+Math.random()*(e.x-n.x),s.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:s.x=e.right+Math.random()*(n.right-e.right),s.y=n.y+Math.random()*(e.bottom-n.y);break}return s};p.exports=r},87841:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(37303),a=t(20812),r=t(34819),n=t(23777),e=t(23031),s=t(26597),h=new d({initialize:function(o,f,l,u){o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=0),this.type=n.RECTANGLE,this.x=o,this.y=f,this.width=l,this.height=u},contains:function(i,o){return c(this,i,o)},getPoint:function(i,o){return a(this,i,o)},getPoints:function(i,o,f){return r(this,i,o,f)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,o,f,l){return this.x=i,this.y=o,this.width=f,this.height=l,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,o){return o===void 0&&(o=i),this.x=i,this.y=o,this},setSize:function(i,o){return o===void 0&&(o=i),this.width=i,this.height=o,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.bottom,this.x,this.y),i},left:{get:function(){return this.x},set:function(i){i>=this.right?this.width=0:this.width=this.right-i,this.x=i}},right:{get:function(){return this.x+this.width},set:function(i){i<=this.x?this.width=0:this.width=i-this.x}},top:{get:function(){return this.y},set:function(i){i>=this.bottom?this.height=0:this.height=this.bottom-i,this.y=i}},bottom:{get:function(){return this.y+this.height},set:function(i){i<=this.y?this.height=0:this.height=i-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(i){this.x=i-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(i){this.y=i-this.height/2}}});p.exports=h},94845:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.width===d.width&&t.height===d.height};p.exports=S},31730:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c===void 0&&(c=d),t.width*=d,t.height*=c,t};p.exports=S},36899:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=function(a,r,n){n===void 0&&(n=new d);var e=Math.min(a.x,r.x),s=Math.min(a.y,r.y),h=Math.max(a.right,r.right)-e,i=Math.max(a.bottom,r.bottom)-s;return n.setTo(e,s,h,i)};p.exports=c},93232:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841);d.Area=t(62224),d.Ceil=t(98615),d.CeilAll=t(31688),d.CenterOn=t(67502),d.Clone=t(65085),d.Contains=t(37303),d.ContainsPoint=t(96553),d.ContainsRect=t(70273),d.CopyFrom=t(43459),d.Decompose=t(77493),d.Equals=t(9219),d.FitInside=t(53751),d.FitOutside=t(16088),d.Floor=t(80774),d.FloorAll=t(83859),d.FromPoints=t(19217),d.FromXY=t(9477),d.GetAspectRatio=t(8249),d.GetCenter=t(27165),d.GetPoint=t(20812),d.GetPoints=t(34819),d.GetSize=t(51313),d.Inflate=t(86091),d.Intersection=t(53951),d.MarchingAnts=t(14649),d.MergePoints=t(33595),d.MergeRect=t(20074),d.MergeXY=t(92171),d.Offset=t(42981),d.OffsetPoint=t(46907),d.Overlaps=t(60170),d.Perimeter=t(13019),d.PerimeterPoint=t(85133),d.Random=t(26597),d.RandomOutside=t(86470),d.SameDimensions=t(94845),d.Scale=t(31730),d.Union=t(36899),p.exports=d},41658:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.x1,c=t.y1,a=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-d)*(r-c)-(a-d)*(e-c))/2)};p.exports=S},39208:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16483),c=function(a,r,n){var e=n*(Math.sqrt(3)/2),s=a,h=r,i=a+n/2,o=r+e,f=a-n/2,l=r+e;return new d(s,h,i,o,f,l)};p.exports=c},39545:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(94811),c=t(16483),a=function(r,n,e,s,h){n===void 0&&(n=null),e===void 0&&(e=1),s===void 0&&(s=1),h===void 0&&(h=[]);for(var i=d(r,n),o,f,l,u,v,g,x,m,y,T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16483),c=function(a,r,n,e){e===void 0&&(e=n);var s=a,h=r,i=a,o=r-e,f=a+n,l=r;return new d(s,h,i,o,f,l)};p.exports=c},23707:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97523),c=t(13584),a=function(r,n,e,s){s===void 0&&(s=d);var h=s(r),i=n-h.x,o=e-h.y;return c(r,i,o)};p.exports=a},97523:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){return r===void 0&&(r=new d),r.x=(a.x1+a.x2+a.x3)/3,r.y=(a.y1+a.y2+a.y3)/3,r};p.exports=c},24951:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099);function c(r,n,e,s){return r*s-n*e}var a=function(r,n){n===void 0&&(n=new d);var e=r.x3,s=r.y3,h=r.x1-e,i=r.y1-s,o=r.x2-e,f=r.y2-s,l=2*c(h,i,o,f),u=c(i,h*h+i*i,f,o*o+f*f),v=c(h,h*h+i*i,o,o*o+f*f);return n.x=e-u/l,n.y=s+v/l,n};p.exports=a},85614:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(96503),c=function(a,r){r===void 0&&(r=new d);var n=a.x1,e=a.y1,s=a.x2,h=a.y2,i=a.x3,o=a.y3,f=s-n,l=h-e,u=i-n,v=o-e,g=f*(n+s)+l*(e+h),x=u*(n+i)+v*(e+o),m=2*(f*(o-h)-l*(i-s)),y,T;if(Math.abs(m)<1e-6){var E=Math.min(n,s,i),C=Math.min(e,h,o);y=(Math.max(n,s,i)-E)*.5,T=(Math.max(e,h,o)-C)*.5,r.x=E+y,r.y=C+T,r.radius=Math.sqrt(y*y+T*T)}else r.x=(v*g-l*x)/m,r.y=(f*x-u*g)/m,y=r.x-n,T=r.y-e,r.radius=Math.sqrt(y*y+T*T);return r};p.exports=c},74422:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16483),c=function(a){return new d(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)};p.exports=c},10690:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,s=d-t.x1,h=c-t.y1,i=a*a+r*r,o=a*n+r*e,f=a*s+r*h,l=n*n+e*e,u=n*s+e*h,v=i*l-o*o,g=v===0?0:1/v,x=(l*f-o*u)*g,m=(i*u-o*f)*g;return x>=0&&m>=0&&x+m<1};p.exports=S},48653:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c===void 0&&(c=!1),a===void 0&&(a=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,s=t.y2-t.y1,h=r*r+n*n,i=r*e+n*s,o=e*e+s*s,f=h*o-i*i,l=f===0?0:1/f,u,v,g,x,m,y,T=t.x1,E=t.y1,C=0;C=0&&v>=0&&u+v<1&&(a.push({x:d[C].x,y:d[C].y}),c)));C++);return a};p.exports=S},96006:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10690),c=function(a,r){return d(a,r.x,r.y)};p.exports=c},71326:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};p.exports=S},71694:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x1,y:t.y1}),d.push({x:t.x2,y:t.y2}),d.push({x:t.x3,y:t.y3}),d};p.exports=S},33522:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2&&t.x3===d.x3&&t.y3===d.y3};p.exports=S},20437:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=t(35001),a=function(r,n,e){e===void 0&&(e=new d);var s=r.getLineA(),h=r.getLineB(),i=r.getLineC();if(n<=0||n>=1)return e.x=s.x1,e.y=s.y1,e;var o=c(s),f=c(h),l=c(i),u=o+f+l,v=u*n,g=0;return vo+f?(v-=o+f,g=v/l,e.x=i.x1+(i.x2-i.x1)*g,e.y=i.y1+(i.y2-i.y1)*g):(v-=o,g=v/f,e.x=h.x1+(h.x2-h.x1)*g,e.y=h.y1+(h.y2-h.y1)*g),e};p.exports=a},80672:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35001),c=t(2141),a=function(r,n,e,s){s===void 0&&(s=[]);var h=r.getLineA(),i=r.getLineB(),o=r.getLineC(),f=d(h),l=d(i),u=d(o),v=f+l+u;!n&&e>0&&(n=v/e);for(var g=0;gf+l?(x-=f+l,m=x/u,y.x=o.x1+(o.x2-o.x1)*m,y.y=o.y1+(o.y2-o.y1)*m):(x-=f,m=x/l,y.x=i.x1+(i.x2-i.x1)*m,y.y=i.y1+(i.y2-i.y1)*m),s.push(y)}return s};p.exports=a},39757:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141);function c(r,n,e,s){var h=r-e,i=n-s,o=h*h+i*i;return Math.sqrt(o)}var a=function(r,n){n===void 0&&(n=new d);var e=r.x1,s=r.y1,h=r.x2,i=r.y2,o=r.x3,f=r.y3,l=c(o,f,h,i),u=c(e,s,o,f),v=c(h,i,e,s),g=l+u+v;return n.x=(e*l+h*u+o*v)/g,n.y=(s*l+i*u+f*v)/g,n};p.exports=a},13584:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t.x3+=d,t.y3+=c,t};p.exports=S},1376:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35001),c=function(a){var r=a.getLineA(),n=a.getLineB(),e=a.getLineC();return d(r)+d(n)+d(e)};p.exports=c},90260:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2141),c=function(a,r){r===void 0&&(r=new d);var n=a.x2-a.x1,e=a.y2-a.y1,s=a.x3-a.x1,h=a.y3-a.y1,i=Math.random(),o=Math.random();return i+o>=1&&(i=1-i,o=1-o),r.x=a.x1+(n*i+s*o),r.y=a.y1+(e*i+h*o),r};p.exports=c},52172:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99614),c=t(39757),a=function(r,n){var e=c(r);return d(r,e.x,e.y,n)};p.exports=a},49907:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99614),c=function(a,r,n){return d(a,r.x,r.y,n)};p.exports=c},99614:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=Math.cos(a),n=Math.sin(a),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,e=t.x3-d,s=t.y3-c,t.x3=e*r-s*n+d,t.y3=e*n+s*r+c,t};p.exports=S},16483:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(10690),a=t(20437),r=t(80672),n=t(23777),e=t(23031),s=t(90260),h=new d({initialize:function(o,f,l,u,v,g){o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=0),v===void 0&&(v=0),g===void 0&&(g=0),this.type=n.TRIANGLE,this.x1=o,this.y1=f,this.x2=l,this.y2=u,this.x3=v,this.y3=g},contains:function(i,o){return c(this,i,o)},getPoint:function(i,o){return a(this,i,o)},getPoints:function(i,o,f){return r(this,i,o,f)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,o,f,l,u,v){return i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=0),v===void 0&&(v=0),this.x1=i,this.y1=o,this.x2=f,this.y2=l,this.x3=u,this.y3=v,this},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.x3,this.y3,this.x1,this.y1),i},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(i){var o=0;this.x1<=this.x2&&this.x1<=this.x3?o=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?o=this.x2-i:o=this.x3-i,this.x1-=o,this.x2-=o,this.x3-=o}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var o=0;this.x1>=this.x2&&this.x1>=this.x3?o=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?o=this.x2-i:o=this.x3-i,this.x1-=o,this.x2-=o,this.x3-=o}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var o=0;this.y1<=this.y2&&this.y1<=this.y3?o=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?o=this.y2-i:o=this.y3-i,this.y1-=o,this.y2-=o,this.y3-=o}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var o=0;this.y1>=this.y2&&this.y1>=this.y3?o=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?o=this.y2-i:o=this.y3-i,this.y1-=o,this.y2-=o,this.y3-=o}}});p.exports=h},84435:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16483);d.Area=t(41658),d.BuildEquilateral=t(39208),d.BuildFromPolygon=t(39545),d.BuildRight=t(90301),d.CenterOn=t(23707),d.Centroid=t(97523),d.CircumCenter=t(24951),d.CircumCircle=t(85614),d.Clone=t(74422),d.Contains=t(10690),d.ContainsArray=t(48653),d.ContainsPoint=t(96006),d.CopyFrom=t(71326),d.Decompose=t(71694),d.Equals=t(33522),d.GetPoint=t(20437),d.GetPoints=t(80672),d.InCenter=t(39757),d.Perimeter=t(1376),d.Offset=t(13584),d.Random=t(90260),d.Rotate=t(52172),d.RotateAroundPoint=t(49907),d.RotateAroundXY=t(99614),p.exports=d},74457:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:c,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};p.exports=S},84409:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return function(c,a,r,n){var e=t.getPixelAlpha(a,r,n.texture.key,n.frame.name);return e&&e>=d}};p.exports=S},7003:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(93301),a=t(50792),r=t(8214),n=t(8443),e=t(78970),s=t(85098),h=t(42515),i=t(36210),o=t(61340),f=t(85955),l=new d({initialize:function(v,g){this.game=v,this.scaleManager,this.canvas,this.config=g,this.enabled=!0,this.events=new a,this.isOver=!0,this.defaultCursor="",this.keyboard=g.inputKeyboard?new e(this):null,this.mouse=g.inputMouse?new s(this):null,this.touch=g.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=g.inputActivePointers,g.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var x=0;x<=this.pointersTotal;x++){var m=new h(this,x);m.smoothFactor=g.inputSmoothFactor,this.pointers.push(m)}this.mousePointer=g.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new o,this._tempMatrix2=new o,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],v.events.once(n.BOOT,this.boot,this)},boot:function(){var u=this.game,v=u.events;this.canvas=u.canvas,this.scaleManager=u.scale,this.events.emit(r.MANAGER_BOOT),v.on(n.PRE_RENDER,this.preRender,this),v.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(u){this.isOver=!0,this.events.emit(r.GAME_OVER,u)},setCanvasOut:function(u){this.isOver=!1,this.events.emit(r.GAME_OUT,u)},preRender:function(){var u=this.game.loop.now,v=this.game.loop.delta,g=this.game.scene.getScenes(!0,!0);this.time=u,this.events.emit(r.MANAGER_UPDATE);for(var x=0;x10&&(u=10-this.pointersTotal);for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(96503),c=t(87902),a=t(83419),r=t(93301),n=t(74457),e=t(84409),s=t(20339),h=t(8497),i=t(81154),o=t(8214),f=t(50792),l=t(95540),u=t(23777),v=t(89639),g=t(41212),x=t(37277),m=t(87841),y=t(37303),T=t(44594),E=t(16483),C=t(10690),A=new a({Extends:f,initialize:function(M){f.call(this),this.scene=M,this.systems=M.sys,this.settings=M.sys.settings,this.manager=M.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,v.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var F={cancelled:!1};this._eventContainer={stopPropagation:function(){F.cancelled=!0}},this._eventData=F,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,M.sys.events.once(T.BOOT,this.boot,this),M.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(o.BOOT)},start:function(){var P=this.systems.events;P.on(T.TRANSITION_START,this.transitionIn,this),P.on(T.TRANSITION_OUT,this.transitionOut,this),P.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),P.on(T.PRE_UPDATE,this.preUpdate,this),P.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(o.GAME_OUT,this.onGameOut,this),this.manager.events.on(o.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(o.START)},onGameOver:function(P){this.isActive()&&this.emit(o.GAME_OVER,P.timeStamp,P)},onGameOut:function(P){this.isActive()&&this.emit(o.GAME_OUT,P.timeStamp,P)},preUpdate:function(){this.pluginEvents.emit(o.PRE_UPDATE);var P=this._pendingRemoval,M=this._pendingInsertion,F=P.length,L=M.length;if(!(F===0&&L===0)){for(var D=this._list,I=0;I-1&&(D.splice(z,1),this.clear(U,!0))}this._pendingRemoval.length=0,this._list=D.concat(M.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(P,M){if(!this.isActive())return!1;if(this.pluginEvents.emit(o.UPDATE,P,M),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var F,L=this.manager,D=L.pointers,I=L.pointersTotal;for(F=0;F0)if(this._pollTimer-=M,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var z=!1;for(F=0;F0&&(z=!0)}return z},update:function(P,M){if(!this.isActive())return!1;for(var F=M.length,L=!1,D=0;D0&&(L=!0)}return this._updatedThisFrame=!0,L},clear:function(P,M){M===void 0&&(M=!1),this.disable(P);var F=P.input;F&&(this.removeDebug(P),this.manager.resetCursor(F),F.gameObject=void 0,F.target=void 0,F.hitArea=void 0,F.hitAreaCallback=void 0,F.callbackContext=void 0,P.input=null),M||this.queueForRemoval(P);var L=this._draggable.indexOf(P);return L>-1&&this._draggable.splice(L,1),P},disable:function(P){var M=P.input;M&&(M.enabled=!1,M.dragState=0);for(var F=this._drag,L=this._over,D=this.manager,I=0,U;I-1&&F[I].splice(U,1),U=L[I].indexOf(P),U>-1&&L[I].splice(U,1);return this},enable:function(P,M,F,L){return L===void 0&&(L=!1),P.input?P.input.enabled=!0:this.setHitArea(P,M,F),P.input&&L&&!P.input.dropZone&&(P.input.dropZone=L),this},hitTestPointer:function(P){for(var M=this.cameras.getCamerasBelowPointer(P),F=0;F0)return P.camera=L,D}return P.camera=M[0],[]},processDownEvents:function(P){var M=0,F=this._temp,L=this._eventData,D=this._eventContainer;L.cancelled=!1;for(var I=!1,U=0;U0&&s(P.x,P.y,P.downX,P.downY)>=D||L>0&&M>=P.downTime+L)&&(F=!0),F)return this.setDragState(P,3),this.processDragStartList(P)},processDragStartList:function(P){if(this.getDragState(P)!==3)return 0;for(var M=this._drag[P.id],F=0;F1&&(this.sortGameObjects(F,P),this.topOnly&&F.splice(1)),this._drag[P.id]=F,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(P,3),this.processDragStartList(P)):(this.setDragState(P,2),0))},processDragMoveEvent:function(P){if(this.getDragState(P)===2&&this.processDragThresholdEvent(P,this.manager.game.loop.now),this.getDragState(P)!==4)return 0;for(var M=this._tempZones,F=this._drag[P.id],L=0;L0?(D.emit(o.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(o.DRAG_LEAVE,P,D,U),I.target=M[0],U=I.target,D.emit(o.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(o.DRAG_ENTER,P,D,U)):(D.emit(o.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(o.DRAG_LEAVE,P,D,U),M[0]?(I.target=M[0],U=I.target,D.emit(o.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(o.DRAG_ENTER,P,D,U)):I.target=null)}else!U&&M[0]&&(I.target=M[0],U=I.target,D.emit(o.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(o.DRAG_ENTER,P,D,U));var w,G;if(!D.parentContainer)w=P.worldX-I.dragX,G=P.worldY-I.dragY;else{var R=P.worldX-I.dragStartXGlobal,O=P.worldY-I.dragStartYGlobal,B=D.getParentRotation(),N=R*Math.cos(B)+O*Math.sin(B),X=O*Math.cos(B)-R*Math.sin(B);N*=1/D.parentContainer.scaleX,X*=1/D.parentContainer.scaleY,w=N+I.dragStartX,G=X+I.dragStartY}D.emit(o.GAMEOBJECT_DRAG,P,w,G),this.emit(o.DRAG,P,D,w,G)}return F.length},processDragUpEvent:function(P){for(var M=this._drag[P.id],F=0;F0){var I=this.manager,U=this._eventData,z=this._eventContainer;U.cancelled=!1;for(var w=!1,G=0;G0){var D=this.manager,I=this._eventData,U=this._eventContainer;I.cancelled=!1;var z=!1;this.sortGameObjects(M,P);for(var w=0;w0){for(this.sortGameObjects(D,P),F=0;F0){for(this.sortGameObjects(I,P),F=0;F-1&&this._draggable.splice(D,1)}return this},makePixelPerfect:function(P){P===void 0&&(P=1);var M=this.systems.textures;return e(M,P)},setHitArea:function(P,M,F){if(M===void 0)return this.setHitAreaFromTexture(P);Array.isArray(P)||(P=[P]);var L=!1,D=!1,I=!1,U=!1,z=!1,w=!0;if(g(M)&&Object.keys(M).length){var G=M,R=P.some(function(V){return V.hasOwnProperty("faces")});if(!R){M=l(G,"hitArea",null),F=l(G,"hitAreaCallback",null),z=l(G,"pixelPerfect",!1);var O=l(G,"alphaTolerance",1);z&&(M={},F=this.makePixelPerfect(O))}L=l(G,"draggable",!1),D=l(G,"dropZone",!1),I=l(G,"cursor",!1),U=l(G,"useHandCursor",!1),(!M||!F)&&(this.setHitAreaFromTexture(P),w=!1)}else typeof M=="function"&&!F&&(F=M,M={});for(var B=0;B{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35154),c={},a={};a.register=function(r,n,e,s,h){c[r]={plugin:n,mapping:e,settingsKey:s,configKey:h}},a.getPlugin=function(r){return c[r]},a.install=function(r){var n=r.scene.sys,e=n.settings.input,s=n.game.config;for(var h in c){var i=c[h].plugin,o=c[h].mapping,f=c[h].settingsKey,l=c[h].configKey;d(e,f,s[l])&&(r[o]=new i(r))}},a.remove=function(r){c.hasOwnProperty(r)&&delete c[r]},p.exports=a},42515:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(31040),c=t(83419),a=t(20339),r=t(43855),n=t(47235),e=t(26099),s=t(25892),h=new c({initialize:function(o,f){this.manager=o,this.id=f,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var o=i.getWorldPoint(this.x,this.y);return this.worldX=o.x,this.worldY=o.y,this},positionToCamera:function(i,o){return i.getWorldPoint(this.x,this.y,o)},updateMotion:function(){var i=this.position.x,o=this.position.y,f=this.midPoint.x,l=this.midPoint.y;if(!(i===f&&o===l)){var u=n(this.motionFactor,f,i),v=n(this.motionFactor,l,o);r(u,i,.1)&&(u=i),r(v,o,.1)&&(v=o),this.midPoint.set(u,v);var g=i-u,x=o-v;this.velocity.set(g,x),this.angle=d(u,v,i,o),this.distance=Math.sqrt(g*g+x*x)}},up:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=i.timeStamp,this.wasTouch=!1)},down:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),s.macOS&&i.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=i.timeStamp),this.wasTouch=!1},move:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.locked&&(this.movementX=i.movementX||i.mozMovementX||i.webkitMovementX||0,this.movementY=i.movementY||i.mozMovementY||i.webkitMovementY||0),this.moveTime=i.timeStamp,this.wasTouch=!1},wheel:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.deltaX=i.deltaX,this.deltaY=i.deltaY,this.deltaZ=i.deltaZ,this.wasTouch=!1},touchstart:function(i,o){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=o,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=o.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,o){this.event=o,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=o.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,o){this.buttons=0,this.event=o,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=o.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,o){this.buttons=0,this.event=o,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=o.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?a(this.downX,this.downY,this.x,this.y):a(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?d(this.downX,this.downY,this.x,this.y):d(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,o){i===void 0&&(i=10),o===void 0&&(o=[]);for(var f=this.prevPosition.x,l=this.prevPosition.y,u=this.position.x,v=this.position.y,g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};p.exports=S},7179:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},85375:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},39843:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},23388:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragenter"},16133:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},27829:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragleave"},53904:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragover"},56058:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},2642:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drop"},88171:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectdown"},36147:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},71692:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragenter"},96149:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},81285:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragleave"},74048:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragover"},21322:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},49378:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drop"},86754:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectmove"},86433:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectout"},60709:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectover"},24081:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdown"},11172:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointermove"},18907:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerout"},95579:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerover"},35368:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerup"},26972:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wheel"},47078:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectup"},73802:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectwheel"},56718:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameout"},25936:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameover"},27503:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},50852:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="process"},96438:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},59152:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerlockchange"},47777:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdown"},27957:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdownoutside"},19444:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointermove"},54251:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerout"},18667:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerover"},27192:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerup"},24652:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerupoutside"},45132:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wheel"},44512:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="preupdate"},15757:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="shutdown"},41637:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},93802:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},8214:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BOOT:t(7179),DESTROY:t(85375),DRAG_END:t(39843),DRAG_ENTER:t(23388),DRAG:t(16133),DRAG_LEAVE:t(27829),DRAG_OVER:t(53904),DRAG_START:t(56058),DROP:t(2642),GAME_OUT:t(56718),GAME_OVER:t(25936),GAMEOBJECT_DOWN:t(88171),GAMEOBJECT_DRAG_END:t(36147),GAMEOBJECT_DRAG_ENTER:t(71692),GAMEOBJECT_DRAG:t(96149),GAMEOBJECT_DRAG_LEAVE:t(81285),GAMEOBJECT_DRAG_OVER:t(74048),GAMEOBJECT_DRAG_START:t(21322),GAMEOBJECT_DROP:t(49378),GAMEOBJECT_MOVE:t(86754),GAMEOBJECT_OUT:t(86433),GAMEOBJECT_OVER:t(60709),GAMEOBJECT_POINTER_DOWN:t(24081),GAMEOBJECT_POINTER_MOVE:t(11172),GAMEOBJECT_POINTER_OUT:t(18907),GAMEOBJECT_POINTER_OVER:t(95579),GAMEOBJECT_POINTER_UP:t(35368),GAMEOBJECT_POINTER_WHEEL:t(26972),GAMEOBJECT_UP:t(47078),GAMEOBJECT_WHEEL:t(73802),MANAGER_BOOT:t(27503),MANAGER_PROCESS:t(50852),MANAGER_UPDATE:t(96438),POINTER_DOWN:t(47777),POINTER_DOWN_OUTSIDE:t(27957),POINTER_MOVE:t(19444),POINTER_OUT:t(54251),POINTER_OVER:t(18667),POINTER_UP:t(27192),POINTER_UP_OUTSIDE:t(24652),POINTER_WHEEL:t(45132),POINTERLOCK_CHANGE:t(59152),PRE_UPDATE:t(44512),SHUTDOWN:t(15757),START:t(41637),UPDATE:t(93802)}},97421:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=new d({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(a){this.value=a},getValue:function(){return Math.abs(this.value){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(92734),a=new d({initialize:function(n,e){this.pad=n,this.events=n.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(r){this.value=r;var n=this.pad,e=this.index;r>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(c.BUTTON_DOWN,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(c.BUTTON_UP,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});p.exports=a},99125:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97421),c=t(28884),a=t(83419),r=t(50792),n=t(26099),e=new a({Extends:r,initialize:function(h,i){r.call(this),this.manager=h,this.pad=i,this.id=i.id,this.index=i.index;for(var o=[],f=0;f=2&&(this.leftStick.set(l[0].getValue(),l[1].getValue()),f>=4&&this.rightStick.set(l[2].getValue(),l[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var s;for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=t(92734),r=t(99125),n=t(35154),e=t(89639),s=t(8214),h=new d({Extends:c,initialize:function(o){c.call(this),this.scene=o.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=o,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,o.pluginEvents.once(s.BOOT,this.boot,this),o.pluginEvents.on(s.START,this.start,this)},boot:function(){var i=this.scene.sys.game,o=this.settings.input,f=i.config;this.enabled=n(o,"gamepad",f.inputGamepad)&&i.device.input.gamepads,this.target=n(o,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(s.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(s.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,o=this.target,f=function(l){l.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(l))};this.onGamepadHandler=f,o.addEventListener("gamepadconnected",f,!1),o.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(s.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(s.UPDATE,this.update);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},7629:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},42206:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="connected"},86544:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="disconnected"},94784:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},14325:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},92734:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BUTTON_DOWN:t(46008),BUTTON_UP:t(7629),CONNECTED:t(42206),DISCONNECTED:t(86544),GAMEPAD_BUTTON_DOWN:t(94784),GAMEPAD_BUTTON_UP:t(14325)}},48646:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93301),c=t(79291),a={CreatePixelPerfectHandler:t(84409),CreateInteractiveObject:t(74457),Events:t(8214),Gamepad:t(48646),InputManager:t(7003),InputPlugin:t(48205),InputPluginCache:t(89639),Keyboard:t(51442),Mouse:t(87078),Pointer:t(42515),Touch:t(95618)};a=c(!1,a,d),p.exports=a},78970:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72905),c=t(83419),a=t(8443),r=t(8214),n=t(46032),e=t(29747),s=new c({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,i.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputKeyboard,this.target=h.inputKeyboardEventTarget,this.addCapture(h.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(a.POST_STEP,this.postUpdate,this)},startListeners:function(){var h=this;this.onKeyDown=function(o){if(!(o.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(o),h.manager.events.emit(r.MANAGER_PROCESS);var f=o.altKey||o.ctrlKey||o.shiftKey||o.metaKey;h.preventDefault&&!f&&h.captures.indexOf(o.keyCode)>-1&&o.preventDefault()}},this.onKeyUp=function(o){if(!(o.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(o),h.manager.events.emit(r.MANAGER_PROCESS);var f=o.altKey||o.ctrlKey||o.shiftKey||o.metaKey;h.preventDefault&&!f&&h.captures.indexOf(o.keyCode)>-1&&o.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var h=this.target;h.removeEventListener("keydown",this.onKeyDown,!1),h.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var i=this.captures,o=0;o0},removeCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var i=this.captures,o=0;o0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(a.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});p.exports=s},28846:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=t(95922),r=t(8443),n=t(35154),e=t(8214),s=t(89639),h=t(30472),i=t(46032),o=t(87960),f=t(74600),l=t(44594),u=t(56583),v=new d({Extends:c,initialize:function(x){c.call(this),this.game=x.systems.game,this.scene=x.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=x,this.manager=x.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,x.pluginEvents.once(e.BOOT,this.boot,this),x.pluginEvents.on(e.START,this.start,this)},boot:function(){var g=this.settings.input;this.enabled=n(g,"keyboard",!0);var x=n(g,"keyboard.capture",null);x&&this.addCaptures(x),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(l.PAUSE,this.resetKeys,this),this.scene.sys.events.on(l.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(g){return this.manager.addCapture(g),this},removeCapture:function(g){return this.manager.removeCapture(g),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(g,x,m){x===void 0&&(x=!0),m===void 0&&(m=!1);var y={};if(typeof g=="string"){g=g.split(",");for(var T=0;T-1?y[T]=g:y[g.keyCode]=g,x&&this.addCapture(g.keyCode),g.setEmitOnRepeat(m),g}return typeof g=="string"&&(g=i[g.toUpperCase()]),y[g]||(y[g]=new h(this,g),x&&this.addCapture(g),y[g].setEmitOnRepeat(m)),y[g]},removeKey:function(g,x,m){x===void 0&&(x=!1),m===void 0&&(m=!1);var y=this.keys,T;if(g instanceof h){var E=y.indexOf(g);E>-1&&(T=this.keys[E],this.keys[E]=void 0)}else typeof g=="string"&&(g=i[g.toUpperCase()]);return y[g]&&(T=y[g],y[g]=void 0),T&&(T.plugin=null,m&&this.removeCapture(T.keyCode),x&&T.destroy()),this},removeAllKeys:function(g,x){g===void 0&&(g=!1),x===void 0&&(x=!1);for(var m=this.keys,y=0;yg._tick)return g._tick=m,!0}return!1},update:function(){var g=this.manager.queue,x=g.length;if(!(!this.isActive()||x===0))for(var m=this.keys,y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.timeLastMatched=t.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};p.exports=S},87960:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95922),a=t(95540),r=t(68769),n=t(92803),e=new d({initialize:function(h,i,o){if(o===void 0&&(o={}),i.length<2)return!1;this.manager=h,this.enabled=!0,this.keyCodes=[];for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66970),c=function(a,r){if(r.matched)return!0;var n=!1,e=!1;if(a.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var s=r.timeLastMatched+r.maxKeyDelay;a.timeStamp<=s&&(e=!0,n=d(a,r))}else e=!0,n=d(a,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=a.timeStamp,r.matched=!0,r.timeMatched=a.timeStamp),n};p.exports=c},92803:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};p.exports=S},92612:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keydown"},23345:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keyup"},21957:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keycombomatch"},44743:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},3771:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keydown-"},46358:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keyup-"},75674:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},95922:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ANY_KEY_DOWN:t(92612),ANY_KEY_UP:t(23345),COMBO_MATCH:t(21957),DOWN:t(44743),KEY_DOWN:t(3771),KEY_UP:t(46358),UP:t(75674)}},51442:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Events:t(95922),KeyboardManager:t(78970),KeyboardPlugin:t(28846),Key:t(30472),KeyCodes:t(46032),KeyCombo:t(87960),AdvanceKeyCombo:t(66970),ProcessKeyCombo:t(68769),ResetKeyCombo:t(92803),JustDown:t(90229),JustUp:t(38796),DownDuration:t(37015),UpDuration:t(41170)}},37015:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeDown;return t.isDown&&c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t._justDown?(t._justDown=!1,!0):!1};p.exports=S},38796:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t._justUp?(t._justUp=!1,!0):!1};p.exports=S},30472:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=t(95922),r=new d({Extends:c,initialize:function(e,s){c.call(this),this.plugin=e,this.keyCode=s,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(n){return this.emitOnRepeat=n,this},onDown:function(n){this.originalEvent=n,this.enabled&&(this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.location=n.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(a.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(a.DOWN,this,n)))},onUp:function(n){this.originalEvent=n,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=n.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(a.UP,this,n))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});p.exports=r},46032:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};p.exports=S},74600:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(46032),c={};for(var a in d)c[d[a]]=a;p.exports=c},41170:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeUp;return t.isUp&&c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(89357),a=t(8214),r=t(29747),n=new d({initialize:function(s){this.manager=s,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,s.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(c.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){c.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var s=this,h=this.manager,i=h.canvas,o=window&&window.focus&&h.game.config.autoFocus;this.onMouseMove=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&(h.onMouseMove(l),s.preventDefaultMove&&l.preventDefault())},this.onMouseDown=function(l){o&&window.focus(),!l.defaultPrevented&&s.enabled&&h&&h.enabled&&(h.onMouseDown(l),s.preventDefaultDown&&l.target===i&&l.preventDefault())},this.onMouseDownWindow=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&l.target!==i&&h.onMouseDown(l)},this.onMouseUp=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&(h.onMouseUp(l),s.preventDefaultUp&&l.target===i&&l.preventDefault())},this.onMouseUpWindow=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&l.target!==i&&h.onMouseUp(l)},this.onMouseOver=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&h.setCanvasOver(l)},this.onMouseOut=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&h.setCanvasOut(l)},this.onMouseWheel=function(l){!l.defaultPrevented&&s.enabled&&h&&h.enabled&&h.onMouseWheel(l),s.preventDefaultWheel&&l.target===i&&l.preventDefault()};var f={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,f),e.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,f),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}c.pointerLock&&(this.pointerLockChange=function(l){var u=s.target;s.locked=document.pointerLockElement===u||document.mozPointerLockElement===u||document.webkitPointerLockElement===u,h.onPointerLockChange(l)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),c.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=n},87078:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={MouseManager:t(85098)}},36210:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(8214),a=t(29747),r=new d({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=a,this.onTouchStartWindow=a,this.onTouchMove=a,this.onTouchEnd=a,this.onTouchEndWindow=a,this.onTouchCancel=a,this.onTouchCancelWindow=a,this.isTop=!0,e.events.once(c.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputTouch,this.target=n.inputTouchEventTarget,this.capture=n.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},startListeners:function(){var n=this.target;if(n){var e=this,s=this.manager,h=s.canvas,i=window&&window.focus&&s.game.config.autoFocus;this.onTouchMove=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchMove(u),e.capture&&u.cancelable&&u.preventDefault())},this.onTouchStart=function(u){i&&window.focus(),!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchStart(u),e.capture&&u.cancelable&&u.target===h&&u.preventDefault())},this.onTouchStartWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&u.target!==h&&s.onTouchStart(u)},this.onTouchEnd=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchEnd(u),e.capture&&u.cancelable&&u.target===h&&u.preventDefault())},this.onTouchEndWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&u.target!==h&&(s.onTouchEnd(u),e.capture&&u.cancelable&&u.preventDefault())},this.onTouchCancel=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchCancel(u),e.capture&&u.preventDefault())},this.onTouchCancelWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&s.onTouchCancel(u)};var o=this.capture,f={passive:!0},l={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,o?l:f),n.addEventListener("touchmove",this.onTouchMove,o?l:f),n.addEventListener("touchend",this.onTouchEnd,o?l:f),n.addEventListener("touchcancel",this.onTouchCancel,o?l:f),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,l),window.top.addEventListener("touchend",this.onTouchEndWindow,l),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,l)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,l),window.addEventListener("touchend",this.onTouchEndWindow,l),window.addEventListener("touchcancel",this.onTouchCancelWindow,l),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("touchmove",this.onTouchMove),n.removeEventListener("touchend",this.onTouchEnd),n.removeEventListener("touchcancel",this.onTouchCancel),window&&(n=this.isTop?window.top:window,n.removeEventListener("touchstart",this.onTouchStartWindow),n.removeEventListener("touchend",this.onTouchEndWindow),n.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=r},95618:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={TouchManager:t(36210)}},41299:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(54899),r=t(95540),n=t(98356),e=t(3374),s=t(84376),h=t(92638),i=new d({initialize:function(f,l){if(this.loader=f,this.cache=r(l,"cache",!1),this.type=r(l,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(l,"key",!1);var u=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+u),!this.key)throw new Error("Invalid File key: "+this.key);var v=r(l,"url");v===void 0?v=f.path+u+"."+r(l,"extension",""):typeof v=="string"&&!v.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(v=f.path+v),this.url=v,this.src="",this.xhrSettings=h(r(l,"responseType",void 0)),r(l,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(l,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?c.FILE_POPULATED:c.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(l,"config",{}),this.multiFile,this.linkFile,this.base64=typeof v=="string"&&v.indexOf("data:")===0},setLink:function(o){this.linkFile=o,o.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===c.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=c.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=s(this,this.loader.xhr))},onLoad:function(o,f){var l=o.responseURL&&this.loader.localSchemes.some(function(g){return o.responseURL.indexOf(g)===0}),u=l&&f.target.status===0,v=!(f.target&&f.target.status!==200)||u;o.readyState===4&&o.status>=400&&o.status<=599&&(v=!1),this.state=c.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,v)},onBase64Load:function(o){this.xhrLoader=o,this.state=c.FILE_LOADED,this.percentComplete=1,this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(o){o.lengthComputable&&(this.bytesLoaded=o.loaded,this.bytesTotal=o.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=c.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=c.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=c.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(o){if(this.state!==c.FILE_PENDING_DESTROY){o===void 0&&(o=this.data);var f=this.key,l=this.type;this.loader.emit(a.FILE_COMPLETE,f,l,o),this.loader.emit(a.FILE_KEY_COMPLETE+l+"-"+f,f,l,o),this.loader.flagForRemoval(this),this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(o,f,l){if(typeof URL=="function")o.src=URL.createObjectURL(f);else{var u=new FileReader;u.onload=function(){o.removeAttribute("crossOrigin"),o.src="data:"+(f.type||l)+";base64,"+u.result.split(",")[1]},u.onerror=o.onerror,u.readAsDataURL(f)}},i.revokeObjectURL=function(o){typeof URL=="function"&&URL.revokeObjectURL(o.src)},p.exports=i},74099:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={},t={install:function(d){for(var c in S)d[c]=S[c]},register:function(d,c){S[d]=c},destroy:function(){S={}}};p.exports=t},98356:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:d+t.url:!1};p.exports=S},74261:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(35072),r=t(50792),n=t(54899),e=t(74099),s=t(95540),h=t(35154),i=t(37277),o=t(44594),f=t(92638),l=new d({Extends:r,initialize:function(v){r.call(this);var g=v.sys.game.config,x=v.sys.settings.loader;this.scene=v,this.systems=v.sys,this.cacheManager=v.sys.cache,this.textureManager=v.sys.textures,this.sceneManager=v.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(s(x,"baseURL",g.loaderBaseURL)),this.setPath(s(x,"path",g.loaderPath)),this.setPrefix(s(x,"prefix",g.loaderPrefix)),this.maxParallelDownloads=s(x,"maxParallelDownloads",g.loaderMaxParallelDownloads),this.xhr=f(s(x,"responseType",g.loaderResponseType),s(x,"async",g.loaderAsync),s(x,"user",g.loaderUser),s(x,"password",g.loaderPassword),s(x,"timeout",g.loaderTimeout),s(x,"withCredentials",g.loaderWithCredentials)),this.crossOrigin=s(x,"crossOrigin",g.loaderCrossOrigin),this.imageLoadType=s(x,"imageLoadType",g.loaderImageLoadType),this.localSchemes=s(x,"localScheme",g.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new a,this.inflight=new a,this.queue=new a,this._deleteQueue=new a,this.totalFailed=0,this.totalComplete=0,this.state=c.LOADER_IDLE,this.multiKeyIndex=0,v.sys.events.once(o.BOOT,this.boot,this),v.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},setBaseURL:function(u){return u===void 0&&(u=""),u!==""&&u.substr(-1)!=="/"&&(u=u.concat("/")),this.baseURL=u,this},setPath:function(u){return u===void 0&&(u=""),u!==""&&u.substr(-1)!=="/"&&(u=u.concat("/")),this.path=u,this},setPrefix:function(u){return u===void 0&&(u=""),this.prefix=u,this},setCORS:function(u){return this.crossOrigin=u,this},addFile:function(u){Array.isArray(u)||(u=[u]);for(var v=0;v0},isLoading:function(){return this.state===c.LOADER_LOADING||this.state===c.LOADER_PROCESSING},isReady:function(){return this.state===c.LOADER_IDLE||this.state===c.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(n.START,this),this.list.size===0?this.loadComplete():(this.state=c.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(o.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(n.PROGRESS,this.progress)},update:function(){this.state===c.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79291),c=t(92638),a=function(r,n){var e=r===void 0?c():d({},r);if(n)for(var s in n)n[s]!==void 0&&(e[s]=n[s]);return e};p.exports=a},26430:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(54899),r=new d({initialize:function(e,s,h,i){var o=[];i.forEach(function(u){u&&o.push(u)}),this.loader=e,this.type=s,this.key=h;var f=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+f),this.multiKeyIndex=e.multiKeyIndex++,this.files=o,this.state=c.FILE_PENDING,this.complete=!1,this.pending=o.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(3374),c=function(a,r){var n=d(r,a.xhrSettings);if(a.base64){var e=a.url.split(";base64,").pop()||a.url.split(",").pop(),s={responseText:atob(e)};a.onBase64Load(s);return}var h=new XMLHttpRequest;if(h.open("GET",a.src,n.async,n.user,n.password),h.responseType=a.xhrSettings.responseType,h.timeout=n.timeout,n.headers)for(var i in n.headers)h.setRequestHeader(i,n.headers[i]);return n.header&&n.headerValue&&h.setRequestHeader(n.header,n.headerValue),n.requestedWith&&h.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&h.overrideMimeType(n.overrideMimeType),n.withCredentials&&(h.withCredentials=!0),h.onload=a.onLoad.bind(a,h),h.onerror=a.onError.bind(a,h),h.onprogress=a.onProgress.bind(a),h.ontimeout=a.onError.bind(a,h),h.send(),h};p.exports=c},92638:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r,n){return t===void 0&&(t=""),d===void 0&&(d=!0),c===void 0&&(c=""),a===void 0&&(a=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:d,user:c,password:a,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};p.exports=S},23906:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};p.exports=S},42155:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addfile"},38991:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},27540:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="filecomplete"},87464:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="filecomplete-"},94486:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loaderror"},13035:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="load"},38144:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fileprogress"},97520:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postprocess"},85595:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="progress"},55680:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},54899:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(42155),COMPLETE:t(38991),FILE_COMPLETE:t(27540),FILE_KEY_COMPLETE:t(87464),FILE_LOAD_ERROR:t(94486),FILE_LOAD:t(13035),FILE_PROGRESS:t(38144),POST_PROCESS:t(97520),PROGRESS:t(85595),START:t(55680)}},14135:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(518),r=t(54899),n=new d({Extends:a,initialize:function(s,h,i,o,f){a.call(this,s,h,i,o,f),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),a.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});c.register("animation",function(e,s,h,i){if(Array.isArray(e))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),h=new d({Extends:s,initialize:function(o,f,l,u,v,g){var x,m;if(n(f)){var y=f;f=a(y,"key"),x=new r(o,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new e(o,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","json"),xhrSettings:a(y,"atlasXhrSettings")})}else x=new r(o,f,l,v),m=new e(o,f,u,g);x.linkFile?s.call(this,o,"atlasjson",f,[x,m,x.linkFile]):s.call(this,o,"atlasjson",f,[x,m])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],o=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,o.data,f),o.addToCache(),this.complete=!0}}});c.register("aseprite",function(i,o,f,l,u){var v;if(Array.isArray(i))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),h=new d({Extends:s,initialize:function(o,f,l,u,v,g){var x,m;if(n(f)){var y=f;f=a(y,"key"),x=new r(o,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new e(o,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","json"),xhrSettings:a(y,"atlasXhrSettings")})}else x=new r(o,f,l,v),m=new e(o,f,u,g);x.linkFile?s.call(this,o,"atlasjson",f,[x,m,x.linkFile]):s.call(this,o,"atlasjson",f,[x,m])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],o=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,o.data,f),this.complete=!0}}});c.register("atlas",function(i,o,f,l,u){var v;if(Array.isArray(i))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(57318),h=new d({Extends:e,initialize:function(o,f,l,u,v,g){var x,m;if(n(f)){var y=f;f=a(y,"key"),x=new r(o,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new s(o,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","xml"),xhrSettings:a(y,"atlasXhrSettings")})}else x=new r(o,f,l,v),m=new s(o,f,u,g);x.linkFile?e.call(this,o,"atlasxml",f,[x,m,x.linkFile]):e.call(this,o,"atlasxml",f,[x,m])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],o=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,o.data,f),this.complete=!0}}});c.register("atlasXML",function(i,o,f,l,u){var v;if(Array.isArray(i))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(89749),s=t(41212),h=new d({Extends:a,initialize:function(o,f,l,u,v){if(s(f)){var g=f;f=n(g,"key"),u=n(g,"xhrSettings"),v=n(g,"context",v)}var x={type:"audio",cache:o.cacheManager.audio,extension:l.type,responseType:"arraybuffer",key:f,url:l.url,xhrSettings:u,config:{context:v}};a.call(this,o,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(o){i.data=o,i.onProcessComplete()},function(o){console.error("Error decoding audio: "+i.key+" - ",o?o.message:null),i.onProcessError()}),this.config.context=null}});h.create=function(i,o,f,l,u){var v=i.systems.game,g=v.config.audio,x=v.device.audio;s(o)&&(f=n(o,"url",[]),l=n(o,"config",{}));var m=h.getAudioURL(v,f);return m?x.webAudio&&!g.disableWebAudio?new h(i,o,m,u,v.sound.context):new e(i,o,m,l):(console.warn('No audio URLs for "%s" matched this device',o),null)},h.getAudioURL=function(i,o){Array.isArray(o)||(o=[o]);for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(21097),c=t(83419),a=t(74099),r=t(95540),n=t(41212),e=t(518),s=t(26430),h=new c({Extends:s,initialize:function(o,f,l,u,v,g,x){if(n(f)){var m=f;f=r(m,"key"),l=r(m,"jsonURL"),u=r(m,"audioURL"),v=r(m,"audioConfig"),g=r(m,"audioXhrSettings"),x=r(m,"jsonXhrSettings")}var y;if(!u)y=new e(o,f,l,x),s.call(this,o,"audiosprite",f,[y]),this.config.resourceLoad=!0,this.config.audioConfig=v,this.config.audioXhrSettings=g;else{var T=d.create(o,f,u,v,g);T&&(y=new e(o,f,l,x),s.call(this,o,"audiosprite",f,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var o=this.files.indexOf(i);if(o!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var f=i.data.resources,l=r(this.config,"audioConfig"),u=r(this.config,"audioXhrSettings"),v=d.create(this.loader,i.key,f,l,u);v&&(this.addToMultiFile(v),this.loader.addFile(v))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],o=this.files[1];i.addToCache(),o.addToCache(),this.complete=!0}}});a.register("audioSprite",function(i,o,f,l,u,v){var g=this.systems.game,x=g.config.audio,m=g.device.audio;if(x&&x.noAudio||!m.webAudio&&!m.audioData)return this;var y;if(Array.isArray(i))for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l,u){var v="bin";if(e(o)){var g=o;o=n(g,"key"),f=n(g,"url"),l=n(g,"xhrSettings"),v=n(g,"extension",v),u=n(g,"dataType",u)}var x={type:"binary",cache:i.cacheManager.binary,extension:v,responseType:"arraybuffer",key:o,url:f,xhrSettings:l,config:{dataType:u}};a.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var h=this.config.dataType;this.data=h?new h(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(h,i,o,f){if(Array.isArray(h))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(21859),h=t(57318),i=new d({Extends:e,initialize:function(f,l,u,v,g,x){var m,y;if(n(l)){var T=l;l=a(T,"key"),m=new r(f,{key:l,url:a(T,"textureURL"),extension:a(T,"textureExtension","png"),normalMap:a(T,"normalMap"),xhrSettings:a(T,"textureXhrSettings")}),y=new h(f,{key:l,url:a(T,"fontDataURL"),extension:a(T,"fontDataExtension","xml"),xhrSettings:a(T,"fontDataXhrSettings")})}else m=new r(f,l,u,g),y=new h(f,l,v,x);m.linkFile?e.call(this,f,"bitmapfont",l,[m,y,m.linkFile]):e.call(this,f,"bitmapfont",l,[m,y])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],f=this.files[1];o.addToCache();var l=o.cache.get(o.key),u=s(f.data,o.cache.getFrame(o.key),0,0,l);this.loader.cacheManager.bitmapFont.add(o.key,{data:u,texture:o.key,frame:null}),this.complete=!0}}});c.register("bitmapFont",function(o,f,l,u,v){var g;if(Array.isArray(o))for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l){var u="css";if(e(o)){var v=o;o=n(v,"key"),f=n(v,"url"),l=n(v,"xhrSettings"),u=n(v,"extension",u)}var g={type:"script",cache:!1,extension:u,responseType:"text",key:o,url:f,xhrSettings:l};a.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(h,i,o){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(38734),c=t(85722),a=t(83419),r=t(74099),n=t(95540),e=t(19550),s=t(41212),h=t(518),i=t(31403),o=t(46975),f=t(59327),l=t(26430),u=t(82038),v=t(55222),g=new a({Extends:l,initialize:function(m,y,T,E){if(T.multiAtlasURL){var C=new h(m,{key:y,url:T.multiAtlasURL,xhrSettings:E,config:T});l.call(this,m,"texture",y,[C])}else{var A=T.textureURL.substr(T.textureURL.length-3);T.type||(T.type=A.toLowerCase()==="ktx"?"KTX":"PVR");var P=new c(m,{key:y,url:T.textureURL,extension:A,xhrSettings:E,config:T});if(T.atlasURL){var M=new h(m,{key:y,url:T.atlasURL,xhrSettings:E,config:T});l.call(this,m,"texture",y,[P,M])}else l.call(this,m,"texture",y,[P])}this.config=T},onFileComplete:function(x){var m=this.files.indexOf(x);if(m!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(x.type==="json"&&x.data.hasOwnProperty("textures")){var y=x.data.textures,T=this.config,E=this.loader,C=E.baseURL,A=E.path,P=E.prefix,M=n(T,"multiBaseURL",this.baseURL),F=n(T,"multiPath",this.path),L=n(T,"prefix",this.prefix),D=n(T,"textureXhrSettings");M&&E.setBaseURL(M),F&&E.setPath(F),L&&E.setPrefix(L);for(var I=0;I{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(73894),h=new d({Extends:a,initialize:function(o,f,l,u,v){var g="glsl";if(e(f)){var x=f;f=n(x,"key"),l=n(x,"url"),u=n(x,"shaderType","fragment"),v=n(x,"xhrSettings"),g=n(x,"extension",g)}else u===void 0&&(u="fragment");var m={type:"glsl",cache:o.cacheManager.shader,extension:g,responseType:"text",key:f,url:l,config:{shaderType:u},xhrSettings:v};a.call(this,o,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(` +`),o=this.extractBlock(i,0);if(o)for(;o;){var f=this.getShaderName(o.header),l=this.getShaderType(o.header),u=this.getShaderUniforms(o.header),v=o.shader;if(this.cache.has(f)){var g=this.cache.get(f);l==="fragment"?g.fragmentSrc=v:g.vertexSrc=v,g.uniforms||(g.uniforms=u)}else l==="fragment"?this.cache.add(f,new s(f,v,"",u)):this.cache.add(f,new s(f,"",v,u));o=this.extractBlock(i,o.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new s(this.key,this.data)):this.cache.add(this.key,new s(this.key,"",this.data))},getShaderName:function(i){for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(54899),a=t(41299),r=t(95540),n=t(98356),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l){if(e(o)){var u=o;o=r(u,"key"),l=r(u,"config",l)}var v={type:"audio",cache:i.cacheManager.audio,extension:f.type,key:o,url:f.url,config:l};a.call(this,i,v),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l){var u="html";if(e(o)){var v=o;o=n(v,"key"),f=n(v,"url"),l=n(v,"xhrSettings"),u=n(v,"extension",u)}var g={type:"text",cache:i.cacheManager.html,extension:u,responseType:"text",key:o,url:f,xhrSettings:l};a.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(h,i,o){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l,u,v){l===void 0&&(l=512),u===void 0&&(u=512);var g="html";if(e(o)){var x=o;o=n(x,"key"),f=n(x,"url"),v=n(x,"xhrSettings"),g=n(x,"extension",g),l=n(x,"width",l),u=n(x,"height",u)}var m={type:"html",cache:i.textureManager,extension:g,responseType:"text",key:o,url:f,xhrSettings:v,config:{width:l,height:u}};a.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING;var h=this.config.width,i=this.config.height,o=[];o.push(''),o.push(''),o.push(''),o.push(this.xhrLoader.responseText),o.push(""),o.push(""),o.push("");var f=[o.join(` +`)],l=this;try{var u=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{l.state=c.FILE_ERRORED,l.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){a.revokeObjectURL(l.data),l.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(l.data),l.onProcessError()},a.createObjectURL(this.data,u,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(h,i,o,f,l){if(Array.isArray(h))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(98356),h=new d({Extends:a,initialize:function i(o,f,l,u,v){var g="png",x;if(e(f)){var m=f;f=n(m,"key"),l=n(m,"url"),x=n(m,"normalMap"),u=n(m,"xhrSettings"),g=n(m,"extension",g),v=n(m,"frameConfig")}Array.isArray(l)&&(x=l[1],l=l[0]);var y={type:"image",cache:o.textureManager,extension:g,responseType:"blob",key:f,url:l,xhrSettings:u,config:v};if(a.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(){a.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(i.data),i.onProcessError()},a.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,f){if(Array.isArray(i))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(35154),s=t(41212),h=new d({Extends:a,initialize:function(o,f,l,u,v){var g="json";if(s(f)){var x=f;f=n(x,"key"),l=n(x,"url"),u=n(x,"xhrSettings"),g=n(x,"extension",g),v=n(x,"dataKey",v)}var m={type:"json",cache:o.cacheManager.json,extension:g,responseType:"text",key:f,url:l,xhrSettings:u,config:v};a.call(this,o,m),s(l)&&(v?this.data=e(l,v):this.data=l,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(f){throw this.onProcessError(),f}var o=this.config;typeof o=="string"?this.data=e(i,o,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,o,f,l){if(Array.isArray(i))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),h=new d({Extends:s,initialize:function(o,f,l,u,v,g,x){if(n(f)){var m=f;f=a(m,"key"),a(m,"url",!1)?l=a(m,"url"):l=a(m,"atlasURL"),g=a(m,"xhrSettings"),u=a(m,"path"),v=a(m,"baseURL"),x=a(m,"textureXhrSettings")}var y=new e(o,f,l,g);s.call(this,o,"multiatlas",f,[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 f=i.data.textures,l=this.config,u=this.loader,v=u.baseURL,g=u.path,x=u.prefix,m=a(l,"baseURL",this.baseURL),y=a(l,"path",this.path),T=a(l,"prefix",this.prefix),E=a(l,"textureXhrSettings");u.setBaseURL(m),u.setPath(y),u.setPrefix(T);for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(41212),n=t(26430),e=t(34328),s=new d({Extends:n,initialize:function(i,o,f,l){var u="js",v=[];if(r(o)){var g=o;o=a(g,"key"),f=a(g,"url"),l=a(g,"xhrSettings"),u=a(g,"extension",u)}Array.isArray(f)||(f=[f]);for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(41212),n=t(26430),e=t(85048),s=t(61485),h=t(78776),i=new d({Extends:n,initialize:function(f,l,u,v,g,x){var m,y,T=f.cacheManager.obj;if(r(l)){var E=l;l=a(E,"key"),m=new h(f,{key:l,type:"obj",cache:T,url:a(E,"url"),extension:a(E,"extension","obj"),xhrSettings:a(E,"xhrSettings"),config:{flipUV:a(E,"flipUV",g)}}),v=a(E,"matURL"),v&&(y=new h(f,{key:l,type:"mat",cache:T,url:v,extension:a(E,"matExtension","mat"),xhrSettings:a(E,"xhrSettings")}))}else m=new h(f,{key:l,url:u,type:"obj",cache:T,extension:"obj",xhrSettings:x,config:{flipUV:g}}),v&&(y=new h(f,{key:l,url:v,type:"mat",cache:T,extension:"mat",xhrSettings:x}));n.call(this,f,"obj",l,[m,y])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],f=this.files[1],l=e(o.data,o.config.flipUV);f&&(l.materials=s(f.data)),o.cache.add(o.key,l),this.complete=!0}}});c.register("obj",function(o,f,l,u,v){var g;if(Array.isArray(o))for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(74099),r=t(518),n=new d({Extends:r,initialize:function(s,h,i,o,f){r.call(this,s,h,i,o,f),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()}});a.register("pack",function(e,s,h,i){if(Array.isArray(e))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l,u,v){var g="js";if(e(o)){var x=o;o=n(x,"key"),f=n(x,"url"),v=n(x,"xhrSettings"),g=n(x,"extension",g),l=n(x,"start"),u=n(x,"mapping")}var m={type:"plugin",cache:!1,extension:g,responseType:"text",key:o,url:f,xhrSettings:v,config:{start:l,mapping:u}};a.call(this,i,m),typeof f=="function"&&(this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,i=this.config,o=n(i,"start",!1),f=n(i,"mapping",null);if(this.state===c.FILE_POPULATED)h.install(this.key,this.data,o,f);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 l=h.install(this.key,window[this.key],o,f);(o||f)&&(this.loader.systems[f]=l,this.loader.scene[f]=l)}this.onProcessComplete()}});r.register("plugin",function(h,i,o,f,l){if(Array.isArray(h))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l,u){var v="svg";if(e(o)){var g=o;o=n(g,"key"),f=n(g,"url"),l=n(g,"svgConfig",{}),u=n(g,"xhrSettings"),v=n(g,"extension",v)}var x={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:o,url:f,xhrSettings:u,config:{width:n(l,"width"),height:n(l,"height"),scale:n(l,"scale")}};a.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var h=this.xhrLoader.responseText,i=[h],o=this.config.width,f=this.config.height,l=this.config.scale;t:if(o&&f||l){var u=null,v=new DOMParser;u=v.parseFromString(h,"text/xml");var g=u.getElementsByTagName("svg")[0],x=g.hasAttribute("viewBox"),m=parseFloat(g.getAttribute("width")),y=parseFloat(g.getAttribute("height"));if(!x&&m&&y)g.setAttribute("viewBox","0 0 "+m+" "+y);else if(x&&!m&&!y){var T=g.getAttribute("viewBox").split(/\s+|,/);m=T[2],y=T[3]}if(l)if(m&&y)o=m*l,f=y*l;else break t;g.setAttribute("width",o.toString()+"px"),g.setAttribute("height",f.toString()+"px"),i=[new XMLSerializer().serializeToString(g)]}try{var E=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 C=this,A=!1;this.data.onload=function(){A||a.revokeObjectURL(C.data),C.onProcessComplete()},this.data.onerror=function(){A?C.onProcessError():(A=!0,a.revokeObjectURL(C.data),C.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},a.createObjectURL(this.data,E,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(h,i,o,f){if(Array.isArray(h))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l){var u="js";if(e(o)){var v=o;o=n(v,"key"),f=n(v,"url"),l=n(v,"xhrSettings"),u=n(v,"extension",u)}var g={type:"text",extension:u,responseType:"text",key:o,url:f,xhrSettings:l};a.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var h=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(h)),this.complete=!0}});r.register("sceneFile",function(h,i,o){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l,u,v){var g="js";if(e(o)){var x=o;o=n(x,"key"),f=n(x,"url"),v=n(x,"xhrSettings"),g=n(x,"extension",g),l=n(x,"systemKey"),u=n(x,"sceneKey")}var m={type:"scenePlugin",cache:!1,extension:g,responseType:"text",key:o,url:f,xhrSettings:v,config:{systemKey:l,sceneKey:u}};a.call(this,i,m),typeof f=="function"&&(this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,i=this.config,o=this.key,f=n(i,"systemKey",o),l=n(i,"sceneKey",o);this.state===c.FILE_POPULATED?h.installScenePlugin(f,this.data,l,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),h.installScenePlugin(f,window[this.key],l,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(h,i,o,f,l){if(Array.isArray(h))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l,u){var v="js";if(e(o)){var g=o;o=n(g,"key"),f=n(g,"url"),l=n(g,"type","script"),u=n(g,"xhrSettings"),v=n(g,"extension",v)}else l===void 0&&(l="script");var x={type:l,cache:!1,extension:v,responseType:"text",key:o,url:f,xhrSettings:u};a.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(h,i,o,f){if(Array.isArray(h))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(74099),r=t(19550),n=new d({Extends:r,initialize:function(s,h,i,o,f){r.call(this,s,h,i,f,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)}});a.register("spritesheet",function(e,s,h,i){if(Array.isArray(e))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:a,initialize:function(i,o,f,l){var u="text",v="txt",g=i.cacheManager.text;if(e(o)){var x=o;o=n(x,"key"),f=n(x,"url"),l=n(x,"xhrSettings"),v=n(x,"extension",v),u=n(x,"type",u),g=n(x,"cache",g)}var m={type:u,cache:g,extension:v,responseType:"text",key:o,url:f,xhrSettings:l};a.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(h,i,o){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(80341),h=new d({Extends:a,initialize:function(o,f,l,u){var v="csv";if(e(f)){var g=f;f=n(g,"key"),l=n(g,"url"),u=n(g,"xhrSettings"),v=n(g,"extension",v)}var x={type:"tilemapCSV",cache:o.cacheManager.tilemap,extension:v,responseType:"text",key:f,url:l,xhrSettings:u};a.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,f){if(Array.isArray(i))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(518),r=t(80341),n=new d({Extends:a,initialize:function(s,h,i,o){a.call(this,s,h,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,h){if(Array.isArray(e))for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(518),r=t(80341),n=new d({Extends:a,initialize:function(s,h,i,o){a.call(this,s,h,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,h){if(Array.isArray(e))for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(74099),a=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(78776),h=new d({Extends:e,initialize:function(o,f,l,u,v,g){var x,m;if(n(f)){var y=f;f=a(y,"key"),x=new r(o,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new s(o,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","txt"),xhrSettings:a(y,"atlasXhrSettings")})}else x=new r(o,f,l,v),m=new s(o,f,u,g);x.linkFile?e.call(this,o,"unityatlas",f,[x,m,x.linkFile]):e.call(this,o,"unityatlas",f,[x,m])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],o=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,o.data,f),this.complete=!0}}});c.register("unityAtlas",function(i,o,f,l,u){var v;if(Array.isArray(i))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(98356),e=t(95540),s=t(41212),h=new d({Extends:a,initialize:function(o,f,l,u){if(u===void 0&&(u=!1),s(f)){var v=f;f=e(v,"key"),l=e(v,"url",[]),u=e(v,"noAudio",!1)}var g=o.systems.game.device.video.getVideoURL(l);g||console.warn("VideoFile: No supported format for "+f);var x={type:"video",cache:o.cacheManager.video,extension:g.type,key:f,url:g.url,config:{noAudio:u}};a.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,f){if(Array.isArray(i))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(23906),a=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(56836),h=new d({Extends:a,initialize:function(o,f,l,u){var v="xml";if(e(f)){var g=f;f=n(g,"key"),l=n(g,"url"),u=n(g,"xhrSettings"),v=n(g,"extension",v)}var x={type:"xml",cache:o.cacheManager.xml,extension:v,responseType:"text",key:f,url:l,xhrSettings:u};a.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,f){if(Array.isArray(i))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 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),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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23906),c=t(79291),a={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)};a=c(!1,a,d),p.exports=a},53307:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6411),c=function(a,r){return d(a)/d(r)/d(a-r)};p.exports=c},30976:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){var n=(a-d)*.5,e=(r-c)*.5,s=t*t,h=t*s;return(2*c-2*a+n+e)*h+(-3*c+3*a-2*n-e)*s+n*t+c};p.exports=S},26302:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=Math.pow(c,-d);return Math.ceil(t*a)/a};p.exports=S},45319:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=function(a){return a*d.DEG_TO_RAD};p.exports=c},61241:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(37867),r=t(29747),n=new a,e=new c({initialize:function s(h,i,o,f){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f=s.DefaultOrder),this._x=h,this._y=i,this._z=o,this._order=f,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,h,i,o){return o===void 0&&(o=this._order),this._x=s,this._y=h,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,h,i){return h===void 0&&(h=this._order),i===void 0&&(i=!1),n.fromQuat(s),this.setFromRotationMatrix(n,h,i)},setFromRotationMatrix:function(s,h,i){h===void 0&&(h=this._order),i===void 0&&(i=!1);var o=s.val,f=o[0],l=o[4],u=o[8],v=o[1],g=o[5],x=o[9],m=o[2],y=o[6],T=o[10],E=0,C=0,A=0,P=.99999;switch(h){case"XYZ":{C=Math.asin(d(u,-1,1)),Math.abs(u){/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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 a=Math.pow(c,-d);return Math.floor(t*a)/a};p.exports=S},62945:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=function(a,r,n){return a=d(a,0,1),(n-r)*a+r};p.exports=c},38265:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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(a){return this.copy(a)},copy:function(a){var r=this.val,n=a.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(a){var r=a.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(a){var r=this.val;return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[8]=a[8],this},identity:function(){var a=this.val;return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=0,a[7]=0,a[8]=1,this},transpose:function(){var a=this.val,r=a[1],n=a[2],e=a[5];return a[1]=a[3],a[2]=a[6],a[3]=r,a[5]=a[7],a[6]=n,a[7]=e,this},invert:function(){var a=this.val,r=a[0],n=a[1],e=a[2],s=a[3],h=a[4],i=a[5],o=a[6],f=a[7],l=a[8],u=l*h-i*f,v=-l*s+i*o,g=f*s-h*o,x=r*u+n*v+e*g;return x?(x=1/x,a[0]=u*x,a[1]=(-l*n+e*f)*x,a[2]=(i*n-e*h)*x,a[3]=v*x,a[4]=(l*r-e*o)*x,a[5]=(-i*r+e*s)*x,a[6]=g*x,a[7]=(-f*r+n*o)*x,a[8]=(h*r-n*s)*x,this):null},adjoint:function(){var a=this.val,r=a[0],n=a[1],e=a[2],s=a[3],h=a[4],i=a[5],o=a[6],f=a[7],l=a[8];return a[0]=h*l-i*f,a[1]=e*f-n*l,a[2]=n*i-e*h,a[3]=i*o-s*l,a[4]=r*l-e*o,a[5]=e*s-r*i,a[6]=s*f-h*o,a[7]=n*o-r*f,a[8]=r*h-n*s,this},determinant:function(){var a=this.val,r=a[0],n=a[1],e=a[2],s=a[3],h=a[4],i=a[5],o=a[6],f=a[7],l=a[8];return r*(l*h-i*f)+n*(-l*s+i*o)+e*(f*s-h*o)},multiply:function(a){var r=this.val,n=r[0],e=r[1],s=r[2],h=r[3],i=r[4],o=r[5],f=r[6],l=r[7],u=r[8],v=a.val,g=v[0],x=v[1],m=v[2],y=v[3],T=v[4],E=v[5],C=v[6],A=v[7],P=v[8];return r[0]=g*n+x*h+m*f,r[1]=g*e+x*i+m*l,r[2]=g*s+x*o+m*u,r[3]=y*n+T*h+E*f,r[4]=y*e+T*i+E*l,r[5]=y*s+T*o+E*u,r[6]=C*n+A*h+P*f,r[7]=C*e+A*i+P*l,r[8]=C*s+A*o+P*u,this},translate:function(a){var r=this.val,n=a.x,e=a.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(a){var r=this.val,n=r[0],e=r[1],s=r[2],h=r[3],i=r[4],o=r[5],f=Math.sin(a),l=Math.cos(a);return r[0]=l*n+f*h,r[1]=l*e+f*i,r[2]=l*s+f*o,r[3]=l*h-f*n,r[4]=l*i-f*e,r[5]=l*o-f*s,this},scale:function(a){var r=this.val,n=a.x,e=a.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(a){var r=a.x,n=a.y,e=a.z,s=a.w,h=r+r,i=n+n,o=e+e,f=r*h,l=r*i,u=r*o,v=n*i,g=n*o,x=e*o,m=s*h,y=s*i,T=s*o,E=this.val;return E[0]=1-(v+x),E[3]=l+T,E[6]=u-y,E[1]=l-T,E[4]=1-(f+x),E[7]=g+m,E[2]=u+y,E[5]=g-m,E[8]=1-(f+v),this},normalFromMat4:function(a){var r=a.val,n=this.val,e=r[0],s=r[1],h=r[2],i=r[3],o=r[4],f=r[5],l=r[6],u=r[7],v=r[8],g=r[9],x=r[10],m=r[11],y=r[12],T=r[13],E=r[14],C=r[15],A=e*f-s*o,P=e*l-h*o,M=e*u-i*o,F=s*l-h*f,L=s*u-i*f,D=h*u-i*l,I=v*T-g*y,U=v*E-x*y,z=v*C-m*y,w=g*E-x*T,G=g*C-m*T,R=x*C-m*E,O=A*R-P*G+M*w+F*z-L*U+D*I;return O?(O=1/O,n[0]=(f*R-l*G+u*w)*O,n[1]=(l*z-o*R-u*U)*O,n[2]=(o*G-f*z+u*I)*O,n[3]=(h*G-s*R-i*w)*O,n[4]=(e*R-h*z+i*U)*O,n[5]=(s*z-e*G-i*I)*O,n[6]=(T*D-E*L+C*F)*O,n[7]=(E*M-y*D-C*P)*O,n[8]=(y*L-T*M+C*A)*O,this):null}});p.exports=c},37867:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(25836),a=1e-6,r=new d({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new r(this)},set:function(o){return this.copy(o)},setValues:function(o,f,l,u,v,g,x,m,y,T,E,C,A,P,M,F){var L=this.val;return L[0]=o,L[1]=f,L[2]=l,L[3]=u,L[4]=v,L[5]=g,L[6]=x,L[7]=m,L[8]=y,L[9]=T,L[10]=E,L[11]=C,L[12]=A,L[13]=P,L[14]=M,L[15]=F,this},copy:function(o){var f=o.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[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,f,l){var u=n.fromQuat(l),v=u.val,g=f.x,x=f.y,m=f.z;return this.setValues(v[0]*g,v[1]*g,v[2]*g,0,v[4]*x,v[5]*x,v[6]*x,0,v[8]*m,v[9]*m,v[10]*m,0,o.x,o.y,o.z,1)},xyz:function(o,f,l){this.identity();var u=this.val;return u[12]=o,u[13]=f,u[14]=l,this},scaling:function(o,f,l){this.zero();var u=this.val;return u[0]=o,u[5]=f,u[10]=l,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,f=o[1],l=o[2],u=o[3],v=o[6],g=o[7],x=o[11];return o[1]=o[4],o[2]=o[8],o[3]=o[12],o[4]=f,o[6]=o[9],o[7]=o[13],o[8]=l,o[9]=v,o[11]=o[14],o[12]=u,o[13]=g,o[14]=x,this},getInverse:function(o){return this.copy(o),this.invert()},invert:function(){var o=this.val,f=o[0],l=o[1],u=o[2],v=o[3],g=o[4],x=o[5],m=o[6],y=o[7],T=o[8],E=o[9],C=o[10],A=o[11],P=o[12],M=o[13],F=o[14],L=o[15],D=f*x-l*g,I=f*m-u*g,U=f*y-v*g,z=l*m-u*x,w=l*y-v*x,G=u*y-v*m,R=T*M-E*P,O=T*F-C*P,B=T*L-A*P,N=E*F-C*M,X=E*L-A*M,V=C*L-A*F,Y=D*V-I*X+U*N+z*B-w*O+G*R;return Y?(Y=1/Y,this.setValues((x*V-m*X+y*N)*Y,(u*X-l*V-v*N)*Y,(M*G-F*w+L*z)*Y,(C*w-E*G-A*z)*Y,(m*B-g*V-y*O)*Y,(f*V-u*B+v*O)*Y,(F*U-P*G-L*I)*Y,(T*G-C*U+A*I)*Y,(g*X-x*B+y*R)*Y,(l*B-f*X-v*R)*Y,(P*w-M*U+L*D)*Y,(E*U-T*w-A*D)*Y,(x*O-g*N-m*R)*Y,(f*N-l*O+u*R)*Y,(M*I-P*z-F*D)*Y,(T*z-E*I+C*D)*Y)):this},adjoint:function(){var o=this.val,f=o[0],l=o[1],u=o[2],v=o[3],g=o[4],x=o[5],m=o[6],y=o[7],T=o[8],E=o[9],C=o[10],A=o[11],P=o[12],M=o[13],F=o[14],L=o[15];return this.setValues(x*(C*L-A*F)-E*(m*L-y*F)+M*(m*A-y*C),-(l*(C*L-A*F)-E*(u*L-v*F)+M*(u*A-v*C)),l*(m*L-y*F)-x*(u*L-v*F)+M*(u*y-v*m),-(l*(m*A-y*C)-x*(u*A-v*C)+E*(u*y-v*m)),-(g*(C*L-A*F)-T*(m*L-y*F)+P*(m*A-y*C)),f*(C*L-A*F)-T*(u*L-v*F)+P*(u*A-v*C),-(f*(m*L-y*F)-g*(u*L-v*F)+P*(u*y-v*m)),f*(m*A-y*C)-g*(u*A-v*C)+T*(u*y-v*m),g*(E*L-A*M)-T*(x*L-y*M)+P*(x*A-y*E),-(f*(E*L-A*M)-T*(l*L-v*M)+P*(l*A-v*E)),f*(x*L-y*M)-g*(l*L-v*M)+P*(l*y-v*x),-(f*(x*A-y*E)-g*(l*A-v*E)+T*(l*y-v*x)),-(g*(E*F-C*M)-T*(x*F-m*M)+P*(x*C-m*E)),f*(E*F-C*M)-T*(l*F-u*M)+P*(l*C-u*E),-(f*(x*F-m*M)-g*(l*F-u*M)+P*(l*m-u*x)),f*(x*C-m*E)-g*(l*C-u*E)+T*(l*m-u*x))},determinant:function(){var o=this.val,f=o[0],l=o[1],u=o[2],v=o[3],g=o[4],x=o[5],m=o[6],y=o[7],T=o[8],E=o[9],C=o[10],A=o[11],P=o[12],M=o[13],F=o[14],L=o[15],D=f*x-l*g,I=f*m-u*g,U=f*y-v*g,z=l*m-u*x,w=l*y-v*x,G=u*y-v*m,R=T*M-E*P,O=T*F-C*P,B=T*L-A*P,N=E*F-C*M,X=E*L-A*M,V=C*L-A*F;return D*V-I*X+U*N+z*B-w*O+G*R},multiply:function(o){var f=this.val,l=f[0],u=f[1],v=f[2],g=f[3],x=f[4],m=f[5],y=f[6],T=f[7],E=f[8],C=f[9],A=f[10],P=f[11],M=f[12],F=f[13],L=f[14],D=f[15],I=o.val,U=I[0],z=I[1],w=I[2],G=I[3];return f[0]=U*l+z*x+w*E+G*M,f[1]=U*u+z*m+w*C+G*F,f[2]=U*v+z*y+w*A+G*L,f[3]=U*g+z*T+w*P+G*D,U=I[4],z=I[5],w=I[6],G=I[7],f[4]=U*l+z*x+w*E+G*M,f[5]=U*u+z*m+w*C+G*F,f[6]=U*v+z*y+w*A+G*L,f[7]=U*g+z*T+w*P+G*D,U=I[8],z=I[9],w=I[10],G=I[11],f[8]=U*l+z*x+w*E+G*M,f[9]=U*u+z*m+w*C+G*F,f[10]=U*v+z*y+w*A+G*L,f[11]=U*g+z*T+w*P+G*D,U=I[12],z=I[13],w=I[14],G=I[15],f[12]=U*l+z*x+w*E+G*M,f[13]=U*u+z*m+w*C+G*F,f[14]=U*v+z*y+w*A+G*L,f[15]=U*g+z*T+w*P+G*D,this},multiplyLocal:function(o){var f=this.val,l=o.val;return this.setValues(f[0]*l[0]+f[1]*l[4]+f[2]*l[8]+f[3]*l[12],f[0]*l[1]+f[1]*l[5]+f[2]*l[9]+f[3]*l[13],f[0]*l[2]+f[1]*l[6]+f[2]*l[10]+f[3]*l[14],f[0]*l[3]+f[1]*l[7]+f[2]*l[11]+f[3]*l[15],f[4]*l[0]+f[5]*l[4]+f[6]*l[8]+f[7]*l[12],f[4]*l[1]+f[5]*l[5]+f[6]*l[9]+f[7]*l[13],f[4]*l[2]+f[5]*l[6]+f[6]*l[10]+f[7]*l[14],f[4]*l[3]+f[5]*l[7]+f[6]*l[11]+f[7]*l[15],f[8]*l[0]+f[9]*l[4]+f[10]*l[8]+f[11]*l[12],f[8]*l[1]+f[9]*l[5]+f[10]*l[9]+f[11]*l[13],f[8]*l[2]+f[9]*l[6]+f[10]*l[10]+f[11]*l[14],f[8]*l[3]+f[9]*l[7]+f[10]*l[11]+f[11]*l[15],f[12]*l[0]+f[13]*l[4]+f[14]*l[8]+f[15]*l[12],f[12]*l[1]+f[13]*l[5]+f[14]*l[9]+f[15]*l[13],f[12]*l[2]+f[13]*l[6]+f[14]*l[10]+f[15]*l[14],f[12]*l[3]+f[13]*l[7]+f[14]*l[11]+f[15]*l[15])},premultiply:function(o){return this.multiplyMatrices(o,this)},multiplyMatrices:function(o,f){var l=o.val,u=f.val,v=l[0],g=l[4],x=l[8],m=l[12],y=l[1],T=l[5],E=l[9],C=l[13],A=l[2],P=l[6],M=l[10],F=l[14],L=l[3],D=l[7],I=l[11],U=l[15],z=u[0],w=u[4],G=u[8],R=u[12],O=u[1],B=u[5],N=u[9],X=u[13],V=u[2],Y=u[6],W=u[10],H=u[14],b=u[3],K=u[7],J=u[11],Z=u[15];return this.setValues(v*z+g*O+x*V+m*b,y*z+T*O+E*V+C*b,A*z+P*O+M*V+F*b,L*z+D*O+I*V+U*b,v*w+g*B+x*Y+m*K,y*w+T*B+E*Y+C*K,A*w+P*B+M*Y+F*K,L*w+D*B+I*Y+U*K,v*G+g*N+x*W+m*J,y*G+T*N+E*W+C*J,A*G+P*N+M*W+F*J,L*G+D*N+I*W+U*J,v*R+g*X+x*H+m*Z,y*R+T*X+E*H+C*Z,A*R+P*X+M*H+F*Z,L*R+D*X+I*H+U*Z)},translate:function(o){return this.translateXYZ(o.x,o.y,o.z)},translateXYZ:function(o,f,l){var u=this.val;return u[12]=u[0]*o+u[4]*f+u[8]*l+u[12],u[13]=u[1]*o+u[5]*f+u[9]*l+u[13],u[14]=u[2]*o+u[6]*f+u[10]*l+u[14],u[15]=u[3]*o+u[7]*f+u[11]*l+u[15],this},scale:function(o){return this.scaleXYZ(o.x,o.y,o.z)},scaleXYZ:function(o,f,l){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]*f,u[5]=u[5]*f,u[6]=u[6]*f,u[7]=u[7]*f,u[8]=u[8]*l,u[9]=u[9]*l,u[10]=u[10]*l,u[11]=u[11]*l,this},makeRotationAxis:function(o,f){var l=Math.cos(f),u=Math.sin(f),v=1-l,g=o.x,x=o.y,m=o.z,y=v*g,T=v*x;return this.setValues(y*g+l,y*x-u*m,y*m+u*x,0,y*x+u*m,T*x+l,T*m-u*g,0,y*m-u*x,T*m+u*g,v*m*m+l,0,0,0,0,1)},rotate:function(o,f){var l=this.val,u=f.x,v=f.y,g=f.z,x=Math.sqrt(u*u+v*v+g*g);if(Math.abs(x){/** + * @author Richard Davey + * @copyright 2013-2024 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(a,r){return a-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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){c===void 0&&(c=d+1);var r=(t-d)/(c-d);return r>1?a!==void 0?(r=(a-t)/(a-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=S},15746:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(94434),a=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),h=new r(1,0,0),i=new r(0,1,0),o=new r,f=new c,l=new d({initialize:function(v,g,x,m){this.onChangeCallback=a,this.set(v,g,x,m)},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,g,x,m){return m===void 0&&(m=!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=g||0,this._w=x||0),m&&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,g=this.z,x=this.w;return Math.sqrt(u*u+v*v+g*g+x*x)},lengthSq:function(){var u=this.x,v=this.y,g=this.z,x=this.w;return u*u+v*v+g*g+x*x},normalize:function(){var u=this.x,v=this.y,g=this.z,x=this.w,m=u*u+v*v+g*g+x*x;return m>0&&(m=1/Math.sqrt(m),this._x=u*m,this._y=v*m,this._z=g*m,this._w=x*m),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 g=this.x,x=this.y,m=this.z,y=this.w;return this.set(g+v*(u.x-g),x+v*(u.y-x),m+v*(u.z-m),y+v*(u.w-y))},rotationTo:function(u,v){var g=u.x*v.x+u.y*v.y+u.z*v.z;return g<-.999999?(o.copy(h).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+g,this.normalize())},setAxes:function(u,v,g){var x=f.val;return x[0]=v.x,x[3]=v.y,x[6]=v.z,x[1]=g.x,x[4]=g.y,x[7]=g.z,x[2]=-u.x,x[5]=-u.y,x[8]=-u.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(u,v){v=v*.5;var g=Math.sin(v);return this.set(g*u.x,g*u.y,g*u.z,Math.cos(v))},multiply:function(u){var v=this.x,g=this.y,x=this.z,m=this.w,y=u.x,T=u.y,E=u.z,C=u.w;return this.set(v*C+m*y+g*E-x*T,g*C+m*T+x*y-v*E,x*C+m*E+v*T-g*y,m*C-v*y-g*T-x*E)},slerp:function(u,v){var g=this.x,x=this.y,m=this.z,y=this.w,T=u.x,E=u.y,C=u.z,A=u.w,P=g*T+x*E+m*C+y*A;P<0&&(P=-P,T=-T,E=-E,C=-C,A=-A);var M=1-v,F=v;if(1-P>n){var L=Math.acos(P),D=Math.sin(L);M=Math.sin((1-v)*L)/D,F=Math.sin(v*L)/D}return this.set(M*g+F*T,M*x+F*E,M*m+F*C,M*y+F*A)},invert:function(){var u=this.x,v=this.y,g=this.z,x=this.w,m=u*u+v*v+g*g+x*x,y=m?1/m:0;return this.set(-u*y,-v*y,-g*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,g=this.y,x=this.z,m=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+m*y,g*T+x*y,x*T-g*y,m*T-v*y)},rotateY:function(u){u*=.5;var v=this.x,g=this.y,x=this.z,m=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T-x*y,g*T+m*y,x*T+v*y,m*T-g*y)},rotateZ:function(u){u*=.5;var v=this.x,g=this.y,x=this.z,m=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+g*y,g*T-v*y,x*T+m*y,m*T-x*y)},calculateW:function(){var u=this.x,v=this.y,g=this.z;return this.w=-Math.sqrt(1-u*u-v*v-g*g),this},setFromEuler:function(u,v){var g=u.x/2,x=u.y/2,m=u.z/2,y=Math.cos(g),T=Math.cos(x),E=Math.cos(m),C=Math.sin(g),A=Math.sin(x),P=Math.sin(m);switch(u.order){case"XYZ":{this.set(C*T*E+y*A*P,y*A*E-C*T*P,y*T*P+C*A*E,y*T*E-C*A*P,v);break}case"YXZ":{this.set(C*T*E+y*A*P,y*A*E-C*T*P,y*T*P-C*A*E,y*T*E+C*A*P,v);break}case"ZXY":{this.set(C*T*E-y*A*P,y*A*E+C*T*P,y*T*P+C*A*E,y*T*E-C*A*P,v);break}case"ZYX":{this.set(C*T*E-y*A*P,y*A*E+C*T*P,y*T*P-C*A*E,y*T*E+C*A*P,v);break}case"YZX":{this.set(C*T*E+y*A*P,y*A*E+C*T*P,y*T*P-C*A*E,y*T*E-C*A*P,v);break}case"XZY":{this.set(C*T*E-y*A*P,y*A*E-C*T*P,y*T*P+C*A*E,y*T*E+C*A*P,v);break}}return this},setFromRotationMatrix:function(u){var v=u.val,g=v[0],x=v[4],m=v[8],y=v[1],T=v[5],E=v[9],C=v[2],A=v[6],P=v[10],M=g+T+P,F;return M>0?(F=.5/Math.sqrt(M+1),this.set((A-E)*F,(m-C)*F,(y-x)*F,.25/F)):g>T&&g>P?(F=2*Math.sqrt(1+g-T-P),this.set(.25*F,(x+y)/F,(m+C)/F,(A-E)/F)):T>P?(F=2*Math.sqrt(1+T-g-P),this.set((x+y)/F,.25*F,(E+A)/F,(m-C)/F)):(F=2*Math.sqrt(1+P-g-T),this.set((m+C)/F,(E+A)/F,.25*F,(y-x)/F)),this},fromMat3:function(u){var v=u.val,g=v[0]+v[4]+v[8],x;if(g>0)x=Math.sqrt(g+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 m=0;v[4]>v[0]&&(m=1),v[8]>v[m*3+m]&&(m=2);var y=e[m],T=e[y];x=Math.sqrt(v[m*3+m]-v[y*3+y]-v[T*3+T]+1),s[m]=.5*x,x=.5/x,s[y]=(v[y*3+m]+v[m*3+y])*x,s[T]=(v[T*3+m]+v[m*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=l},43396:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=function(a){return a*d.RAD_TO_DEG};p.exports=c},74362:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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,a=Math.random()*2-1,r=Math.sqrt(1-a*a)*d;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=a*d,t};p.exports=S},67421:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x,a=t.y;return t.x=c*Math.cos(d)-a*Math.sin(d),t.y=c*Math.sin(d)+a*Math.cos(d),t};p.exports=S},11520:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=Math.cos(a),n=Math.sin(a),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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){var n=a+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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){return t.x=d+r*Math.cos(a),t.y=c+r*Math.sin(a),t};p.exports=S},72678:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25836),c=t(37867),a=t(15746),r=new c,n=new a,e=new d,s=function(h,i,o){return n.setAxisAngle(i,o),r.fromRotationTranslation(n,e.set(0,0,0)),h.transformMat4(r)};p.exports=s},2284:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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 a=Math.pow(c,-d);return Math.round(t*a)/a};p.exports=S},16922:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d===void 0&&(d=1),c===void 0&&(c=1),a===void 0&&(a=1),a*=Math.PI/t;for(var r=[],n=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e){e===void 0&&(e=new d);var s=0,h=0,i=r*n;return a>0&&a<=i&&(a>r-1?(h=Math.floor(a/r),s=a-h*r):s=a),e.set(s,h)};p.exports=c},85955:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s,h,i,o){o===void 0&&(o=new d);var f=Math.sin(s),l=Math.cos(s),u=l*h,v=f*h,g=-f*i,x=l*i,m=1/(u*x+g*-v);return o.x=x*m*a+-g*m*r+(e*g-n*x)*m,o.y=u*m*r+-v*m*a+(-e*u+n*v)*m,o};p.exports=c},26099:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(43855),a=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 a(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)}});a.ZERO=new a,a.RIGHT=new a(1,0),a.LEFT=new a(-1,0),a.UP=new a(0,-1),a.DOWN=new a(0,1),a.ONE=new a(1,1),p.exports=a},25836:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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(a){return this.x=Math.min(this.x,a.x),this.y=Math.min(this.y,a.y),this.z=Math.min(this.z,a.z),this},max:function(a){return this.x=Math.max(this.x,a.x),this.y=Math.max(this.y,a.y),this.z=Math.max(this.z,a.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(a,r){return this.x=a.x+r.x,this.y=a.y+r.y,this.z=a.z+r.z,this},crossVectors:function(a,r){var n=a.x,e=a.y,s=a.z,h=r.x,i=r.y,o=r.z;return this.x=e*o-s*i,this.y=s*h-n*o,this.z=n*i-e*h,this},equals:function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z},copy:function(a){return this.x=a.x,this.y=a.y,this.z=a.z||0,this},set:function(a,r,n){return typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(a){return this.fromArray(a.val,12)},setFromMatrixColumn:function(a,r){return this.fromArray(a.val,r*4)},fromArray:function(a,r){return r===void 0&&(r=0),this.x=a[r],this.y=a[r+1],this.z=a[r+2],this},add:function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z||0,this},addScalar:function(a){return this.x+=a,this.y+=a,this.z+=a,this},addScale:function(a,r){return this.x+=a.x*r,this.y+=a.y*r,this.z+=a.z*r||0,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z||0,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this.z*=a.z||1,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a,this.z*=a):(this.x=0,this.y=0,this.z=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this.z/=a.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0;return r*r+n*n+e*e},length:function(){var a=this.x,r=this.y,n=this.z;return Math.sqrt(a*a+r*r+n*n)},lengthSq:function(){var a=this.x,r=this.y,n=this.z;return a*a+r*r+n*n},normalize:function(){var a=this.x,r=this.y,n=this.z,e=a*a+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=a*e,this.y=r*e,this.z=n*e),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},cross:function(a){var r=this.x,n=this.y,e=this.z,s=a.x,h=a.y,i=a.z;return this.x=n*i-e*h,this.y=e*s-r*i,this.z=r*h-n*s,this},lerp:function(a,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z;return this.x=n+r*(a.x-n),this.y=e+r*(a.y-e),this.z=s+r*(a.z-s),this},applyMatrix3:function(a){var r=this.x,n=this.y,e=this.z,s=a.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(a){var r=this.x,n=this.y,e=this.z,s=a.val,h=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])*h,this.y=(s[1]*r+s[5]*n+s[9]*e+s[13])*h,this.z=(s[2]*r+s[6]*n+s[10]*e+s[14])*h,this},transformMat3:function(a){var r=this.x,n=this.y,e=this.z,s=a.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(a){var r=this.x,n=this.y,e=this.z,s=a.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(a){var r=this.x,n=this.y,e=this.z,s=a.val,h=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],f=r*s[3]+n*s[7]+e*s[11]+s[15];return this.x=h/f,this.y=i/f,this.z=o/f,this},transformQuat:function(a){var r=this.x,n=this.y,e=this.z,s=a.x,h=a.y,i=a.z,o=a.w,f=o*r+h*e-i*n,l=o*n+i*r-s*e,u=o*e+s*n-h*r,v=-s*r-h*n-i*e;return this.x=f*o+v*-s+l*-i-u*-h,this.y=l*o+v*-h+u*-s-f*-i,this.z=u*o+v*-i+f*-h-l*-s,this},project:function(a){var r=this.x,n=this.y,e=this.z,s=a.val,h=s[0],i=s[1],o=s[2],f=s[3],l=s[4],u=s[5],v=s[6],g=s[7],x=s[8],m=s[9],y=s[10],T=s[11],E=s[12],C=s[13],A=s[14],P=s[15],M=1/(r*f+n*g+e*T+P);return this.x=(r*h+n*l+e*x+E)*M,this.y=(r*i+n*u+e*m+C)*M,this.z=(r*o+n*v+e*y+A)*M,this},projectViewMatrix:function(a,r){return this.applyMatrix4(a).applyMatrix4(r)},unprojectViewMatrix:function(a,r){return this.applyMatrix4(a).applyMatrix4(r)},unproject:function(a,r){var n=a.x,e=a.y,s=a.z,h=a.w,i=this.x-n,o=h-this.y-1-e,f=this.z;return this.x=2*i/s-1,this.y=2*o/h-1,this.z=2*f-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-2024 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(a){return this.x=a.x,this.y=a.y,this.z=a.z||0,this.w=a.w||0,this},equals:function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z&&this.w===a.w},set:function(a,r,n,e){return typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.w=a.w||0):(this.x=a||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z||0,this.w+=a.w||0,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z||0,this.w-=a.w||0,this},scale:function(a){return this.x*=a,this.y*=a,this.z*=a,this.w*=a,this},length:function(){var a=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(a*a+r*r+n*n+e*e)},lengthSq:function(){var a=this.x,r=this.y,n=this.z,e=this.w;return a*a+r*r+n*n+e*e},normalize:function(){var a=this.x,r=this.y,n=this.z,e=this.w,s=a*a+r*r+n*n+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=a*s,this.y=r*s,this.z=n*s,this.w=e*s),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lerp:function(a,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z,h=this.w;return this.x=n+r*(a.x-n),this.y=e+r*(a.y-e),this.z=s+r*(a.z-s),this.w=h+r*(a.w-h),this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this.z*=a.z||1,this.w*=a.w||1,this},divide:function(a){return this.x/=a.x,this.y/=a.y,this.z/=a.z||1,this.w/=a.w||1,this},distance:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0,s=a.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+s*s)},distanceSq:function(a){var r=a.x-this.x,n=a.y-this.y,e=a.z-this.z||0,s=a.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(a){var r=this.x,n=this.y,e=this.z,s=this.w,h=a.val;return this.x=h[0]*r+h[4]*n+h[8]*e+h[12]*s,this.y=h[1]*r+h[5]*n+h[9]*e+h[13]*s,this.z=h[2]*r+h[6]*n+h[10]*e+h[14]*s,this.w=h[3]*r+h[7]*n+h[11]*e+h[15]*s,this},transformQuat:function(a){var r=this.x,n=this.y,e=this.z,s=a.x,h=a.y,i=a.z,o=a.w,f=o*r+h*e-i*n,l=o*n+i*r-s*e,u=o*e+s*n-h*r,v=-s*r-h*n-i*e;return this.x=f*o+v*-s+l*-i-u*-h,this.y=l*o+v*-h+u*-s-f*-i,this.z=u*o+v*-i+f*-h-l*-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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=c-d;return d+((t-d)%a+a)%a};p.exports=S},31040:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return Math.atan2(a-d,c-t)};p.exports=S},55495:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return Math.atan2(c-t,a-d)};p.exports=S},1432:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=function(a){return a>Math.PI&&(a-=d.PI2),Math.abs(((a+d.TAU)%d.PI2-d.PI2)%d.PI2)};p.exports=c},12407:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12407),c=function(a){return d(a+Math.PI)};p.exports=c},48736:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=function(a,r,n){return n===void 0&&(n=.05),a===r||(Math.abs(r-a)<=n||Math.abs(r-a)>=d.PI2-n?a=r:(Math.abs(r-a)>Math.PI&&(ra?a+=n:r{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=Math.floor((c- -180)/360);return c-a*360};p.exports=S},86554:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15994),c=function(a){return d(a,-Math.PI,Math.PI)};p.exports=c},30954:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15994),c=function(a){return d(a,-180,180)};p.exports=c},25588:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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),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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=t-c,n=d-a;return Math.sqrt(r*r+n*n)};p.exports=S},52816:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x-d.x,a=t.y-d.y;return Math.sqrt(c*c+a*a)};p.exports=S},64559:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x-d.x,a=t.y-d.y;return c*c+a*a};p.exports=S},82340:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return Math.max(Math.abs(t-c),Math.abs(d-a))};p.exports=S},14390:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(a-d,r))};p.exports=S},2243:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return Math.abs(t-c)+Math.abs(d-a)};p.exports=S},89774:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=t-c,n=d-a;return r*r+n*n};p.exports=S},50994:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(54178),c=t(41521),a=t(79980),r=t(85433),n=t(99140),e=t(48857),s=t(81596),h=t(59133),i=t(98516),o=t(35248),f=t(82500),l=t(49752);p.exports={Power0:s,Power1:h.Out,Power2:r.Out,Power3:i.Out,Power4:o.Out,Linear:s,Quad:h.Out,Cubic:r.Out,Quart:i.Out,Quint:o.Out,Sine:f.Out,Expo:e.Out,Circ:a.Out,Elastic:n.Out,Back:d.Out,Bounce:c.Out,Stepped:l,"Quad.easeIn":h.In,"Cubic.easeIn":r.In,"Quart.easeIn":i.In,"Quint.easeIn":o.In,"Sine.easeIn":f.In,"Expo.easeIn":e.In,"Circ.easeIn":a.In,"Elastic.easeIn":n.In,"Back.easeIn":d.In,"Bounce.easeIn":c.In,"Quad.easeOut":h.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":i.Out,"Quint.easeOut":o.Out,"Sine.easeOut":f.Out,"Expo.easeOut":e.Out,"Circ.easeOut":a.Out,"Elastic.easeOut":n.Out,"Back.easeOut":d.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":h.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":o.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":a.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":c.InOut}},1639:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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 a=c/4;return d<1?d=1:a=c*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/c))};p.exports=S},50665:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=c/4;return d<1?d=1:a=c*Math.asin(1/d)/(2*Math.PI),(t*=2)<1?-.5*(d*Math.pow(2,10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/c)):d*Math.pow(2,-10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/c)*.5+1};p.exports=S},7744:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=c/4;return d<1?d=1:a=c*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*t)*Math.sin((t-a)*(2*Math.PI)/c)+1};p.exports=S},99140:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=t(7147)},34826:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=t(72251)},75698:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36383),c=t(79291),a={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)};a=c(!1,a,d),p.exports=a},89318:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85710),c=function(a,r){for(var n=0,e=a.length-1,s=0;s<=e;s++)n+=Math.pow(1-r,e-s)*Math.pow(r,s)*a[s]*d(e,s);return n};p.exports=c},77259:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87842),c=function(a,r){var n=a.length-1,e=n*r,s=Math.floor(e);return a[0]===a[n]?(r<0&&(s=Math.floor(e=n*(1+r))),d(e-s,a[(s-1+n)%n],a[s],a[(s+1)%n],a[(s+2)%n])):r<0?a[0]-(d(-e,a[0],a[0],a[1],a[1])-a[0]):r>1?a[n]-(d(e-n,a[n],a[n],a[n-1],a[n-1])-a[n]):d(e-s,a[s?s-1:0],a[s],a[n{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=function(r,n,e,s,h){return S(r,n)+t(r,e)+d(r,s)+c(r,h)};p.exports=a},28392:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28915),c=function(a,r){var n=a.length-1,e=n*r,s=Math.floor(e);return r<0?d(a[0],a[1],e):r>1?d(a[n],a[n-1],n-e):d(a[s],a[s+1>n?n:s+1],e-s)};p.exports=c},32112:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(a,r){var n=1-a;return n*n*r}function t(a,r){return 2*(1-a)*a*r}function d(a,r){return a*a*r}var c=function(a,r,n,e){return S(a,r)+t(a,n)+d(a,e)};p.exports=c},47235:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7602),c=function(a,r,n){return r+(n-r)*d(a,0,1)};p.exports=c},50178:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(54261),c=function(a,r,n){return r+(n-r)*d(a,0,1)};p.exports=c},38289:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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-2024 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 a=2091639*this.s0+this.c*23283064365386963e-26;return this.c=a|0,this.s0=this.s1,this.s1=this.s2,this.s2=a-this.c,this.s2},hash:function(a){var r,n=this.n;a=a.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(a){typeof a=="string"?this.state(a):this.sow(a)},sow:function(a){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!a)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),s=a[e];a[e]=a[n],a[n]=s}return a}});p.exports=c},63448:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.ceil(t/d),a?(c+t)/d:c+t)};p.exports=S},56583:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.floor(t/d),a?(c+t)/d:c+t)};p.exports=S},77720:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.round(t/d),a?(c+t)/d:c+t)};p.exports=S},73697:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */t(63595);var d=t(8054),c=t(79291),a={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)};a.Sound=t(23717),a=c(!1,a,d),p.exports=a,t.g.Phaser=a},71289:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(92209),a=t(88571),r=new d({Extends:a,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,h,i,o){a.call(this,e,s,h,i,o),this.body=null}});p.exports=r},86689:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(39506),a=t(20339),r=t(89774),n=t(66022),e=t(95540),s=t(46975),h=t(72441),i=t(47956),o=t(37277),f=t(44594),l=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(f.BOOT,this.boot,this),x.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new u(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new u(this.scene,this.config),this.add=new n(this.world));var g=this.systems.events;e(this.config,"customUpdate",!1)||g.on(f.UPDATE,this.world.update,this.world),g.on(f.POST_UPDATE,this.world.postUpdate,this.world),g.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var g=this.systems.game.config.physics,x=this.systems.settings.physics,m=s(e(x,"arcade",{}),e(g,"arcade",{}));return m},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(g,x,m,y,T){return m===void 0&&(m=null),y===void 0&&(y=null),T===void 0&&(T=m),this.world.collideObjects(g,x,m,y,T,!0)},collide:function(g,x,m,y,T){return m===void 0&&(m=null),y===void 0&&(y=null),T===void 0&&(T=m),this.world.collideObjects(g,x,m,y,T,!1)},collideTiles:function(g,x,m,y,T){return this.world.collideTiles(g,x,m,y,T)},overlapTiles:function(g,x,m,y,T){return this.world.overlapTiles(g,x,m,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,x,m,y,T,E){y===void 0&&(y=60);var C=Math.atan2(m-g.y,x-g.x);return g.body.acceleration.setToPolar(C,y),T!==void 0&&E!==void 0&&g.body.maxVelocity.set(T,E),C},accelerateToObject:function(g,x,m,y,T){return this.accelerateTo(g,x.x,x.y,m,y,T)},closest:function(g,x){x||(x=this.world.bodies.entries);for(var m=Number.MAX_VALUE,y=null,T=g.x,E=g.y,C=x.length,A=0;Am&&(y=P,m=F)}}return y},moveTo:function(g,x,m,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var E=Math.atan2(m-g.y,x-g.x);return T>0&&(y=a(g.x,g.y,x,m)/(T/1e3)),g.body.velocity.setToPolar(E,y),E},moveToObject:function(g,x,m,y){return this.moveTo(g,x.x,x.y,m,y)},velocityFromAngle:function(g,x,m){return x===void 0&&(x=60),m===void 0&&(m=new l),m.setToPolar(c(g),x)},velocityFromRotation:function(g,x,m){return x===void 0&&(x=60),m===void 0&&(m=new l),m.setToPolar(g,x)},overlapRect:function(g,x,m,y,T,E){return i(this.world,g,x,m,y,T,E)},overlapCirc:function(g,x,m,y,T){return h(this.world,g,x,m,y,T)},shutdown:function(){if(this.world){var g=this.systems.events;g.off(f.UPDATE,this.world.update,this.world),g.off(f.POST_UPDATE,this.world.postUpdate,this.world),g.off(f.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(f.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(92209),a=t(68287),r=new d({Extends:a,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,h,i,o){a.call(this,e,s,h,i,o),this.body=null}});p.exports=r},37742:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(78389),a=t(37747),r=t(63012),n=t(43396),e=t(87841),s=t(37303),h=t(95829),i=t(26099),o=new d({Mixins:[c],initialize:function(l,u){var v=64,g=64,x={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=u!==void 0;m&&u.displayWidth&&(v=u.displayWidth,g=u.displayHeight),m||(u=x),this.world=l,this.gameObject=m?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=l.defaults.debugShowBody,this.debugShowVelocity=l.defaults.debugShowVelocity,this.debugBodyColor=l.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=g,this.sourceWidth=v,this.sourceHeight=g,u.frame&&(this.sourceWidth=u.frame.realWidth,this.sourceHeight=u.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(g/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=l.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=a.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=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.syncBounds=!1,this.physicsType=a.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 f=this.gameObject,l=this.transform;if(f.parentContainer){var u=f.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);l.x=u.tx,l.y=u.ty,l.rotation=n(u.rotation),l.scaleX=u.scaleX,l.scaleY=u.scaleY,l.displayOriginX=f.displayOriginX,l.displayOriginY=f.displayOriginY}else l.x=f.x,l.y=f.y,l.rotation=f.angle,l.scaleX=f.scaleX,l.scaleY=f.scaleY,l.displayOriginX=f.displayOriginX,l.displayOriginY=f.displayOriginY;var v=!1;if(this.syncBounds){var g=f.getBounds(this._bounds);this.width=g.width,this.height=g.height,v=!0}else{var x=Math.abs(l.scaleX),m=Math.abs(l.scaleY);(this._sx!==x||this._sy!==m)&&(this.width=this.sourceWidth*x,this.height=this.sourceHeight*m,this._sx=x,this._sy=m,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 f=this.transform;this.position.x=f.x+f.scaleX*(this.offset.x-f.displayOriginX),this.position.y=f.y+f.scaleY*(this.offset.y-f.displayOriginY),this.updateCenter()},resetFlags:function(f){f===void 0&&(f=!1);var l=this.wasTouching,u=this.touching,v=this.blocked;f?h(!0,l):(l.none=u.none,l.up=u.up,l.down=u.down,l.left=u.left,l.right=u.right),h(!0,u),h(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(f,l){if(f&&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}f&&this.update(l)},update:function(f){var l=this.prev,u=this.position,v=this.velocity;if(l.set(u.x,u.y),!this.moves){this._dx=u.x-l.x,this._dy=u.y-l.y;return}if(this.directControl){var g=this.autoFrame;v.set((u.x-g.x)/f,(u.y-g.y)/f),this.world.updateMotion(this,f),this._dx=u.x-g.x,this._dy=u.y-g.y}else this.world.updateMotion(this,f),this.newVelocity.set(v.x*f,v.y*f),u.add(this.newVelocity),this._dx=u.x-l.x,this._dy=u.y-l.y;var x=v.x,m=v.y;if(this.updateCenter(),this.angle=Math.atan2(m,x),this.speed=Math.sqrt(x*x+m*m),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 f=this.position,l=f.x-this.prevFrame.x,u=f.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var g=this.deltaMax.x,x=this.deltaMax.y;g!==0&&l!==0&&(l<0&&l<-g?l=-g:l>0&&l>g&&(l=g)),x!==0&&u!==0&&(u<0&&u<-x?u=-x:u>0&&u>x&&(u=x)),v&&(v.x+=l,v.y+=u)}l<0?this.facing=a.FACING_LEFT:l>0&&(this.facing=a.FACING_RIGHT),u<0?this.facing=a.FACING_UP:u>0&&(this.facing=a.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=l,this._ty=u,this.autoFrame.set(f.x,f.y)},setBoundsRectangle:function(f){return this.customBoundsRectangle=f||this.world.bounds,this},checkWorldBounds:function(){var f=this.position,l=this.velocity,u=this.blocked,v=this.customBoundsRectangle,g=this.world.checkCollision,x=this.worldBounce?-this.worldBounce.x:-this.bounce.x,m=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return f.xv.right&&g.right&&(f.x=v.right-this.width,l.x*=x,u.right=!0,y=!0),f.yv.bottom&&g.down&&(f.y=v.bottom-this.height,l.y*=m,u.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(f,l){return l===void 0&&(l=f),this.offset.set(f,l),this},setGameObject:function(f,l){return l===void 0&&(l=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=f,f.body&&(f.body=this),this.setSize(),this.world.add(this),this.enable=l,this},setSize:function(f,l,u){u===void 0&&(u=!0);var v=this.gameObject;if(v&&(!f&&v.frame&&(f=v.frame.realWidth),!l&&v.frame&&(l=v.frame.realHeight)),this.sourceWidth=f,this.sourceHeight=l,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 g=(v.width-f)/2,x=(v.height-l)/2;this.offset.set(g,x)}return this.isCircle=!1,this.radius=0,this},setCircle:function(f,l,u){return l===void 0&&(l=this.offset.x),u===void 0&&(u=this.offset.y),f>0?(this.isCircle=!0,this.radius=f,this.sourceWidth=f*2,this.sourceHeight=f*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(l,u),this.updateCenter()):this.isCircle=!1,this},reset:function(f,l){this.stop();var u=this.gameObject;u&&(u.setPosition(f,l),this.rotation=u.angle,this.preRotation=u.angle);var v=this.position;u&&u.getTopLeft?u.getTopLeft(v):v.set(f,l),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(f){return f.x=this.x,f.y=this.y,f.right=this.right,f.bottom=this.bottom,f},hitTest:function(f,l){if(!this.isCircle)return s(this,f,l);if(this.radius>0&&f>=this.left&&f<=this.right&&l>=this.top&&l<=this.bottom){var u=(this.center.x-f)*(this.center.x-f),v=(this.center.y-l)*(this.center.y-l);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(f){var l=this.position,u=l.x+this.halfWidth,v=l.y+this.halfHeight;this.debugShowBody&&(f.lineStyle(f.defaultStrokeWidth,this.debugBodyColor),this.isCircle?f.strokeCircle(u,v,this.width/2):(this.checkCollision.up&&f.lineBetween(l.x,l.y,l.x+this.width,l.y),this.checkCollision.right&&f.lineBetween(l.x+this.width,l.y,l.x+this.width,l.y+this.height),this.checkCollision.down&&f.lineBetween(l.x,l.y+this.height,l.x+this.width,l.y+this.height),this.checkCollision.left&&f.lineBetween(l.x,l.y,l.x,l.y+this.height))),this.debugShowVelocity&&(f.lineStyle(f.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),f.lineBetween(u,v,u+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(f){return f===void 0&&(f=!0),this.directControl=f,this},setCollideWorldBounds:function(f,l,u,v){f===void 0&&(f=!0),this.collideWorldBounds=f;var g=l!==void 0,x=u!==void 0;return(g||x)&&(this.worldBounce||(this.worldBounce=new i),g&&(this.worldBounce.x=l),x&&(this.worldBounce.y=u)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(f,l){return this.velocity.set(f,l),f=this.velocity.x,l=this.velocity.y,this.speed=Math.sqrt(f*f+l*l),this},setVelocityX:function(f){return this.setVelocity(f,this.velocity.y)},setVelocityY:function(f){return this.setVelocity(this.velocity.x,f)},setMaxVelocity:function(f,l){return this.maxVelocity.set(f,l),this},setMaxVelocityX:function(f){return this.maxVelocity.x=f,this},setMaxVelocityY:function(f){return this.maxVelocity.y=f,this},setMaxSpeed:function(f){return this.maxSpeed=f,this},setSlideFactor:function(f,l){return this.slideFactor.set(f,l),this},setBounce:function(f,l){return this.bounce.set(f,l),this},setBounceX:function(f){return this.bounce.x=f,this},setBounceY:function(f){return this.bounce.y=f,this},setAcceleration:function(f,l){return this.acceleration.set(f,l),this},setAccelerationX:function(f){return this.acceleration.x=f,this},setAccelerationY:function(f){return this.acceleration.y=f,this},setAllowDrag:function(f){return f===void 0&&(f=!0),this.allowDrag=f,this},setAllowGravity:function(f){return f===void 0&&(f=!0),this.allowGravity=f,this},setAllowRotation:function(f){return f===void 0&&(f=!0),this.allowRotation=f,this},setDrag:function(f,l){return this.drag.set(f,l),this},setDamping:function(f){return this.useDamping=f,this},setDragX:function(f){return this.drag.x=f,this},setDragY:function(f){return this.drag.y=f,this},setGravity:function(f,l){return this.gravity.set(f,l),this},setGravityX:function(f){return this.gravity.x=f,this},setGravityY:function(f){return this.gravity.y=f,this},setFriction:function(f,l){return this.friction.set(f,l),this},setFrictionX:function(f){return this.friction.x=f,this},setFrictionY:function(f){return this.friction.y=f,this},setAngularVelocity:function(f){return this.angularVelocity=f,this},setAngularAcceleration:function(f){return this.angularAcceleration=f,this},setAngularDrag:function(f){return this.angularDrag=f,this},setMass:function(f){return this.mass=f,this},setImmovable:function(f){return f===void 0&&(f=!0),this.immovable=f,this},setEnable:function(f){return f===void 0&&(f=!0),this.enable=f,this},processX:function(f,l,u,v){this.x+=f,this.updateCenter(),l!==null&&(this.velocity.x=l*this.slideFactor.x);var g=this.blocked;u&&(g.left=!0,g.none=!1),v&&(g.right=!0,g.none=!1)},processY:function(f,l,u,v){this.y+=f,this.updateCenter(),l!==null&&(this.velocity.y=l*this.slideFactor.y);var g=this.blocked;u&&(g.up=!0,g.none=!1),v&&(g.down=!0,g.none=!1)},x:{get:function(){return this.position.x},set:function(f){this.position.x=f}},y:{get:function(){return this.position.y},set:function(f){this.position.y=f}},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-2024 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,h,i,o){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=s,this.collideCallback=h,this.processCallback=i,this.callbackContext=o},setName:function(a){return this.name=a,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71289),c=t(13759),a=t(37742),r=t(83419),n=t(37747),e=t(60758),s=t(72624),h=t(71464),i=new r({initialize:function(f){this.world=f,this.scene=f.scene,this.sys=f.scene.sys},collider:function(o,f,l,u,v){return this.world.addCollider(o,f,l,u,v)},overlap:function(o,f,l,u,v){return this.world.addOverlap(o,f,l,u,v)},existing:function(o,f){var l=f?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(o,l),o},staticImage:function(o,f,l,u){var v=new d(this.scene,o,f,l,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},image:function(o,f,l,u){var v=new d(this.scene,o,f,l,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticSprite:function(o,f,l,u){var v=new c(this.scene,o,f,l,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},sprite:function(o,f,l,u){var v=new c(this.scene,o,f,l,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticGroup:function(o,f){return this.sys.updateList.add(new h(this.world,this.world.scene,o,f))},group:function(o,f){return this.sys.updateList.add(new e(this.world,this.world.scene,o,f))},body:function(o,f,l,u){var v=new a(this.world);return v.position.set(o,f),l&&u&&v.setSize(l,u),this.world.add(v,n.DYNAMIC_BODY),v},staticBody:function(o,f,l,u){var v=new s(this.world);return v.position.set(o,f),l&&u&&v.setSize(l,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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37747),c=function(a,r,n,e){var s=0,h=a.deltaAbsX()+r.deltaAbsX()+e;return a._dx===0&&r._dx===0?(a.embedded=!0,r.embedded=!0):a._dx>r._dx?(s=a.right-r.x,s>h&&!n||a.checkCollision.right===!1||r.checkCollision.left===!1?s=0:(a.touching.none=!1,a.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===d.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.right=!0),a.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):a._dxh&&!n||a.checkCollision.left===!1||r.checkCollision.right===!1?s=0:(a.touching.none=!1,a.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===d.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.left=!0),a.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),a.overlapX=s,r.overlapX=s,s};p.exports=c},45170:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37747),c=function(a,r,n,e){var s=0,h=a.deltaAbsY()+r.deltaAbsY()+e;return a._dy===0&&r._dy===0?(a.embedded=!0,r.embedded=!0):a._dy>r._dy?(s=a.bottom-r.y,s>h&&!n||a.checkCollision.down===!1||r.checkCollision.up===!1?s=0:(a.touching.none=!1,a.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===d.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.down=!0),a.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):a._dyh&&!n||a.checkCollision.up===!1||r.checkCollision.down===!1?s=0:(a.touching.none=!1,a.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===d.STATIC_BODY&&!n&&(a.blocked.none=!1,a.blocked.up=!0),a.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),a.overlapY=s,r.overlapY=s,s};p.exports=c},60758:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13759),c=t(83419),a=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),h=new c({Extends:e,Mixins:[a],initialize:function(o,f,l,u){if(!l&&!u)u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(l))u=l,l=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(l)&&s(l[0])){var v=this;l.forEach(function(g){g.internalCreateCallback=v.createCallbackHandler,g.internalRemoveCallback=v.removeCallbackHandler,g.classType=n(g,"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=1,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,f,l,u),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.DYNAMIC_BODY);var o=i.body;for(var f in this.defaults)o[f](this.defaults[f])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,o,f){f===void 0&&(f=0);for(var l=this.getChildren(),u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S,t,d,c,a,r,n,e,s,h,i,o,f,l,u,v,g,x=function(A,P,M){S=A,t=P;var F=S.velocity.x,L=t.velocity.x;return d=S.pushable,s=S._dx<0,h=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,f=t._dx>0,l=t._dx===0,v=!u,e=F-L*t.bounce.x,g=Math.abs(M),m()},m=function(){return h&&u&&t.blocked.right?(S.processX(-g,n,!1,!0),1):s&&v&&t.blocked.left?(S.processX(g,n,!0),1):f&&v&&S.blocked.right?(t.processX(-g,e,!1,!0),2):o&&u&&S.blocked.left?(t.processX(g,e,!0),2):0},y=function(){var A=S.velocity.x,P=t.velocity.x,M=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),F=Math.sqrt(A*A*S.mass/t.mass)*(A>0?1:-1),L=(M+F)*.5;return M-=L,F-=L,a=L+M*S.bounce.x,r=L+F*t.bounce.x,s&&v?T(0):o&&u?T(1):h&&u?T(2):f&&v?T(3):!1},T=function(A){if(d&&c)g*=.5,A===0||A===3?(S.processX(g,a),t.processX(-g,r)):(S.processX(-g,a),t.processX(g,r));else if(d&&!c)A===0||A===3?S.processX(g,n,!0):S.processX(-g,n,!1,!0);else if(!d&&c)A===0||A===3?t.processX(-g,e,!1,!0):t.processX(g,e,!0);else{var P=g*.5;A===0?l?(S.processX(g,0,!0),t.processX(0,null,!1,!0)):f?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.x,!0),t.processX(-P,null,!1,!0)):A===1?i?(S.processX(0,null,!1,!0),t.processX(g,0,!0)):h?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,null,!1,!0),t.processX(P,S.velocity.x,!0)):A===2?l?(S.processX(-g,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)):A===3&&(i?(S.processX(0,null,!0),t.processX(-g,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},E=function(A){A===1?t.velocity.x=0:u?t.processX(g,e,!0):t.processX(-g,e,!1,!0),S.moves&&(t.y+=(S.y-S.prev.y)*S.friction.y,t._dy=t.y-t.prev.y)},C=function(A){A===2?S.velocity.x=0:v?S.processX(g,n,!0):S.processX(-g,n,!1,!0),t.moves&&(S.y+=(t.y-t.prev.y)*t.friction.y,S._dy=S.y-S.prev.y)};p.exports={BlockCheck:m,Check:y,Set:x,Run:T,RunImmovableBody1:E,RunImmovableBody2:C}},47962:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S,t,d,c,a,r,n,e,s,h,i,o,f,l,u,v,g,x=function(A,P,M){S=A,t=P;var F=S.velocity.y,L=t.velocity.y;return d=S.pushable,s=S._dy<0,h=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,f=t._dy>0,l=t._dy===0,v=!u,e=F-L*t.bounce.y,g=Math.abs(M),m()},m=function(){return h&&u&&t.blocked.down?(S.processY(-g,n,!1,!0),1):s&&v&&t.blocked.up?(S.processY(g,n,!0),1):f&&v&&S.blocked.down?(t.processY(-g,e,!1,!0),2):o&&u&&S.blocked.up?(t.processY(g,e,!0),2):0},y=function(){var A=S.velocity.y,P=t.velocity.y,M=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),F=Math.sqrt(A*A*S.mass/t.mass)*(A>0?1:-1),L=(M+F)*.5;return M-=L,F-=L,a=L+M*S.bounce.y,r=L+F*t.bounce.y,s&&v?T(0):o&&u?T(1):h&&u?T(2):f&&v?T(3):!1},T=function(A){if(d&&c)g*=.5,A===0||A===3?(S.processY(g,a),t.processY(-g,r)):(S.processY(-g,a),t.processY(g,r));else if(d&&!c)A===0||A===3?S.processY(g,n,!0):S.processY(-g,n,!1,!0);else if(!d&&c)A===0||A===3?t.processY(-g,e,!1,!0):t.processY(g,e,!0);else{var P=g*.5;A===0?l?(S.processY(g,0,!0),t.processY(0,null,!1,!0)):f?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)):A===1?i?(S.processY(0,null,!1,!0),t.processY(g,0,!0)):h?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,null,!1,!0),t.processY(P,S.velocity.y,!0)):A===2?l?(S.processY(-g,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)):A===3&&(i?(S.processY(0,null,!0),t.processY(-g,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},E=function(A){A===1?t.velocity.y=0:u?t.processY(g,e,!0):t.processY(-g,e,!1,!0),S.moves&&(t.x+=(S.x-S.prev.x)*S.friction.x,t._dx=t.x-t.prev.x)},C=function(A){A===2?S.velocity.y=0:v?S.processY(g,n,!0):S.processY(-g,n,!1,!0),t.moves&&(S.x+=(t.x-t.prev.x)*t.friction.x,S._dx=S.x-S.prev.x)};p.exports={BlockCheck:m,Check:y,Set:x,Run:T,RunImmovableBody1:E,RunImmovableBody2:C}},14087:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(64897),c=t(3017),a=function(r,n,e,s,h){h===void 0&&(h=d(r,n,e,s));var i=r.immovable,o=n.immovable;if(e||h===0||i&&o||r.customSeparateX||n.customSeparateX)return h!==0||r.embedded&&n.embedded;var f=c.Set(r,n,h);return!i&&!o?f>0?!0:c.Check():(i?c.RunImmovableBody1(f):o&&c.RunImmovableBody2(f),!0)};p.exports=a},89936:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45170),c=t(47962),a=function(r,n,e,s,h){h===void 0&&(h=d(r,n,e,s));var i=r.immovable,o=n.immovable;if(e||h===0||i&&o||r.customSeparateY||n.customSeparateY)return h!==0||r.embedded&&n.embedded;var f=c.Set(r,n,h);return!i&&!o?f>0?!0:c.Check():(i?c.RunImmovableBody1(f):o&&c.RunImmovableBody2(f),!0)};p.exports=a},95829:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87902),c=t(83419),a=t(78389),r=t(37747),n=t(37303),e=t(95829),s=t(26099),h=new c({Mixins:[a],initialize:function(o,f){var l=64,u=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(l=f.displayWidth,u=f.displayHeight),g||(f=v),this.world=o,this.gameObject=g?f: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(f.x-l*f.originX,f.y-u*f.originY),this.width=l,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){return i&&i!==this.gameObject&&(this.gameObject.body=null,i.body=this,this.gameObject=i),o&&this.updateFromGameObject(),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,f){f===void 0&&(f=!0);var l=this.gameObject;if(l&&l.frame&&(i||(i=l.frame.realWidth),o||(o=l.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),f&&l&&l.getCenter){var u=l.displayWidth/2,v=l.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,f){return o===void 0&&(o=this.offset.x),f===void 0&&(f=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,f),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 f=this.gameObject;i===void 0&&(i=f.x),o===void 0&&(o=f.y),this.world.staticTree.remove(this),f.setPosition(i,o),f.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,f=o.x+this.halfWidth,l=o.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(f,l,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=h},71464:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13759),c=t(83419),a=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),h=new c({Extends:e,Mixins:[a],initialize:function(o,f,l,u){!l&&!u?u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:s(l)?(u=l,l=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler,u.createMultipleCallback=this.createMultipleCallbackHandler,u.classType=n(u,"classType",d)):Array.isArray(l)&&s(l[0])?(u=l,l=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,f,l,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(55495),c=t(37742),a=t(45319),r=t(83419),n=t(79342),e=t(37747),s=t(20339),h=t(52816),i=t(50792),o=t(63012),f=t(43855),l=t(5470),u=t(94977),v=t(64897),g=t(45170),x=t(96523),m=t(35154),y=t(36383),T=t(25774),E=t(96602),C=t(87841),A=t(59542),P=t(40012),M=t(14087),F=t(89936),L=t(35072),D=t(72624),I=t(2483),U=t(61340),z=t(26099),w=t(15994),G=new r({Extends:i,initialize:function(O,B){i.call(this),this.scene=O,this.bodies=new L,this.staticBodies=new L,this.pendingDestroy=new L,this.colliders=new T,this.gravity=new z(m(B,"gravity.x",0),m(B,"gravity.y",0)),this.bounds=new C(m(B,"x",0),m(B,"y",0),m(B,"width",O.sys.scale.width),m(B,"height",O.sys.scale.height)),this.checkCollision={up:m(B,"checkCollision.up",!0),down:m(B,"checkCollision.down",!0),left:m(B,"checkCollision.left",!0),right:m(B,"checkCollision.right",!0)},this.fps=m(B,"fps",60),this.fixedStep=m(B,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=m(B,"timeScale",1),this.OVERLAP_BIAS=m(B,"overlapBias",4),this.TILE_BIAS=m(B,"tileBias",16),this.forceX=m(B,"forceX",!1),this.isPaused=m(B,"isPaused",!1),this._total=0,this.drawDebug=m(B,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:m(B,"debugShowBody",!0),debugShowStaticBody:m(B,"debugShowStaticBody",!0),debugShowVelocity:m(B,"debugShowVelocity",!0),bodyDebugColor:m(B,"debugBodyColor",16711935),staticBodyDebugColor:m(B,"debugStaticBodyColor",255),velocityDebugColor:m(B,"debugVelocityColor",65280)},this.maxEntries=m(B,"maxEntries",16),this.useTree=m(B,"useTree",!0),this.tree=new A(this.maxEntries),this.staticTree=new A(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(R,O){O===void 0&&(O=e.DYNAMIC_BODY),Array.isArray(R)||(R=[R]);for(var B=0;B=X;for(this.fixedStep||(N=O*.001,W=!0,this._elapsed=0),B=0;B=X;)this._elapsed-=X,this.step(N)}},step:function(R){var O,B,N=this.bodies.entries,X=N.length;for(O=0;O0){var H=this.tree,b=this.staticTree;for(B=W.entries,N=B.length,R=0;R-1&&R.velocity.length()>J&&(R.velocity.normalize().scale(J),K=J),R.speed=K},separate:function(R,O,B,N,X){var V,Y,W=!1,H=!0;if(!R.enable||!O.enable||R.checkCollision.none||O.checkCollision.none||!this.intersects(R,O)||B&&B.call(N,R.gameObject,O.gameObject)===!1)return W;if(R.isCircle||O.isCircle){var b=this.separateCircle(R,O,X);b.result?(W=!0,H=!1):(V=b.x,Y=b.y,H=!0)}if(H){var K=!1,J=!1,Z=this.OVERLAP_BIAS;X?(K=M(R,O,X,Z,V),J=F(R,O,X,Z,Y)):this.forceX||Math.abs(this.gravity.y+R.gravity.y)k&&(J=s($,q,k,Q)-tt):q>j&&($<_?J=s($,q,_,j)-tt:$>k&&(J=s($,q,k,j)-tt)),J*=-1}else J=R.halfWidth+O.halfWidth-h(V,Y);R.overlapR=J,O.overlapR=J;var et=d(V,Y),it=(J+y.EPSILON)*Math.cos(et),ht=(J+y.EPSILON)*Math.sin(et),ot={overlap:J,result:!1,x:it,y:ht};if(B&&(!Z||Z&&J!==0))return ot.result=!0,ot;if(!Z&&J===0||W&&H||R.customSeparateX||O.customSeparateX)return ot.x=void 0,ot.y=void 0,ot;var nt=!R.pushable&&!O.pushable;if(Z){var st=V.x-Y.x,ut=V.y-Y.y,rt=Math.sqrt(Math.pow(st,2)+Math.pow(ut,2)),ft=(Y.x-V.x)/rt||0,vt=(Y.y-V.y)/rt||0,mt=2*(b.x*ft+b.y*vt-K.x*ft-K.y*vt)/(R.mass+O.mass);(W||H)&&(mt*=2),W||(b.x=b.x-mt/R.mass*ft,b.y=b.y-mt/R.mass*vt,b.multiply(R.bounce)),H||(K.x=K.x+mt/O.mass*ft,K.y=K.y+mt/O.mass*vt,K.multiply(O.bounce)),!W&&!H&&(it*=.5,ht*=.5),W||(R.x-=it,R.y-=ht,R.updateCenter()),H||(O.x+=it,O.y+=ht,O.updateCenter()),ot.result=!0}else!W||R.pushable||nt?(R.x-=it,R.y-=ht,R.updateCenter()):(!H||O.pushable||nt)&&(O.x+=it,O.y+=ht,O.updateCenter()),ot.x=void 0,ot.y=void 0;return ot},intersects:function(R,O){return R===O?!1:!R.isCircle&&!O.isCircle?!(R.right<=O.left||R.bottom<=O.top||R.left>=O.right||R.top>=O.bottom):R.isCircle?O.isCircle?h(R.center,O.center)<=R.halfWidth+O.halfWidth:this.circleBodyIntersects(R,O):this.circleBodyIntersects(O,R)},circleBodyIntersects:function(R,O){var B=a(R.center.x,O.left,O.right),N=a(R.center.y,O.top,O.bottom),X=(R.center.x-B)*(R.center.x-B),V=(R.center.y-N)*(R.center.y-N);return X+V<=R.halfWidth*R.halfWidth},overlap:function(R,O,B,N,X){return B===void 0&&(B=null),N===void 0&&(N=null),X===void 0&&(X=B),this.collideObjects(R,O,B,N,X,!0)},collide:function(R,O,B,N,X){return B===void 0&&(B=null),N===void 0&&(N=null),X===void 0&&(X=B),this.collideObjects(R,O,B,N,X,!1)},collideObjects:function(R,O,B,N,X,V){var Y,W;R.isParent&&(R.physicsType===void 0||O===void 0||R===O)&&(R=R.children.entries),O&&O.isParent&&O.physicsType===void 0&&(O=O.children.entries);var H=Array.isArray(R),b=Array.isArray(O);if(this._total=0,!H&&!b)this.collideHandler(R,O,B,N,X,V);else if(!H&&b)for(Y=0;Y0},collideHandler:function(R,O,B,N,X,V){if(O===void 0&&R.isParent)return this.collideGroupVsGroup(R,R,B,N,X,V);if(!R||!O)return!1;if(R.body||R.isBody){if(O.body||O.isBody)return this.collideSpriteVsSprite(R,O,B,N,X,V);if(O.isParent)return this.collideSpriteVsGroup(R,O,B,N,X,V);if(O.isTilemap)return this.collideSpriteVsTilemapLayer(R,O,B,N,X,V)}else if(R.isParent){if(O.body||O.isBody)return this.collideSpriteVsGroup(O,R,B,N,X,V);if(O.isParent)return this.collideGroupVsGroup(R,O,B,N,X,V);if(O.isTilemap)return this.collideGroupVsTilemapLayer(R,O,B,N,X,V)}else if(R.isTilemap){if(O.body||O.isBody)return this.collideSpriteVsTilemapLayer(O,R,B,N,X,V);if(O.isParent)return this.collideGroupVsTilemapLayer(O,R,B,N,X,V)}},canCollide:function(R,O){return R&&O&&(R.collisionMask&O.collisionCategory)!==0&&(O.collisionMask&R.collisionCategory)!==0},collideSpriteVsSprite:function(R,O,B,N,X,V){var Y=R.isBody?R:R.body,W=O.isBody?O:O.body;return this.canCollide(Y,W)?(this.separate(Y,W,N,X,V)&&(B&&B.call(X,R,O),this._total++),!0):!1},collideSpriteVsGroup:function(R,O,B,N,X,V){var Y=R.isBody?R:R.body;if(!(O.length===0||!Y||!Y.enable||Y.checkCollision.none||!this.canCollide(Y,O))){var W,H,b;if(this.useTree||O.physicsType===e.STATIC_BODY){var K=this.treeMinMax;K.minX=Y.left,K.minY=Y.top,K.maxX=Y.right,K.maxY=Y.bottom;var J=O.physicsType===e.DYNAMIC_BODY?this.tree.search(K):this.staticTree.search(K);for(H=J.length,W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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,a){return this.body.setCollideWorldBounds(t,d,c,a),this}};p.exports=S},78389:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79599),c={setCollisionCategory:function(a){var r=this.body?this.body:this;return r.collisionCategory=a,this},willCollideWith:function(a){var r=this.body?this.body:this;return(r.collisionMask&a)!==0},addCollidesWith:function(a){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|a,this},removeCollidesWith:function(a){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~a,this},setCollidesWith:function(a){var r=this.body?this.body:this;return r.collisionMask=d(a),this},resetCollisionCategory:function(){var a=this.body?this.body:this;return a.collisionCategory=1,a.collisionMask=1,this}};p.exports=c},87118:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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,a,r){return t&&this.body.reset(d,c),a&&(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-2024 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-2024 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-2024 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-2024 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),a=t(2044),r=t(81491),n=function(e,s,h,i,o,f){var l=d(e,s-i,h-i,2*i,2*i,o,f);if(l.length===0)return l;for(var u=new c(s,h,i),v=new c,g=[],x=0;x{var S=function(t,d,c,a,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var s=[],h=[],i=t.treeMinMax;if(i.minX=d,i.minY=c,i.maxX=d+a,i.maxY=c+r,e&&(h=t.staticTree.search(i)),n&&t.useTree)s=t.tree.search(i);else if(n){var o=t.bodies,f={position:{x:d,y:c},left:d,top:c,right:d+a,bottom:c+r,isCircle:!1},l=t.intersects;o.iterate(function(u){l(u,f)&&s.push(u)})}return h.concat(s)};p.exports=S},62121:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collide"},36768:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="overlap"},60473:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},89954:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},61804:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="tilecollide"},7161:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="tileoverlap"},34689:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="worldbounds"},16006:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="worldstep"},63012:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37747),c=t(79291),a={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)};a=c(!1,a,d),p.exports=a},96602:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(21329),c=t(53442),a=t(2483),r=function(n,e,s,h,i,o,f){var l=h.left,u=h.top,v=h.right,g=h.bottom,x=s.faceLeft||s.faceRight,m=s.faceTop||s.faceBottom;if(f||(x=!0,m=!0),!x&&!m)return!1;var y=0,T=0,E=0,C=1;if(e.deltaAbsX()>e.deltaAbsY()?E=-1:e.deltaAbsX(){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36294),c=function(a,r,n,e,s,h){var i=0,o=r.faceLeft,f=r.faceRight,l=r.collideLeft,u=r.collideRight;return h||(o=!0,f=!0,l=!0,u=!0),a.deltaX()<0&&u&&a.checkCollision.left?f&&a.x0&&l&&a.checkCollision.right&&o&&a.right>n&&(i=a.right-n,i>s&&(i=0)),i!==0&&(a.customSeparateX?a.overlapX=i:d(a,i)),i};p.exports=c},53442:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(67013),c=function(a,r,n,e,s,h){var i=0,o=r.faceTop,f=r.faceBottom,l=r.collideUp,u=r.collideDown;return h||(o=!0,f=!0,l=!0,u=!0),a.deltaY()<0&&u&&a.checkCollision.up?f&&a.y0&&l&&a.checkCollision.down&&o&&a.bottom>n&&(i=a.bottom-n,i>s&&(i=0)),i!==0&&(a.customSeparateY?a.overlapY=i:d(a,i)),i};p.exports=c},2483:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(26099),a=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,h=r.bounds.max.y-r.bounds.min.y,i=s*r.centerOfMass.x,o=h*r.centerOfMass.y;return n.set(s/2,h/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,h=this.centerDiff;return new c(n+s.x+h.x,e+s.y+h.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,h=this.centerDiff;return new c(n+h.x,e+s.y+h.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,h=this.centerDiff;return new c(n-(s.x-h.x),e+s.y+h.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,h=this.centerDiff;return new c(n+s.x+h.x,e+h.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,h=this.centerDiff;return new c(n-(s.x-h.x),e+h.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,h=this.centerDiff;return new c(n+s.x+h.x,e-(s.y-h.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,h=this.centerDiff;return new c(n+h.x,e-(s.y-h.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,h=this.centerDiff;return new c(n-(s.x-h.x),e-(s.y-h.y))}return!1}});p.exports=a},19933:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66280),c=t(83419),a=t(74116),r=t(48140),n=t(74058),e=t(75803),s=t(23181),h=t(34803),i=t(73834),o=t(19496),f=t(85791),l=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(g,x,m,y,T){var E=d.rectangle(g,x,m,y,T);return this.world.add(E),E},trapezoid:function(g,x,m,y,T,E){var C=d.trapezoid(g,x,m,y,T,E);return this.world.add(C),C},circle:function(g,x,m,y,T){var E=d.circle(g,x,m,y,T);return this.world.add(E),E},polygon:function(g,x,m,y,T){var E=d.polygon(g,x,m,y,T);return this.world.add(E),E},fromVertices:function(g,x,m,y,T,E,C){typeof m=="string"&&(m=u.fromPath(m));var A=d.fromVertices(g,x,m,y,T,E,C);return this.world.add(A),A},fromPhysicsEditor:function(g,x,m,y,T){T===void 0&&(T=!0);var E=o.parseBody(g,x,m,y);return T&&!this.world.has(E)&&this.world.add(E),E},fromSVG:function(g,x,m,y,T,E){y===void 0&&(y=1),T===void 0&&(T={}),E===void 0&&(E=!0);for(var C=m.getElementsByTagName("path"),A=[],P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(31884),c=t(95540),a=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,s,h,i){h===void 0&&(h={}),i===void 0&&(i=!0);var o=s.x,f=s.y;s.body={temp:!0,position:{x:o,y:f}};var l=[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(l.forEach(function(v){for(var g in v)r(v[g])?Object.defineProperty(s,g,{get:v[g].get,set:v[g].set}):Object.defineProperty(s,g,{value:v[g]})}),s.world=e,s._tempVec2=new a(o,f),h.hasOwnProperty("type")&&h.type==="body")s.setExistingBody(h,i);else{var u=c(h,"shape",null);u||(u="rectangle"),h.addToWorld=i,s.setBody(u,h)}return s};p.exports=n},23181:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31884),a=t(95643),r=t(95540),n=t(88571),e=t(72699),s=t(26099),h=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,f,l,u,v,g){a.call(this,o.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(u,v),this.setSizeToFrame(),this.setOrigin(),this.world=o,this._tempVec2=new s(f,l);var x=r(g,"shape",null);x?this.setBody(x,g):this.setRectangle(this.width,this.height,g),this.setPosition(f,l),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=h},42045:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60461),c=t(66615),a=t(66280),r=t(22562),n=t(68174),e=t(15647),s=t(83419),h=t(52284),i=t(53402),o=t(69351),f=t(74116),l=t(48140),u=t(81388),v=t(20339),g=t(28137),x=t(95540),m=t(35154),y=t(18210),T=t(40178),E=t(6790),C=t(74507),A=t(46975),P=t(4506),M=t(99561),F=t(73832),L=t(37277),D=t(73296),I=t(66272),U=t(44594),z=t(74058),w=t(31725),G=t(41598),R=t(68243);i.setDecomp(t(55973));var O=new s({initialize:function(N){this.scene=N,this.systems=N.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=o,this.collision=h,this.detector=u,this.pair=P,this.pairs=M,this.query=D,this.resolver=I,this.constraint=l,this.bodies=a,this.composites=f,this.axes=c,this.bounds=e,this.svg=z,this.vector=w,this.vertices=G,this.verts=G,this._tempVec2=w.create(),m(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),m(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),m(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),I._restingThresh=m(this.config,"restingThresh",4),I._restingThreshTangent=m(this.config,"restingThreshTangent",6),I._positionDampen=m(this.config,"positionDampen",.9),I._positionWarming=m(this.config,"positionWarming",.8),I._frictionNormalMultiplier=m(this.config,"frictionNormalMultiplier",5),N.sys.events.once(U.BOOT,this.boot,this),N.sys.events.on(U.START,this.start,this)},boot:function(){this.world=new R(this.scene,this.config),this.add=new g(this.world),this.bodyBounds=new n,this.systems.events.once(U.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new R(this.scene,this.config),this.add=new g(this.world));var B=this.systems.events;B.on(U.UPDATE,this.world.update,this.world),B.on(U.POST_UPDATE,this.world.postUpdate,this.world),B.once(U.SHUTDOWN,this.shutdown,this)},getConfig:function(){var B=this.systems.game.config.physics,N=this.systems.settings.physics,X=A(x(N,"matter",{}),x(B,"matter",{}));return X},enableAttractorPlugin:function(){return F.register(y),F.use(E,y),this},enableWrapPlugin:function(){return F.register(C),F.use(E,C),this},enableCollisionEventsPlugin:function(){return F.register(T),F.use(E,T),this},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(B,N){this.world.step(B,N)},containsPoint:function(B,N,X){B=this.getMatterBodies(B);var V=w.create(N,X),Y=D.point(B,V);return Y.length>0},intersectPoint:function(B,N,X){X=this.getMatterBodies(X);var V=w.create(B,N),Y=[],W=D.point(X,V);return W.forEach(function(H){Y.indexOf(H)===-1&&Y.push(H)}),Y},intersectRect:function(B,N,X,V,Y,W){Y===void 0&&(Y=!1),W=this.getMatterBodies(W);var H={min:{x:B,y:N},max:{x:B+X,y:N+V}},b=[],K=D.region(W,H,Y);return K.forEach(function(J){b.indexOf(J)===-1&&b.push(J)}),b},intersectRay:function(B,N,X,V,Y,W){Y===void 0&&(Y=1),W=this.getMatterBodies(W);for(var H=[],b=D.ray(W,w.create(B,N),w.create(X,V),Y),K=0;K{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(9674),c=t(83419),a=t(31884),r=t(95643),n=t(95540),e=t(72699),s=t(68287),h=t(26099),i=new c({Extends:s,Mixins:[a.Bounce,a.Collision,a.Force,a.Friction,a.Gravity,a.Mass,a.Sensor,a.SetBody,a.Sleep,a.Static,a.Transform,a.Velocity,e],initialize:function(f,l,u,v,g,x){r.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(v,g),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new h(l,u);var m=n(x,"shape",null);m?this.setBody(m,x):this.setRectangle(this.width,this.height,x),this.setPosition(l,u),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=i},73834:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66280),c=t(22562),a=t(83419),r=t(31884),n=t(62644),e=t(50792),s=t(95540),h=t(97022),i=t(41598),o=new a({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(l,u,v){e.call(this),this.tile=u,this.world=l,u.physics.matterBody&&u.physics.matterBody.destroy(),u.physics.matterBody=this;var g=s(v,"body",null),x=s(v,"addToWorld",!0);if(g)this.setBody(g,x);else{var m=u.getCollisionGroup(),y=s(m,"objects",[]);y.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(u.flipX||u.flipY){var T={x:u.getCenterX(),y:u.getCenterY()},E=u.flipX?-1:1,C=u.flipY?-1:1;c.scale(g,E,C,T)}},setFromTileRectangle:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);var l=this.tile.getBounds(),u=l.x+l.width/2,v=l.y+l.height/2,g=d.rectangle(u,v,l.width,l.height,f);return this.setBody(g,f.addToWorld),this},setFromTileCollision:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);for(var l=this.tile.tilemapLayer.scaleX,u=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),g=this.tile.getTop(),x=this.tile.getCollisionGroup(),m=s(x,"objects",[]),y=[],T=0;T1){var z=n(f);z.parts=y,this.setBody(c.create(z),z.addToWorld)}return this},setBody:function(f,l){return l===void 0&&(l=!0),this.body&&this.removeBody(),this.body=f,this.body.gameObject=this,l&&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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66280),c=t(22562),a=t(53402),r=t(95540),n=t(41598),e={parseBody:function(s,h,i,o){o===void 0&&(o={});for(var f=r(i,"fixtures",[]),l=[],u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66280),c=t(22562),a={parseBody:function(r,n,e,s){s===void 0&&(s={});var h,i=e.vertices;if(i.length===1)s.vertices=i[0],h=c.create(s),d.flagCoincidentParts(h.parts);else{for(var o=[],f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15647),c=t(83419),a=t(69351),r=t(48140),n=t(81388),e=t(1121),s=t(8214),h=t(46975),i=t(53614),o=t(26099),f=t(41598),l=new c({initialize:function(v,g,x){x===void 0&&(x={});var m={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=g,this.camera=null,this.pointer=null,this.active=!0,this.position=new o,this.body=null,this.part=null,this.constraint=r.create(h(x,m)),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,g=this.constraint;this.camera.getWorldPoint(u.x,u.y,v);for(var x=a.allBodies(this.world.localWorld),m=0;m1?1:0,y=m;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66280),c=t(22562),a=t(83419),r=t(53402),n=t(69351),e=t(48413),s=t(50792),h=t(1121),i=t(95540),o=t(35154),f=t(22562),l=t(35810),u=t(73834),v=t(4372),g=t(31725),x=new a({Extends:s,initialize:function(y,T){s.call(this),this.scene=y,this.engine=e.create(T),this.localWorld=this.engine.world;var E=o(T,"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(T,"enabled",!0),this.getDelta=o(T,"getDelta",this.update60Hz);var C=i(T,"runner",{}),A=i(C,"fps",!1),P=i(C,"fps",60),M=i(C,"delta",1e3/P),F=i(C,"deltaMin",1e3/P),L=i(C,"deltaMax",1e3/(P*.5));A||(P=1e3/M),this.runner={fps:P,deltaSampleSize:i(C,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:i(C,"isFixed",!1),delta:M,deltaMin:F,deltaMax:L},this.autoUpdate=o(T,"autoUpdate",!0);var D=o(T,"debug",!1);if(this.drawDebug=typeof D=="object"?!0:D,this.debugGraphic,this.debugConfig={showAxes:i(D,"showAxes",!1),showAngleIndicator:i(D,"showAngleIndicator",!1),angleColor:i(D,"angleColor",15208787),showBroadphase:i(D,"showBroadphase",!1),broadphaseColor:i(D,"broadphaseColor",16757760),showBounds:i(D,"showBounds",!1),boundsColor:i(D,"boundsColor",16777215),showVelocity:i(D,"showVelocity",!1),velocityColor:i(D,"velocityColor",44783),showCollisions:i(D,"showCollisions",!1),collisionColor:i(D,"collisionColor",16094476),showSeparations:i(D,"showSeparations",!1),separationColor:i(D,"separationColor",16753920),showBody:i(D,"showBody",!0),showStaticBody:i(D,"showStaticBody",!0),showInternalEdges:i(D,"showInternalEdges",!1),renderFill:i(D,"renderFill",!1),renderLine:i(D,"renderLine",!0),fillColor:i(D,"fillColor",1075465),fillOpacity:i(D,"fillOpacity",1),lineColor:i(D,"lineColor",2678297),lineOpacity:i(D,"lineOpacity",1),lineThickness:i(D,"lineThickness",1),staticFillColor:i(D,"staticFillColor",857979),staticLineColor:i(D,"staticLineColor",1255396),showSleeping:i(D,"showSleeping",!1),staticBodySleepOpacity:i(D,"staticBodySleepOpacity",.7),sleepFillColor:i(D,"sleepFillColor",4605510),sleepLineColor:i(D,"sleepLineColor",10066585),showSensors:i(D,"showSensors",!0),sensorFillColor:i(D,"sensorFillColor",857979),sensorLineColor:i(D,"sensorLineColor",1255396),showPositions:i(D,"showPositions",!0),positionSize:i(D,"positionSize",4),positionColor:i(D,"positionColor",14697178),showJoint:i(D,"showJoint",!0),jointColor:i(D,"jointColor",14737474),jointLineOpacity:i(D,"jointLineOpacity",1),jointLineThickness:i(D,"jointLineThickness",2),pinSize:i(D,"pinSize",4),pinColor:i(D,"pinColor",4382944),springColor:i(D,"springColor",14697184),anchorColor:i(D,"anchorColor",15724527),anchorSize:i(D,"anchorSize",4),showConvexHulls:i(D,"showConvexHulls",!1),hullColor:i(D,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(T,"setBounds",!1)){var I=T.setBounds;if(typeof I=="boolean")this.setBounds();else{var U=i(I,"x",0),z=i(I,"y",0),w=i(I,"width",y.sys.scale.width),G=i(I,"height",y.sys.scale.height),R=i(I,"thickness",64),O=i(I,"left",!0),B=i(I,"right",!0),N=i(I,"top",!0),X=i(I,"bottom",!0);this.setBounds(U,z,w,G,R,O,B,N,X)}}},setCompositeRenderStyle:function(m){var y=m.bodies,T=m.constraints,E=m.composites,C,A,P;for(C=0;C0&&(A=C[0].bodyA,P=C[0].bodyB),m.emit(h.COLLISION_START,E,A,P)}),l.on(y,"collisionActive",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),m.emit(h.COLLISION_ACTIVE,E,A,P)}),l.on(y,"collisionEnd",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),m.emit(h.COLLISION_END,E,A,P)})},setBounds:function(m,y,T,E,C,A,P,M,F){return m===void 0&&(m=0),y===void 0&&(y=0),T===void 0&&(T=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),C===void 0&&(C=64),A===void 0&&(A=!0),P===void 0&&(P=!0),M===void 0&&(M=!0),F===void 0&&(F=!0),this.updateWall(A,"left",m-C,y-C,C,E+C*2),this.updateWall(P,"right",m+T,y-C,C,E+C*2),this.updateWall(M,"top",m,y-C,T,C),this.updateWall(F,"bottom",m,y+E,T,C),this},updateWall:function(m,y,T,E,C,A){var P=this.walls[y];m?(P&&v.remove(this.localWorld,P),T+=C/2,E+=A/2,this.walls[y]=this.create(T,E,C,A,{isStatic:!0,friction:0,frictionStatic:0})):(P&&v.remove(this.localWorld,P),this.walls[y]=null)},createDebugGraphic:function(){var m=this.scene.sys.add.graphics({x:0,y:0});return m.setDepth(Number.MAX_VALUE),this.debugGraphic=m,this.drawDebug=!0,m},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(m,y,T){return m===void 0&&(m=0),y===void 0&&(y=1),T===void 0&&(T=.001),this.localWorld.gravity.x=m,this.localWorld.gravity.y=y,this.localWorld.gravity.scale=T,this},create:function(m,y,T,E,C){var A=d.rectangle(m,y,T,E,C);return v.add(this.localWorld,A),A},add:function(m){return v.add(this.localWorld,m),this},remove:function(m,y){Array.isArray(m)||(m=[m]);for(var T=0;TE.deltaMax?E.deltaMax:y,E.delta=y),E.timeScalePrev=C.timeScale,E.frameCounter+=1,m-E.counterTimestamp>=1e3&&(E.fps=E.frameCounter*((m-E.counterTimestamp)/1e3),E.counterTimestamp=m,E.frameCounter=0),e.update(T,y)}},step:function(m){e.update(this.engine,m)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(m){var y=m.hasOwnProperty("body")?m.body:m;return n.get(this.localWorld,y.id,y.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 m=this.debugConfig,y=this.engine,T=this.debugGraphic,E=n.allBodies(this.localWorld);this.debugGraphic.clear(),m.showBroadphase&&y.broadphase.controller&&this.renderGrid(y.broadphase,T,m.broadphaseColor,.5),m.showBounds&&this.renderBodyBounds(E,T,m.boundsColor,.5),(m.showBody||m.showStaticBody)&&this.renderBodies(E),m.showJoint&&this.renderJoints(),(m.showAxes||m.showAngleIndicator)&&this.renderBodyAxes(E,T,m.showAxes,m.angleColor,.5),m.showVelocity&&this.renderBodyVelocity(E,T,m.velocityColor,1,2),m.showSeparations&&this.renderSeparations(y.pairs.list,T,m.separationColor),m.showCollisions&&this.renderCollisions(y.pairs.list,T,m.collisionColor)}},renderGrid:function(m,y,T,E){y.lineStyle(1,T,E);for(var C=r.keys(m.buckets),A=0;A0){var D=L[0].vertex.x,I=L[0].vertex.y;L.length===2&&(D=(L[0].vertex.x+L[1].vertex.x)/2,I=(L[0].vertex.y+L[1].vertex.y)/2),F.bodyB===F.supports[0].body||F.bodyA.isStatic?y.lineBetween(D-F.normal.x*8,I-F.normal.y*8,D,I):y.lineBetween(D+F.normal.x*8,I+F.normal.y*8,D,I)}}return this},renderBodyBounds:function(m,y,T,E){y.lineStyle(1,T,E);for(var C=0;C1?1:0;F1?1:0;L1?1:0;L1&&this.renderConvexHull(G,y,z,B)}}},renderBody:function(m,y,T,E,C,A,P,M){E===void 0&&(E=null),C===void 0&&(C=null),A===void 0&&(A=1),P===void 0&&(P=null),M===void 0&&(M=null);for(var F=this.debugConfig,L=F.sensorFillColor,D=F.sensorLineColor,I=m.parts,U=I.length,z=U>1?1:0;z1){var P=m.vertices;y.lineStyle(E,T),y.beginPath(),y.moveTo(P[0].x,P[0].y);for(var M=1;M0&&(y.fillStyle(P),y.fillCircle(I.x,I.y,M),y.fillCircle(U.x,U.y,M)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){l.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=x},70410:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22562),c={applyForce:function(a){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,a),this},applyForceFrom:function(a,r){return d.applyForce(this.body,a,r),this},thrust:function(a){var r=this.body.angle;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(a){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(a){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(a*Math.cos(r),a*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(a){var r=this.body.angle-Math.PI;return this._tempVec2.set(a*Math.cos(r),a*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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22562),c=t(26099),a={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=a},39132:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66280),c=t(22562),a=t(43855),r=t(95540),n=t(19496),e=t(85791),s=t(41598),h={setRectangle:function(i,o,f){return this.setBody({type:"rectangle",width:i,height:o},f)},setCircle:function(i,o){return this.setBody({type:"circle",radius:i},o)},setPolygon:function(i,o,f){return this.setBody({type:"polygon",sides:o,radius:i},f)},setTrapezoid:function(i,o,f,l){return this.setBody({type:"trapezoid",width:i,height:o,slope:f},l)},setExistingBody:function(i,o){o===void 0&&(o=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1121),c=t(53614),a=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;a.on(this.body,"sleepStart",function(s){e.emit(d.SLEEP_START,s,this)})}else a.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;a.on(this.body,"sleepEnd",function(s){e.emit(d.SLEEP_END,s,this)})}else a.off(this.body,"sleepEnd");return this}};p.exports=r},90556:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22562),c={setStatic:function(a){return d.setStatic(this.body,a),this},isStatic:function(){return this.body.isStatic}};p.exports=c},85436:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22562),c=t(36383),a=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)}},scaleX:{get:function(){return this._scaleX},set:function(s){var h=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,h,i),d.scale(this.body,s,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(s){var h=1/this._scaleX,i=1/this._scaleY;this._scaleY=s,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,h,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=a(s),d.setAngle(this.body,this._rotation)}},setPosition:function(s,h){return s===void 0&&(s=0),h===void 0&&(h=s),this._tempVec2.set(s,h),d.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=a(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,h,i){s===void 0&&(s=1),h===void 0&&(h=s);var o=1/this._scaleX,f=1/this._scaleY;return this._scaleX=s,this._scaleY=h,d.scale(this.body,o,f,i),d.scale(this.body,s,h,i),this}};p.exports=e},42081:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22562),c={setVelocityX:function(a){return this._tempVec2.set(a,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(a){return this._tempVec2.set(this.body.velocity.x,a),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(a,r){return this._tempVec2.set(a,r),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(a){return d.setAngularVelocity(this.body,a),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(a){return d.setAngularSpeed(this.body,a),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};p.exports=c},31884:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afteradd"},1213:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afterremove"},25968:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afterupdate"},67205:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeadd"},39438:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeremove"},44823:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeupdate"},92593:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionactive"},60128:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionend"},76861:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionstart"},92362:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},76408:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},93971:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},5656:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},47861:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},79099:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleepend"},35906:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleepstart"},1121:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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),a=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:{},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 f=n.extend(o,i);return h(f,i),f.setOnCollideWith=function(l,u){return u?this.onCollideWith[l.id]=u:delete this.onCollideWith[l.id],this},f},d.nextGroup=function(i){return i?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var h=function(i,o){if(o=o||{},d.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||a.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 f=i.bounds,l=i.centerOfMass,u=i.centerOffset,v=f.max.x-f.min.x,g=f.max.y-f.min.y;l.x=-(f.min.x-i.position.x)/v,l.y=-(f.min.y-i.position.y)/g,u.x=v*l.x,u.y=g*l.y}};d.set=function(i,o,f){var l;typeof o=="string"&&(l=o,o={},o[l]=f);for(l in o)if(Object.prototype.hasOwnProperty.call(o,l))switch(f=o[l],l){case"isStatic":d.setStatic(i,f);break;case"isSleeping":r.set(i,f);break;case"mass":d.setMass(i,f);break;case"density":d.setDensity(i,f);break;case"inertia":d.setInertia(i,f);break;case"vertices":d.setVertices(i,f);break;case"position":d.setPosition(i,f);break;case"angle":d.setAngle(i,f);break;case"velocity":d.setVelocity(i,f);break;case"angularVelocity":d.setAngularVelocity(i,f);break;case"speed":d.setSpeed(i,f);break;case"angularSpeed":d.setAngularSpeed(i,f);break;case"parts":d.setParts(i,f);break;case"centre":d.setCentre(i,f);break;default:i[l]=f}},d.setStatic=function(i,o){for(var f=0;f0&&a.rotateAbout(v.position,l,i.position,v.position)}},d.setVelocity=function(i,o){var f=i.deltaTime/d._baseDelta;i.positionPrev.x=i.position.x-o.x*f,i.positionPrev.y=i.position.y-o.y*f,i.velocity.x=(i.position.x-i.positionPrev.x)/f,i.velocity.y=(i.position.y-i.positionPrev.y)/f,i.speed=a.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 a.magnitude(d.getVelocity(i))},d.setSpeed=function(i,o){d.setVelocity(i,a.mult(a.normalise(d.getVelocity(i)),o))},d.setAngularVelocity=function(i,o){var f=i.deltaTime/d._baseDelta;i.anglePrev=i.angle-o*f,i.angularVelocity=(i.angle-i.anglePrev)/f,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,f){d.setPosition(i,a.add(i.position,o),f)},d.rotate=function(i,o,f,l){if(!f)d.setAngle(i,i.angle+o,l);else{var u=Math.cos(o),v=Math.sin(o),g=i.position.x-f.x,x=i.position.y-f.y;d.setPosition(i,{x:f.x+(g*u-x*v),y:f.y+(g*v+x*u)},l),d.setAngle(i,i.angle+o,l)}},d.scale=function(i,o,f,l){var u=0,v=0;l=l||i.position;for(var g=i.inertia===1/0,x=0;x0&&(u+=m.area,v+=m.inertia),m.position.x=l.x+(m.position.x-l.x)*o,m.position.y=l.y+(m.position.y-l.y)*f,e.update(m.bounds,m.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===f?i.circleRadius*=o:i.circleRadius=null),g&&d.setInertia(i,1/0)},d.update=function(i,o){o=(typeof o<"u"?o:16.666666666666668)*i.timeScale;var f=o*o,l=d._timeCorrection?o/(i.deltaTime||o):1,u=1-i.frictionAir*(o/n._baseDelta),v=(i.position.x-i.positionPrev.x)*l,g=(i.position.y-i.positionPrev.y)*l;i.velocity.x=v*u+i.force.x/i.mass*f,i.velocity.y=g*u+i.force.y/i.mass*f,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*l+i.torque/i.inertia*f,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=a.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var x=0;x0&&(m.position.x+=i.velocity.x,m.position.y+=i.velocity.y),i.angularVelocity!==0&&(c.rotate(m.vertices,i.angularVelocity,i.position),s.rotate(m.axes,i.angularVelocity),x>0&&a.rotateAbout(m.position,i.angularVelocity,i.position,m.position)),e.update(m.bounds,m.vertices,i.velocity)}},d.updateVelocities=function(i){var o=d._baseDelta/i.deltaTime,f=i.velocity;f.x=(i.position.x-i.positionPrev.x)*o,f.y=(i.position.y-i.positionPrev.y)*o,i.speed=Math.sqrt(f.x*f.x+f.y*f.y),i.angularVelocity=(i.angle-i.anglePrev)*o,i.angularSpeed=Math.abs(i.angularVelocity)},d.applyForce=function(i,o,f){var l={x:o.x-i.position.x,y:o.y-i.position.y};i.force.x+=f.x,i.force.y+=f.y,i.torque+=l.x*f.y-l.y*f.x},d._totalProperties=function(i){for(var o={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=i.parts.length===1?0:1;f{var d={};p.exports=d;var c=t(35810),a=t(53402),r=t(15647),n=t(22562);(function(){d.create=function(e){return a.extend({id:a.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},d.setModified=function(e,s,h,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),h&&e.parent&&d.setModified(e.parent,s,h,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),a=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};d.create=function(s,h){return{pair:null,collided:!1,bodyA:s,bodyB:h,parentA:s.parent,parentB:h.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},d.collides=function(s,h,i){if(d._overlapAxes(n,s.vertices,h.vertices,s.axes),n.overlap<=0||(d._overlapAxes(e,h.vertices,s.vertices,h.axes),e.overlap<=0))return null;var o=i&&i.table[a.id(s,h)],f;o?f=o.collision:(f=d.create(s,h),f.collided=!0,f.bodyA=s.idw?w=P:PG?G=P:Pf?f=u:u{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),a=t(52284);(function(){d.create=function(r){var n={bodies:[],pairs:null};return c.extend(n,r)},d.setBodies=function(r,n){r.bodies=n.slice(0)},d.clear=function(r){r.bodies=[]},d.collisions=function(r){var n=[],e=r.pairs,s=r.bodies,h=s.length,i=d.canCollide,o=a.collides,f,l;for(s.sort(d._compareBoundsX),f=0;fg)break;if(!(xA.max.y)&&!(y&&(C.isStatic||C.isSleeping))&&i(u.collisionFilter,C.collisionFilter)){var P=C.parts.length;if(E&&P===1){var M=o(u,C,e);M&&n.push(M)}else for(var F=T>1?1:0,L=P>1?1:0,D=F;DA.max.x||v.max.xA.max.y)){var M=o(I,z,e);M&&n.push(M)}}}}}return n},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(a,r){var n=a.bodyA,e=a.bodyB,s={id:d.id(n,e),bodyA:n,bodyB:e,collision:a,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(s,a,r),s},d.update=function(a,r,n){var e=a.contacts,s=r.supports,h=a.activeContacts,i=r.parentA,o=r.parentB,f=i.vertices.length;a.isActive=!0,a.timeUpdated=n,a.collision=r,a.separation=r.depth,a.inverseMass=i.inverseMass+o.inverseMass,a.friction=i.frictiono.frictionStatic?i.frictionStatic:o.frictionStatic,a.restitution=i.restitution>o.restitution?i.restitution:o.restitution,a.slop=i.slop>o.slop?i.slop:o.slop,r.pair=a,h.length=0;for(var l=0;l{var d={};p.exports=d;var c=t(4506),a=t(53402);(function(){d.create=function(r){return a.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},d.update=function(r,n,e){var s=r.list,h=s.length,i=r.table,o=n.length,f=r.collisionStart,l=r.collisionEnd,u=r.collisionActive,v,g,x,m;for(f.length=0,l.length=0,u.length=0,m=0;m{var d={};p.exports=d;var c=t(31725),a=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){d.collides=function(s,h){for(var i=[],o=h.length,f=s.bounds,l=a.collides,u=r.overlaps,v=0;v{var d={};p.exports=d;var c=t(41598),a=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,h,i=n.length;for(e=0;eQ?(x=q>0?q:-q,g=T.friction*(q>0?1:-1)*i,g<-x?g=-x:g>x&&(g=x)):(g=q,x=u);var k=N*L-X*F,j=V*L-Y*F,et=w/(G+C.inverseInertia*k*k+A.inverseInertia*j*j),it=(1+T.restitution)*$*et;if(g*=et,$0&&(O.normalImpulse=0),it=O.normalImpulse-ht}if(q<-f||q>f)O.tangentImpulse=0;else{var ot=O.tangentImpulse;O.tangentImpulse+=g,O.tangentImpulse<-x&&(O.tangentImpulse=-x),O.tangentImpulse>x&&(O.tangentImpulse=x),g=O.tangentImpulse-ot}var nt=F*it+D*g,st=L*it+I*g;C.isStatic||C.isSleeping||(C.positionPrev.x+=nt*C.inverseMass,C.positionPrev.y+=st*C.inverseMass,C.anglePrev+=(N*st-X*nt)*C.inverseInertia),A.isStatic||A.isSleeping||(A.positionPrev.x-=nt*A.inverseMass,A.positionPrev.y-=st*A.inverseMass,A.anglePrev-=(V*st-Y*nt)*A.inverseInertia)}}}}})()},48140:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),a=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(h){var i=h;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var o=i.bodyA?a.add(i.bodyA.position,i.pointA):i.pointA,f=i.bodyB?a.add(i.bodyB.position,i.pointB):i.pointB,l=a.magnitude(a.sub(o,f));i.length=typeof i.length<"u"?i.length:l,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(h){for(var i=0;i=1||h.length===0,E=T?h.stiffness*i:h.stiffness*i*i,C=h.damping*i,A=a.mult(x,y*E),P=(o?o.inverseMass:0)+(f?f.inverseMass:0),M=(o?o.inverseInertia:0)+(f?f.inverseInertia:0),F=P+M,L,D,I,U,z;if(C>0){var w=a.create();I=a.div(x,m),z=a.sub(f&&a.sub(f.position,f.positionPrev)||w,o&&a.sub(o.position,o.positionPrev)||w),U=a.dot(I,z)}o&&!o.isStatic&&(D=o.inverseMass/P,o.constraintImpulse.x-=A.x*D,o.constraintImpulse.y-=A.y*D,o.position.x-=A.x*D,o.position.y-=A.y*D,C>0&&(o.positionPrev.x-=C*I.x*U*D,o.positionPrev.y-=C*I.y*U*D),L=a.cross(l,A)/F*d._torqueDampen*o.inverseInertia*(1-h.angularStiffness),o.constraintImpulse.angle-=L,o.angle-=L),f&&!f.isStatic&&(D=f.inverseMass/P,f.constraintImpulse.x+=A.x*D,f.constraintImpulse.y+=A.y*D,f.position.x+=A.x*D,f.position.y+=A.y*D,C>0&&(f.positionPrev.x+=C*I.x*U*D,f.positionPrev.y+=C*I.y*U*D),L=a.cross(u,A)/F*d._torqueDampen*f.inverseInertia*(1-h.angularStiffness),f.constraintImpulse.angle+=L,f.angle+=L)}}},d.postSolveAll=function(h){for(var i=0;i0&&(u.position.x+=f.x,u.position.y+=f.y),f.angle!==0&&(c.rotate(u.vertices,f.angle,o.position),e.rotate(u.axes,f.angle),l>0&&a.rotateAbout(u.position,f.angle,o.position,u.position)),n.update(u.bounds,u.vertices,o.velocity)}f.angle*=d._warming,f.x*=d._warming,f.y*=d._warming}}},d.pointAWorld=function(h){return{x:(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),y:(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0)}},d.pointBWorld=function(h){return{x:(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),y:(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0)}},d.currentLength=function(h){var i=(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),o=(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0),f=(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),l=(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0),u=i-f,v=o-l;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(a,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=a[r];a[r]=a[n],a[n]=e}return a},d.choose=function(a){return a[Math.floor(d.random()*a.length)]},d.isElement=function(a){return typeof HTMLElement<"u"?a instanceof HTMLElement:!!(a&&a.nodeType&&a.nodeName)},d.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"},d.isFunction=function(a){return typeof a=="function"},d.isPlainObject=function(a){return typeof a=="object"&&a.constructor===Object},d.isString=function(a){return toString.call(a)==="[object String]"},d.clamp=function(a,r,n){return an?n:a},d.sign=function(a){return a<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(a,r){return a=typeof a<"u"?a:0,r=typeof r<"u"?r:1,a+c()*(r-a)};var c=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(a){return a=a.replace("#",""),a.length==3&&(a=a.charAt(0)+a.charAt(0)+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)),parseInt(a,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 a=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[a]||(d.warn(a),d._warnedOnce[a]=!0)},d.deprecated=function(a,r,n){a[r]=d.chain(function(){d.warnOnce("🔅 deprecated 🔅",n)},a[r])},d.nextId=function(){return d._nextId++},d.indexOf=function(a,r){if(a.indexOf)return a.indexOf(r);for(var n=0;n{var d={};p.exports=d;var c=t(53614),a=t(66272),r=t(81388),n=t(99561),e=t(35810),s=t(69351),h=t(48140),i=t(53402),o=t(22562);(function(){d.create=function(f){f=f||{};var l={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}},u=i.extend(l,f);return u.world=f.world||s.create({label:"World"}),u.pairs=f.pairs||n.create(),u.detector=f.detector||r.create(),u.grid={buckets:[]},u.world.gravity=u.gravity,u.broadphase=u.grid,u.metrics={},u},d.update=function(f,l){var u=i.now(),v=f.world,g=f.detector,x=f.pairs,m=f.timing,y=m.timestamp,T;l=typeof l<"u"?l:i._baseDelta,l*=m.timeScale,m.timestamp+=l,m.lastDelta=l;var E={timestamp:m.timestamp,delta:l};e.trigger(f,"beforeUpdate",E);var C=s.allBodies(v),A=s.allConstraints(v);for(v.isModified&&(r.setBodies(g,C),s.setModified(v,!1,!1,!0)),f.enableSleeping&&c.update(C,l),d._bodiesApplyGravity(C,f.gravity),l>0&&d._bodiesUpdate(C,l),e.trigger(f,"beforeSolve",E),h.preSolveAll(C),T=0;T0&&e.trigger(f,"collisionStart",{pairs:x.collisionStart,timestamp:m.timestamp,delta:l});var M=i.clamp(20/f.positionIterations,0,1);for(a.preSolvePosition(x.list),T=0;T0&&e.trigger(f,"collisionActive",{pairs:x.collisionActive,timestamp:m.timestamp,delta:l}),x.collisionEnd.length>0&&e.trigger(f,"collisionEnd",{pairs:x.collisionEnd,timestamp:m.timestamp,delta:l}),d._bodiesClearForces(C),e.trigger(f,"afterUpdate",E),f.timing.lastElapsed=i.now()-u,f},d.merge=function(f,l){if(i.extend(f,l),l.world){f.world=l.world,d.clear(f);for(var u=s.allBodies(f.world),v=0;v{var d={};p.exports=d;var c=t(53402);(function(){d.on=function(a,r,n){for(var e=r.split(" "),s,h=0;h0){n||(n={}),e=r.split(" ");for(var f=0;f{var d={};p.exports=d;var c=t(73832),a=t(53402);(function(){d.name="matter-js",d.version="0.19.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./,""),a.chainPathBefore(d,r,n)},d.after=function(r,n){return r=r.replace(/^Matter./,""),a.chainPathAfter(d,r,n)}})()},73832:(p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d._registry={},d.register=function(a){if(d.isPlugin(a)||c.warn("Plugin.register:",d.toString(a),"does not implement all required fields."),a.name in d._registry){var r=d._registry[a.name],n=d.versionParse(a.version).number,e=d.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",d.toString(r),"was upgraded to",d.toString(a)),d._registry[a.name]=a):n-1},d.isFor=function(a,r){var n=a.for&&d.dependencyParse(a.for);return!a.for||r.name===n.name&&d.versionSatisfies(r.version,n.range)},d.use=function(a,r){if(a.uses=(a.uses||[]).concat(r||[]),a.uses.length===0){c.warn("Plugin.use:",d.toString(a),"does not specify any dependencies to install.");return}for(var n=d.dependencies(a),e=c.topologicalSort(n),s=[],h=0;h0&&!i.silent&&c.info(s.join(" "))},d.dependencies=function(a,r){var n=d.dependencyParse(a),e=n.name;if(r=r||{},!(e in r)){a=d.resolve(a)||a,r[e]=c.map(a.uses||[],function(h){d.isPlugin(h)&&d.register(h);var i=d.dependencyParse(h),o=d.resolve(h);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,a._warned=!0):o||(c.warn("Plugin.dependencies:",d.toString(h),"used by",d.toString(n),"could not be resolved."),a._warned=!0),i.name});for(var s=0;s=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(a)||c.warn("Plugin.versionParse:",a,"is not a valid version or range.");var n=r.exec(a),e=Number(n[4]),s=Number(n[5]),h=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:a,operator:n[1]||n[2]||"",major:e,minor:s,patch:h,parts:[e,s,h],prerelease:n[7],number:e*1e8+s*1e4+h}},d.versionSatisfies=function(a,r){r=r||"*";var n=d.versionParse(r),e=d.versionParse(a);if(n.isRange){if(n.operator==="*"||a==="*")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 a===r||a==="*"}})()},53614:(p,S,t)=>{var d={};p.exports=d;var c=t(22562),a=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,h=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(l,!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||a.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,s&&a.trigger(n,"sleepEnd"))}})()},66280:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),a=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){d.rectangle=function(s,h,i,o,f){f=f||{};var l={label:"Rectangle Body",position:{x:s,y:h},vertices:c.fromPath("L 0 0 L "+i+" 0 L "+i+" "+o+" L 0 "+o)};if(f.chamfer){var u=f.chamfer;l.vertices=c.chamfer(l.vertices,u.radius,u.quality,u.qualityMin,u.qualityMax),delete f.chamfer}return r.create(a.extend({},l,f))},d.trapezoid=function(s,h,i,o,f,l){l=l||{},f*=.5;var u=(1-f*2)*i,v=i*f,g=v+u,x=g+v,m;f<.5?m="L 0 0 L "+v+" "+-o+" L "+g+" "+-o+" L "+x+" 0":m="L 0 0 L "+g+" "+-o+" L "+x+" 0";var y={label:"Trapezoid Body",position:{x:s,y:h},vertices:c.fromPath(m)};if(l.chamfer){var T=l.chamfer;y.vertices=c.chamfer(y.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete l.chamfer}return r.create(a.extend({},y,l))},d.circle=function(s,h,i,o,f){o=o||{};var l={label:"Circle Body",circleRadius:i};f=f||25;var u=Math.ceil(Math.max(10,Math.min(f,i)));return u%2===1&&(u+=1),d.polygon(s,h,u,i,a.extend({},l,o))},d.polygon=function(s,h,i,o,f){if(f=f||{},i<3)return d.circle(s,h,o,f);for(var l=2*Math.PI/i,u="",v=l*.5,g=0;g0&&c.area(z)1?(m=r.create(a.extend({parts:y.slice(0)},o)),r.setPosition(m,{x:s,y:h}),m):y[0]},d.flagCoincidentParts=function(s,h){h===void 0&&(h=5);for(var i=0;i{var d={};p.exports=d;var c=t(69351),a=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){d.stack=function(s,h,i,o,f,l,u){for(var v=c.create({label:"Stack"}),g=s,x=h,m,y=0,T=0;TE&&(E=P),n.translate(A,{x:M*.5,y:P*.5}),g=A.bounds.max.x+f,c.addBody(v,A),m=A,y+=1}else g+=f}x+=E+l,g=s}return v},d.chain=function(s,h,i,o,f,l){for(var u=s.bodies,v=1;v0)for(v=0;v0&&(m=l[v-1+(u-1)*h],c.addConstraint(s,a.create(r.extend({bodyA:m,bodyB:x},f)))),o&&vE)){m=E-m;var A=m,P=i-1-m;if(!(xP)){T===1&&n.translate(y,{x:(x+(i%2===1?1:-1))*C,y:0});var M=y?x*C:0;return u(s+M+x*f,g,x,m,y,T)}}})},d.newtonsCradle=function(s,h,i,o,f){for(var l=c.create({label:"Newtons Cradle"}),u=0;u{var d={};p.exports=d;var c=t(31725),a=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 a=0;at.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,a=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+a}}()},74058:(p,S,t)=>{var d={};p.exports=d,t(15647);var c=t(53402);(function(){d.pathToVertices=function(a,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,s,h,i,o,f,l,u,v,g=[],x,m,y=0,T=0,E=0;r=r||15;var C=function(P,M,F){var L=F%2===1&&F>1;if(!u||P!=u.x||M!=u.y){u&&L?(x=u.x,m=u.y):(x=0,m=0);var D={x:x+P,y:m+M};(L||!u)&&(u=D),g.push(D),T=x+P,E=m+M}},A=function(P){var M=P.pathSegTypeAsLetter.toUpperCase();if(M!=="Z"){switch(M){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,E=P.y;break;case"H":T=P.x;break;case"V":E=P.y;break}C(T,E,P.pathSegType)}};for(d._svgPathToAbsolute(a),s=a.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 a=Math.cos(d),r=Math.sin(d);c||(c={});var n=t.x*a-t.y*r;return c.y=t.x*r+t.y*a,c.x=n,c},S.rotateAbout=function(t,d,c,a){var r=Math.cos(d),n=Math.sin(d);a||(a={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return a.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),a.x=e,a},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),a=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 h,i,o=0;o=0?o-1:r.length-1],l=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,h;for(r=r.slice(0),r.sort(function(i,o){var f=i.x-o.x;return f!==0?f:i.y-o.y}),h=0;h=2&&c.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(h=r.length-1;h>=0;h-=1){for(s=r[h];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)}})()},18210:(p,S,t)=>{var d=t(19933),c={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(a){a.after("Body.create",function(){c.Body.init(this)}),a.before("Engine.update",function(r){c.Engine.update(r)})},Body:{init:function(a){a.plugin.attractors=a.plugin.attractors||[]}},Engine:{update:function(a){for(var r=d.Composite.allBodies(a.world),n=0;n0)for(var h=0;h{/** + * @author @dxu https://github.com/dxu/matter-collision-events + * @author Richard Davey + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(d){d.pairs.map(function(c){var a=c.bodyA,r=c.bodyB;a.gameObject&&a.gameObject.emit("collide",a,r,c),r.gameObject&&r.gameObject.emit("collide",r,a,c),t.Events.trigger(a,"onCollide",{pair:c}),t.Events.trigger(r,"onCollide",{pair:c}),a.onCollideCallback&&a.onCollideCallback(c),r.onCollideCallback&&r.onCollideCallback(c),a.onCollideWith[r.id]&&a.onCollideWith[r.id](r,c),r.onCollideWith[a.id]&&r.onCollideWith[a.id](a,c)})}),t.Events.on(this,"collisionActive",function(d){d.pairs.map(function(c){var a=c.bodyA,r=c.bodyB;a.gameObject&&a.gameObject.emit("collideActive",a,r,c),r.gameObject&&r.gameObject.emit("collideActive",r,a,c),t.Events.trigger(a,"onCollideActive",{pair:c}),t.Events.trigger(r,"onCollideActive",{pair:c}),a.onCollideActiveCallback&&a.onCollideActiveCallback(c),r.onCollideActiveCallback&&r.onCollideActiveCallback(c)})}),t.Events.on(this,"collisionEnd",function(d){d.pairs.map(function(c){var a=c.bodyA,r=c.bodyB;a.gameObject&&a.gameObject.emit("collideEnd",a,r,c),r.gameObject&&r.gameObject.emit("collideEnd",r,a,c),t.Events.trigger(a,"onCollideEnd",{pair:c}),t.Events.trigger(r,"onCollideEnd",{pair:c}),a.onCollideEndCallback&&a.onCollideEndCallback(c),r.onCollideEndCallback&&r.onCollideEndCallback(c)})})})}};p.exports=S},74507:(p,S,t)=>{var d=t(19933),c={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(a){a.after("Engine.update",function(){c.Engine.update(this)})},Engine:{update:function(a){for(var r=a.world,n=d.Composite.allBodies(r),e=d.Composite.allComposites(r),s=0;sr.max.x?n=r.min.x-a.max.x:a.max.xr.max.y?e=r.min.y-a.max.y:a.max.y{/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={decomp:A,quickDecomp:L,isSimple:M,removeCollinearPoints:D,removeDuplicatePoints:I,makeCCW:u};function S(w,G,R){R=R||0;var O=[0,0],B,N,X,V,Y,W,H;return B=w[1][1]-w[0][1],N=w[0][0]-w[1][0],X=B*w[0][0]+N*w[0][1],V=G[1][1]-G[0][1],Y=G[0][0]-G[1][0],W=V*G[0][0]+Y*G[0][1],H=B*Y-V*N,U(H,0,R)||(O[0]=(Y*X-N*W)/H,O[1]=(B*W-V*X)/H),O}function t(w,G,R,O){var B=G[0]-w[0],N=G[1]-w[1],X=O[0]-R[0],V=O[1]-R[1];if(X*N-V*B===0)return!1;var Y=(B*(R[1]-w[1])+N*(w[0]-R[0]))/(X*N-V*B),W=(X*(w[1]-R[1])+V*(R[0]-w[0]))/(V*B-X*N);return Y>=0&&Y<=1&&W>=0&&W<=1}function d(w,G,R){return(G[0]-w[0])*(R[1]-w[1])-(R[0]-w[0])*(G[1]-w[1])}function c(w,G,R){return d(w,G,R)>0}function a(w,G,R){return d(w,G,R)>=0}function r(w,G,R){return d(w,G,R)<0}function n(w,G,R){return d(w,G,R)<=0}var e=[],s=[];function h(w,G,R,O){if(O){var B=e,N=s;B[0]=G[0]-w[0],B[1]=G[1]-w[1],N[0]=R[0]-G[0],N[1]=R[1]-G[1];var X=B[0]*N[0]+B[1]*N[1],V=Math.sqrt(B[0]*B[0]+B[1]*B[1]),Y=Math.sqrt(N[0]*N[0]+N[1]*N[1]),W=Math.acos(X/(V*Y));return WR[G][0])&&(G=O);return c(o(w,G-1),o(w,G),o(w,G+1))?!1:(v(w),!0)}function v(w){for(var G=[],R=w.length,O=0;O!==R;O++)G.push(w.pop());for(var O=0;O!==R;O++)w[O]=G[O]}function g(w,G){return r(o(w,G-1),o(w,G),o(w,G+1))}var x=[],m=[];function y(w,G,R){var O,B,N=x,X=m;if(a(o(w,G+1),o(w,G),o(w,R))&&n(o(w,G-1),o(w,G),o(w,R)))return!1;B=i(o(w,G),o(w,R));for(var V=0;V!==w.length;++V)if(!((V+1)%w.length===G||V===G)&&a(o(w,G),o(w,R),o(w,V+1))&&n(o(w,G),o(w,R),o(w,V))&&(N[0]=o(w,G),N[1]=o(w,R),X[0]=o(w,V),X[1]=o(w,V+1),O=S(N,X),i(o(w,G),O)0?P(w,G):[w]}function P(w,G){if(G.length===0)return[w];if(G instanceof Array&&G.length&&G[0]instanceof Array&&G[0].length===2&&G[0][0]instanceof Array){for(var R=[w],O=0;ON)return console.warn("quickDecomp: max level ("+N+") reached."),G;for(var j=0;jZ&&(Z+=w.length),J=Number.MAX_VALUE,Z<$)return G;for(var et=$;et<=Z;++et)a(o(Q,j-1),o(Q,j),o(Q,et))&&n(o(Q,j+1),o(Q,j),o(Q,et))&&(K=i(o(Q,j),o(Q,et)),K3&&O>=0;--O)h(o(w,O-1),o(w,O),o(w,O+1),G)&&(w.splice(O%w.length,1),R++);return R}function I(w,G){for(var R=w.length-1;R>=1;--R)for(var O=w[R],B=R-1;B>=0;--B)if(z(O,w[B],G)){w.splice(R,1);continue}}function U(w,G,R){return R=R||0,Math.abs(w-G)<=R}function z(w,G,R){return U(w[0],G[0],R)&&U(w[1],G[1],R)}},52018:(p,S,t)=>{/** +* @author Richard Davey +* @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={},t={},d={};d.register=function(c,a,r,n){n===void 0&&(n=!1),S[c]={plugin:a,mapping:r,custom:n}},d.registerCustom=function(c,a,r,n){t[c]={plugin:a,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(8443),a=t(50792),r=t(74099),n=t(44603),e=t(39429),s=t(95540),h=t(37277),i=t(72905),o=new d({Extends:a,initialize:function(l){a.call(this),this.game=l,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],l.isBooted?this.boot():l.events.once(c.BOOT,this.boot,this)},boot:function(){var f,l,u,v,g,x,m,y=this.game.config,T=y.installGlobalPlugins;for(T=T.concat(this._pendingGlobal),f=0;f{/** +* @author Richard Davey +* @copyright 2013-2024 Phaser Studio Inc. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var d=t(52018),c=t(83419),a=t(44594),r=new c({Extends:d,initialize:function(e,s,h){d.call(this,s),this.scene=e,this.systems=e.sys,this.pluginKey=h,e.sys.events.once(a.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-2024 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:()=>{HTMLVideoElement&&!("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=(a,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,h=r-a;p(r,{presentationTime:r+s*1e3,expectedDisplayTime:r+h,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+h/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[S]}else this._rvfcpolyfillmap[S]=requestAnimationFrame(s=>c(r,s))};return this._rvfcpolyfillmap[S]=requestAnimationFrame(a=>c(S,a)),S},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(p){cancelAnimationFrame(this._rvfcpolyfillmap[p]),delete this._rvfcpolyfillmap[p]})},10312:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19715),c=t(32880),a=t(83419),r=t(8054),n=t(50792),e=t(92503),s=t(56373),h=t(97480),i=t(69442),o=t(61340),f=new a({Extends:n,initialize:function(u){n.call(this);var v=u.config;this.config={clearBeforeRender:v.clearBeforeRender,backgroundColor:v.backgroundColor,antialias:v.antialias,roundPixels:v.roundPixels},this.game=u,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=u.canvas;var g={alpha:u.config.transparent,desynchronized:u.config.desynchronized,willReadFrequently:!1};this.gameContext=v.context?v.context:this.gameCanvas.getContext("2d",g),this.currentContext=this.gameContext,this.antialias=u.config.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 o,this._tempMatrix2=new o,this._tempMatrix3=new o,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(i.READY,this.boot,this)},boot:function(){var l=this.game,u=l.scale.baseSize;this.width=u.width,this.height=u.height,this.isBooted=!0,l.scale.on(h.RESIZE,this.onResize,this),this.resize(u.width,u.height)},onResize:function(l,u){(u.width!==this.width||u.height!==this.height)&&this.resize(u.width,u.height)},resize:function(l,u){this.width=l,this.height=u,this.emit(e.RESIZE,l,u)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(l){return this.currentContext.globalCompositeOperation=l,this},setContext:function(l){return this.currentContext=l||this.gameContext,this},setAlpha:function(l){return this.currentContext.globalAlpha=l,this},preRender:function(){var l=this.gameContext,u=this.config,v=this.width,g=this.height;l.globalAlpha=1,l.globalCompositeOperation="source-over",l.setTransform(1,0,0,1,0,0),u.clearBeforeRender&&(l.clearRect(0,0,v,g),u.transparent||(l.fillStyle=u.backgroundColor.rgba,l.fillRect(0,0,v,g))),l.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(l,u,v){var g=u.length;this.emit(e.RENDER,l,v);var x=v.x,m=v.y,y=v.width,T=v.height,E=v.renderToTexture?v.context:l.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(x,m,y,T),E.clip()),v.emit(d.PRE_RENDER,v),this.currentContext=E;var C=v.mask;C&&C.preRenderCanvas(this,null,v._maskCamera),v.transparent||(E.fillStyle=v.backgroundColor.rgba,E.fillRect(x,m,y,T)),E.globalAlpha=v.alpha,E.globalCompositeOperation="source-over",this.drawCount+=g,v.renderToTexture&&v.emit(d.PRE_RENDER,v),v.matrix.copyToContext(E);for(var A=0;A=0?U=-(U+P):U<0&&(U=Math.abs(U)-P)),l.flipY&&(z>=0?z=-(z+M):z<0&&(z=Math.abs(z)-M))}var G=1,R=1;l.flipX&&(F||(U+=-u.realWidth+D*2),G=-1),l.flipY&&(F||(z+=-u.realHeight+I*2),R=-1);var O=l.x,B=l.y;T.applyITRS(O,B,l.rotation,l.scaleX*G,l.scaleY*R),y.copyFrom(v.matrix),g?(y.multiplyWithOffset(g,-v.scrollX*l.scrollFactorX,-v.scrollY*l.scrollFactorY),T.e=O,T.f=B):(T.e-=v.scrollX*l.scrollFactorX,T.f-=v.scrollY*l.scrollFactorY),y.multiply(T),v.roundPixels&&(y.e=Math.round(y.e),y.f=Math.round(y.f)),m.save(),y.setToContext(m),m.globalCompositeOperation=this.blendModes[l.blendMode],m.globalAlpha=x,m.imageSmoothingEnabled=!u.source.scaleMode,l.mask&&l.mask.preRenderCanvas(this,l,v),P>0&&M>0&&(v.roundPixels?m.drawImage(u.source.image,C,A,P,M,Math.round(U),Math.round(z),Math.round(P/L),Math.round(M/L)):m.drawImage(u.source.image,C,A,P,M,U,z,P/L,M/L)),l.mask&&l.mask.postRenderCanvas(this,l,v),m.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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c=t(89289),a=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=a},20926:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91296),c=function(a,r,n,e,s){var h=e.alpha*n.alpha;if(h<=0)return!1;var i=d(n,e,s).calc;return r.globalCompositeOperation=a.blendModes[n.blendMode],r.globalAlpha=h,r.save(),i.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:a.antialias,!0};p.exports=c},63899:p=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="losewebgl"},6119:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},48070:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},15640:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="render"},8912:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resize"},87124:p=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="restorewebgl"},92503:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c=t(40987),a=t(95540),r=function(n,e){var s=a(e,"callback"),h=a(e,"type","image/png"),i=a(e,"encoder",.92),o=Math.abs(Math.round(a(e,"x",0))),f=Math.abs(Math.round(a(e,"y",0))),l=Math.floor(a(e,"width",n.width)),u=Math.floor(a(e,"height",n.height)),v=a(e,"getPixel",!1);if(v){var g=n.getContext("2d",{willReadFrequently:!1}),x=g.getImageData(o,f,1,1),m=x.data;s.call(null,new c(m[0],m[1],m[2],m[3]))}else if(o!==0||f!==0||l!==n.width||u!==n.height){var y=d.createWebGL(this,l,u),T=y.getContext("2d",{willReadFrequently:!0});l>0&&u>0&&T.drawImage(n,o,f,l,u,0,0,l,u);var E=new Image;E.onerror=function(){s.call(null),d.remove(y)},E.onload=function(){s.call(null,E),d.remove(y)},E.src=y.toDataURL(h,i)}else{var C=new Image;C.onerror=function(){s.call(null)},C.onload=function(){s.call(null,C)},C.src=n.toDataURL(h,i)}};p.exports=r},88815:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c=t(40987),a=t(95540),r=function(n,e){var s=n,h=a(e,"callback"),i=a(e,"type","image/png"),o=a(e,"encoder",.92),f=Math.abs(Math.round(a(e,"x",0))),l=Math.abs(Math.round(a(e,"y",0))),u=a(e,"getPixel",!1),v=a(e,"isFramebuffer",!1),g=v?a(e,"bufferWidth",1):s.drawingBufferWidth,x=v?a(e,"bufferHeight",1):s.drawingBufferHeight;if(u){var m=new Uint8Array(4),y=v?l:x-l;s.readPixels(f,y,1,1,s.RGBA,s.UNSIGNED_BYTE,m),h.call(null,new c(m[0],m[1],m[2],m[3]))}else{var T=Math.floor(a(e,"width",g)),E=Math.floor(a(e,"height",x)),C=T*E*4,A=new Uint8Array(C);s.readPixels(f,x-l-E,T,E,s.RGBA,s.UNSIGNED_BYTE,A);for(var P=d.createWebGL(this,T,E),M=P.getContext("2d",{willReadFrequently:!0}),F=M.getImageData(0,0,T,E),L=F.data,D=0;D{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(36060),a=t(90330),r=t(82264),n=t(95540),e=t(32302),s=t(63448),h=t(31302),i=t(58918),o=t(14811),f=t(92651),l=t(96569),u=t(56527),v=t(57516),g=t(43439),x=t(81041),m=t(12385),y=t(7589),T=t(95428),E=t(72905),C=new d({initialize:function(P){this.game=P.game,this.renderer=P,this.classes=new a([[c.UTILITY_PIPELINE,y],[c.MULTI_PIPELINE,v],[c.BITMAPMASK_PIPELINE,h],[c.SINGLE_PIPELINE,m],[c.ROPE_PIPELINE,x],[c.LIGHT_PIPELINE,l],[c.POINTLIGHT_PIPELINE,g],[c.MOBILE_PIPELINE,u]]),this.postPipelineClasses=new a,this.pipelines=new a,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(A,P,M){var F=this.renderer,L=this.renderTargets;this.frameInc=Math.floor(n(A,"frameInc",32));var D=F.width,I=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,f);for(var w=Math.min(D,I),G=Math.ceil(w/this.frameInc),R=1;R=0;M--){var F=P[M];F.active&&F.preBatch(A)}}},postBatch:function(A){if(A.hasPostPipeline){this.flush();for(var P=A.postPipelines,M=0;M=0;M--){var F=P[M];F.active&&F.preBatch(A)}}},postBatchCamera:function(A){if(A.hasPostPipeline){this.flush();for(var P=A.postPipelines,M=0;Mthis.maxDimension)return this.targetIndex=P.length-M,P[this.targetIndex];var F=(s(A,this.frameInc,0,!0)-1)*M;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=C},32302:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(92503),a=new d({initialize:function(n,e,s,h,i,o,f,l,u){h===void 0&&(h=1),i===void 0&&(i=0),o===void 0&&(o=!0),f===void 0&&(f=!1),l===void 0&&(l=!0),u===void 0&&(u=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=h,this.minFilter=i,this.autoClear=o,this.autoResize=!0,this.hasDepthBuffer=l,this.forceClamp=u,this.resize(e,s),f?this.setAutoResize(!0):this.autoResize=!1},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(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),this.autoResize&&(r!==this.width||n!==this.height)){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 r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(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 h=this.renderer.gl;h.clearColor(0,0,0,0),h.clear(h.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(){var r=this.renderer,n=r.gl;r.pushFramebuffer(this.framebuffer),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.popFramebuffer(),r.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=a},70554:p=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @author Matthew Groves <@doormat> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={getTintFromFloats:function(S,t,d,c){var a=(S*255|0)&255,r=(t*255|0)&255,n=(d*255|0)&255,e=(c*255|0)&255;return(e<<24|a<<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,a=(S|0)&255,r=(t*255|0)&255;return(r<<24|a<<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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(62644),a=t(50792),r=t(77085),n=t(95540),e=t(37867),s=t(92503),h=t(32302),i=t(70554),o=t(38683),f=new d({Extends:a,initialize:function(u){a.call(this);var v=u.game,g=v.renderer,x=g.gl;this.name=n(u,"name","WebGLPipeline"),this.game=v,this.renderer=g,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 l,u=this.gl,v=this.config,g=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,m=n(v,"renderTarget",!1);typeof m=="boolean"&&m&&(m=1);var y=g.width,T=g.height;if(typeof m=="number")for(l=0;lD&&(D=L[l].vertexSize);var I=n(v,"batchSize",g.config.batchSize);this.vertexCapacity=I*6;var U=new ArrayBuffer(this.vertexCapacity*D);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=g.createVertexBuffer(U,u.STATIC_DRAW)):this.vertexBuffer=g.createVertexBuffer(U.byteLength,u.DYNAMIC_DRAW),this.setVertexBuffer(),l=L.length-1;l>=0;l--)L[l].rebind();this.hasBooted=!0,g.on(s.RESIZE,this.resize,this),g.on(s.PRE_RENDER,this.onPreRender,this),g.on(s.RENDER,this.onRender,this),g.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(l,u,v){var g=this.renderer;if(l!==this.currentShader||g.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(v);x&&!u&&(u=!0),l.bind(u,!1),this.currentShader=l}return this},getShaderByName:function(l){for(var u=this.shaders,v=0;v-1&&(L=w.substring(20))}D&&I&&M.push(new o(this,L,D,I,c(U)))}this.shaders=M}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(l){return this.currentBatch={start:this.vertexCount,count:0,texture:[l],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=l,this.batch.push(this.currentBatch),0},addTextureToBatch:function(l){var u=this.currentBatch;u&&(u.texture.push(l),u.unit++,u.maxUnit++)},pushBatch:function(l){if(!this.currentBatch||this.forceZero&&l!==this.currentTexture)return this.createBatch(l);if(l===this.currentTexture)return this.currentUnit;var u=this.currentBatch,v=u.texture.indexOf(l);return v===-1?u.texture.length===this.renderer.maxTextures?this.createBatch(l):(u.unit++,u.maxUnit++,u.texture.push(l),this.currentUnit=u.unit,this.currentTexture=l,u.unit):(this.currentUnit=v,this.currentTexture=l,v)},setGameObject:function(l,u){return u===void 0&&(u=l.frame),this.pushBatch(u.source.glTexture)},shouldFlush:function(l){return l===void 0&&(l=0),this.vertexCount+l>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(l,u){(l!==this.width||u!==this.height)&&this.flush(),this.width=l,this.height=u;for(var v=this.renderTargets,g=0;g=0;v--){var g=u[v].rebind();(!l||g===l)&&(this.currentShader=g)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var l=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,l),this.onBeforeFlush(l);var u=this.gl,v=this.vertexCount,g=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*g));var m,y,T,E=this.batch,C=this.activeTextures;if(this.forceZero)for(C[0]||u.activeTexture(u.TEXTURE0),m=0;m{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95428),c=t(72905),a=t(19715),r=t(83419),n=t(8054),e=t(50792),s=t(92503),h=t(50030),i=t(37867),o=t(29747),f=t(7530),l=t(32302),u=t(97480),v=t(69442),g=t(70554),x=t(88815),m=t(26128),y=t(1482),T=t(82751),E=t(84387),C=t(93567),A=t(57183),P=new r({Extends:e,initialize:function(F){e.call(this);var L=F.config,D={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:D,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.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(M){var F,L=this.game,D=this.canvas,I=M.backgroundColor;if(L.config.context?F=L.config.context:F=D.getContext("webgl",M.contextCreation)||D.getContext("experimental-webgl",M.contextCreation),!F||F.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=F;var U=this,z=function(){var R=F.getSupportedExtensions();U.supportedExtensions=R;var O="ANGLE_instanced_arrays";U.instancedArraysExtension=R.indexOf(O)>-1?F.getExtension(O):null;var B="OES_vertex_array_object";U.vaoExtension=R.indexOf(B)>-1?F.getExtension(B):null};z(),this.contextLostHandler=function(R){U.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),U.emit(s.LOSE_WEBGL,U),R.preventDefault()},D.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(R){if(F.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}U.currentProgram=null,U.currentFramebuffer=null,U.setBlendMode(n.BlendModes.NORMAL),F.disable(F.BLEND),F.disable(F.DEPTH_TEST),F.enable(F.CULL_FACE);var O=function(B){B.createResource()};d(U.glTextureWrappers,O),d(U.glBufferWrappers,O),d(U.glFramebufferWrappers,O),d(U.glProgramWrappers,O),d(U.glAttribLocationWrappers,O),d(U.glUniformLocationWrappers,O),U.createTemporaryTextures(),U.pipelines.restoreContext(),U.resize(U.game.scale.baseSize.width,U.game.scale.baseSize.height),z(),U.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),U.emit(s.RESTORE_WEBGL,U),R.preventDefault()},D.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),L.context=F;for(var w=0;w<=27;w++)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}},(!M.maxTextures||M.maxTextures===-1)&&(M.maxTextures=F.getParameter(F.MAX_TEXTURE_IMAGE_UNITS)),M.maxTextureSize||(M.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(I.redGL,I.greenGL,I.blueGL,I.alphaGL);var G=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return G.indexOf(M.mipmapFilter)!==-1&&(this.mipmapFilter=F[M.mipmapFilter]),this.maxTextures=g.checkShaderMax(F,M.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new f(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),L.textures.once(v.READY,this.boot,this),this},boot:function(){var M=this.game,F=this.pipelines,L=M.scale.baseSize,D=L.width,I=L.height;this.width=D,this.height=I,this.isBooted=!0,this.renderTarget=new l(this,D,I,1,0,!0,!0),this.maskTarget=new l(this,D,I,1,0,!0,!0),this.maskSource=new l(this,D,I,1,0,!0,!0);var U=M.config;F.boot(U.pipeline,U.defaultPipeline,U.autoMobilePipeline),this.blankTexture=M.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=M.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=M.textures.getFrame("__WHITE").glTexture;var z=this.gl;z.bindFramebuffer(z.FRAMEBUFFER,null),z.enable(z.SCISSOR_TEST),M.scale.on(u.RESIZE,this.onResize,this),this.resize(D,I)},createTemporaryTextures:function(){for(var M=this.gl,F=0;F0&&D>0;if(z&&w){var G=z[0],R=z[1],O=z[2],B=z[3];w=G!==M||R!==F||O!==L||B!==D}w&&(this.flush(),U.scissor(M,I-F-D,L,D))},resetScissor:function(){var M=this.gl;M.enable(M.SCISSOR_TEST);var F=this.currentScissor;if(F){var L=F[0],D=F[1],I=F[2],U=F[3];I>0&&U>0&&M.scissor(L,this.drawingBufferHeight-D-U,I,U)}},popScissor:function(){var M=this.scissorStack;M.pop();var F=M[M.length-1];F&&this.setScissor(F[0],F[1],F[2],F[3]),this.currentScissor=F},hasActiveStencilMask:function(){var M=this.currentMask.mask,F=this.currentCameraMask.mask;return M&&M.isStencil||F&&F.isStencil},resetViewport:function(){var M=this.gl;M.viewport(0,0,this.width,this.height),this.drawingBufferHeight=M.drawingBufferHeight},setBlendMode:function(M,F){F===void 0&&(F=!1);var L=this.gl,D=this.blendModes[M];return F||M!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==M?(this.flush(),L.enable(L.BLEND),L.blendEquation(D.equation),D.func.length>2?L.blendFuncSeparate(D.func[0],D.func[1],D.func[2],D.func[3]):L.blendFunc(D.func[0],D.func[1]),this.currentBlendMode=M,!0):!1},addBlendMode:function(M,F){var L=this.blendModes.push({func:M,equation:F});return L-1},updateBlendMode:function(M,F,L){return this.blendModes[M]&&(this.blendModes[M].func=F,L&&(this.blendModes[M].equation=L)),this},removeBlendMode:function(M){return M>17&&this.blendModes[M]&&this.blendModes.splice(M,1),this},pushFramebuffer:function(M,F,L,D,I){return M===this.currentFramebuffer?this:(this.fboStack.push(M),this.setFramebuffer(M,F,L,D,I))},setFramebuffer:function(M,F,L,D,I){if(F===void 0&&(F=!1),L===void 0&&(L=!0),D===void 0&&(D=null),I===void 0&&(I=!1),M===this.currentFramebuffer)return this;var U=this.gl,z=this.width,w=this.height;return M&&M.renderTexture&&L?(z=M.renderTexture.width,w=M.renderTexture.height):this.flush(),M?U.bindFramebuffer(U.FRAMEBUFFER,M.webGLFramebuffer):U.bindFramebuffer(U.FRAMEBUFFER,null),L&&U.viewport(0,0,z,w),D&&U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_2D,D.webGLTexture,0),I&&(U.clearColor(0,0,0,0),U.clear(U.COLOR_BUFFER_BIT)),F&&(M?(this.drawingBufferHeight=w,this.pushScissor(0,0,z,w)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=M,this},popFramebuffer:function(M,F){M===void 0&&(M=!1),F===void 0&&(F=!0);var L=this.fboStack;L.pop();var D=L[L.length-1];return D||(D=null),this.setFramebuffer(D,M,F),D},restoreFramebuffer:function(M,F){M===void 0&&(M=!1),F===void 0&&(F=!0);var L=this.fboStack,D=L[L.length-1];D||(D=null),this.currentFramebuffer=null,this.setFramebuffer(D,M,F)},setProgram:function(M){return M!==this.currentProgram?(this.flush(),this.gl.useProgram(M.webGLProgram),this.currentProgram=M,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(M,F,L,D,I){I===void 0&&(I=!1);var U=this.gl,z=U.NEAREST,w=U.NEAREST,G=U.CLAMP_TO_EDGE,R=null;F=M?M.width:F,L=M?M.height:L;var O=h(F,L);if(O&&!I&&(G=U.REPEAT),D===n.ScaleModes.LINEAR&&this.config.antialias){var B=M&&M.compressed,N=!B&&O||B&&M.mipmaps.length>1;z=this.mipmapFilter&&N?this.mipmapFilter:U.LINEAR,w=U.LINEAR}return!M&&typeof F=="number"&&typeof L=="number"?R=this.createTexture2D(0,z,w,G,G,U.RGBA,null,F,L):R=this.createTexture2D(0,z,w,G,G,U.RGBA,M),R},createTexture2D:function(M,F,L,D,I,U,z,w,G,R,O,B){typeof w!="number"&&(w=z?z.width:1),typeof G!="number"&&(G=z?z.height:1);var N=new T(this.gl,M,F,L,D,I,U,z,w,G,R,O,B);return this.glTextureWrappers.push(N),N},createFramebuffer:function(M,F,L,D){this.currentFramebuffer=null;var I=new E(this.gl,M,F,L,D);return this.glFramebufferWrappers.push(I),I},beginBitmapMask:function(M,F){var L=this.gl;L&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==M&&(this.currentMask.mask=M,this.currentMask.camera=F))},drawBitmapMask:function(M,F,L){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),M.renderWebGL(this,M,F),this.maskSource.unbind(!0),this.maskTarget.unbind();var D=this.gl,I=this.getCurrentStencilMask();I?(D.enable(D.STENCIL_TEST),I.mask.applyStencil(this,I.camera,!0)):this.currentMask.mask=null,this.pipelines.set(L),D.activeTexture(D.TEXTURE0),D.bindTexture(D.TEXTURE_2D,this.maskTarget.texture.webGLTexture),D.activeTexture(D.TEXTURE1),D.bindTexture(D.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(M,F){var L=new y(this.gl,M,F);return this.glProgramWrappers.push(L),L},createVertexBuffer:function(M,F){var L=this.gl,D=new m(L,M,L.ARRAY_BUFFER,F);return this.glBufferWrappers.push(D),D},createAttribLocation:function(M,F){var L=new C(this.gl,M,F);return this.glAttribLocationWrappers.push(L),L},createUniformLocation:function(M,F){var L=new A(this.gl,M,F);return this.glUniformLocationWrappers.push(L),L},createIndexBuffer:function(M,F){var L=this.gl,D=new m(L,M,L.ELEMENT_ARRAY_BUFFER,F);return this.glBufferWrappers.push(D),D},deleteTexture:function(M){if(M)return c(this.glTextureWrappers,M),M.destroy(),this},deleteFramebuffer:function(M){return M?(c(this.fboStack,M),c(this.glFramebufferWrappers,M),M.destroy(),this):this},deleteProgram:function(M){return M&&(c(this.glProgramWrappers,M),M.destroy()),this},deleteAttribLocation:function(M){return M&&(c(this.glAttribLocationWrappers,M),M.destroy()),this},deleteUniformLocation:function(M){return M&&(c(this.glUniformLocationWrappers,M),M.destroy()),this},deleteBuffer:function(M){return M?(c(this.glBufferWrappers,M),M.destroy(),this):this},preRenderCamera:function(M){var F=M.x,L=M.y,D=M.width,I=M.height,U=M.backgroundColor;if(M.emit(a.PRE_RENDER,M),this.pipelines.preBatchCamera(M),this.pushScissor(F,L,D,I),M.mask&&(this.currentCameraMask.mask=M.mask,this.currentCameraMask.camera=M._maskCamera,M.mask.preRenderWebGL(this,M,M._maskCamera)),U.alphaGL>0){var z=this.pipelines.setMulti();z.drawFillRect(F,L,D,I,g.getTintFromFloats(U.blueGL,U.greenGL,U.redGL,1),U.alphaGL)}},getCurrentStencilMask:function(){var M=null,F=this.maskStack,L=this.currentCameraMask;return F.length>0?M=F[F.length-1]:L.mask&&L.mask.isStencil&&(M=L),M},postRenderCamera:function(M){var F=M.flashEffect,L=M.fadeEffect;if(F.isRunning||L.isRunning||L.isComplete){var D=this.pipelines.setMulti();F.postRenderWebGL(D,g.getTintFromFloats),L.postRenderWebGL(D,g.getTintFromFloats)}M.dirty=!1,this.popScissor(),M.mask&&(this.currentCameraMask.mask=null,M.mask.postRenderWebGL(this,M._maskCamera)),this.pipelines.postBatchCamera(M),M.emit(a.POST_RENDER,M)},preRender:function(){if(!this.contextLost){var M=this.gl;if(M.bindFramebuffer(M.FRAMEBUFFER,null),this.config.clearBeforeRender){var F=this.config.backgroundColor;M.clearColor(F.redGL,F.greenGL,F.blueGL,F.alphaGL),M.clear(M.COLOR_BUFFER_BIT|M.DEPTH_BUFFER_BIT|M.STENCIL_BUFFER_BIT)}M.enable(M.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&M.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(M,F,L){if(!this.contextLost){var D=F.length;if(this.emit(s.RENDER,M,L),this.preRenderCamera(L),D===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(L);return}this.currentType="";for(var I=this.currentMask,U=0;U{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95428),a=t(95540),r=t(14500),n=new d({initialize:function(s,h,i,o,f){this.pipeline=s,this.name=h,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(f),this.createUniforms()},createAttributes:function(e){var s=0,h=0,i=[];this.vertexComponentCount=0;for(var o=0;o=0?(s.enableVertexAttribArray(E.webGLAttribLocation),s.vertexAttribPointer(E.webGLAttribLocation,v,g,T,i,x),u.enabled=!0,u.location=E):E.webGLAttribLocation!==-1&&s.disableVertexAttribArray(E.webGLAttribLocation)}else m?s.vertexAttribPointer(y.webGLAttribLocation,v,g,T,i,x):!m&&y!==-1&&y.webGLAttribLocation>-1&&(s.disableVertexAttribArray(y.webGLAttribLocation),u.location=-1)}return this},createUniforms:function(){var e=this.gl,s=this.program,h=this.uniforms,i,o,f,l=e.getProgramParameter(s.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i0&&(o=o.substr(0,v),h.hasOwnProperty(o)||(f=this.renderer.createUniformLocation(s,o),f!==null&&(h[o]={name:o,location:f,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 h=this.uniforms[s];h.setter&&h.setter.call(e,h.location.webGLUniformLocation,h.value1,h.value2,h.value3,h.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,h,i){var o=this.uniforms[s];return o?((i||o.value1!==h)&&(o.setter||(o.setter=e),o.value1=h,this.renderer.setProgram(this.program),e.call(this.gl,o.location.webGLUniformLocation,h),this.pipeline.currentShader=this),this):this},setUniform2:function(e,s,h,i,o){var f=this.uniforms[s];return f?((o||f.value1!==h||f.value2!==i)&&(f.setter||(f.setter=e),f.value1=h,f.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,h,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,s,h,i,o,f){var l=this.uniforms[s];return l?((f||l.value1!==h||l.value2!==i||l.value3!==o)&&(l.setter||(l.setter=e),l.value1=h,l.value2=i,l.value3=o,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,h,i,o),this.pipeline.currentShader=this),this):this},setUniform4:function(e,s,h,i,o,f,l){var u=this.uniforms[s];return u?((l||u.value1!==h||u.value2!==i||u.value3!==o||u.value4!==f)&&(u.setter||(u.setter=e),u.value1=h,u.value2=i,u.value3=o,u.value4=f,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,h,i,o,f),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,h){return this.setUniform2(this.gl.uniform2f,e,s,h)},set3f:function(e,s,h,i){return this.setUniform3(this.gl.uniform3f,e,s,h,i)},set4f:function(e,s,h,i,o){return this.setUniform4(this.gl.uniform4f,e,s,h,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,h){return this.setUniform2(this.gl.uniform2i,e,s,h)},set3i:function(e,s,h,i){return this.setUniform3(this.gl.uniform3i,e,s,h,i)},set4i:function(e,s,h,i,o){return this.setUniform4(this.gl.uniform4i,e,s,h,i,o)},setMatrix2fv:function(e,s,h){return this.setUniform2(this.gl.uniformMatrix2fv,e,s,h,!0)},setMatrix3fv:function(e,s,h){return this.setUniform2(this.gl.uniformMatrix3fv,e,s,h,!0)},setMatrix4fv:function(e,s,h){return this.setUniform2(this.gl.uniformMatrix4fv,e,s,h,!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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14500),c=t(79291),a={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};a=c(!1,a,d),p.exports=a},31302:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(78908),r=t(85191),n=t(14500),e=t(29100),s=new d({Extends:e,initialize:function(i){i.fragShader=c(i,"fragShader",a),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(h,i){e.prototype.resize.call(this,h,i),this.set2f("uResolution",h,i)},beginMask:function(h,i,o){this.renderer.beginBitmapMask(h,o)},endMask:function(h,i,o){var f=this.gl,l=this.renderer,u=h.bitmapMask;u&&f&&(l.drawBitmapMask(u,i,this),o&&this.set2f("uResolution",o.width,o.height),this.set1i("uInvertMaskAlpha",h.invertAlpha),f.drawArrays(this.topology,0,3),o&&this.set2f("uResolution",this.width,this.height),f.bindTexture(f.TEXTURE_2D,null))}});p.exports=s},92651:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(58918),a=t(14811),r=t(95540),n=t(43558),e=t(89350),s=t(70554),h=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 f=this.game;this.glow=new c.Glow(f),this.shadow=new c.Shadow(f),this.pixelate=new c.Pixelate(f),this.vignette=new c.Vignette(f),this.shine=new c.Shine(f),this.gradient=new c.Gradient(f),this.circle=new c.Circle(f),this.barrel=new c.Barrel(f),this.wipe=new c.Wipe(f),this.bokeh=new c.Bokeh(f);var l=[];l[a.GLOW]=this.onGlow,l[a.SHADOW]=this.onShadow,l[a.PIXELATE]=this.onPixelate,l[a.VIGNETTE]=this.onVignette,l[a.SHINE]=this.onShine,l[a.BLUR]=this.onBlur,l[a.GRADIENT]=this.onGradient,l[a.BLOOM]=this.onBloom,l[a.COLOR_MATRIX]=this.onColorMatrix,l[a.CIRCLE]=this.onCircle,l[a.BARREL]=this.onBarrel,l[a.DISPLACEMENT]=this.onDisplacement,l[a.WIPE]=this.onWipe,l[a.BOKEH]=this.onBokeh,this.fxHandlers=l,this.source,this.target,this.swap},onDraw:function(i,o,f){this.source=i,this.target=o,this.swap=f;var l=i.width,u=i.height,v=this.tempSprite,g=this.fxHandlers;if(v&&v.preFX)for(var x=v.preFX.list,m=0;m{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(31063),r=t(57516),n=t(61340),e=t(26099),s=t(29100),h=new d({Extends:r,initialize:function(o){var f=c(o,"fragShader",a);o.fragShader=f.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 f=i.sys.lights;if(this.lightsActive=!1,!(!f||!f.active)){var l=f.getLights(o),u=l.length;this.lightsActive=!0;var v,g=this.renderer,x=g.height,m=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",f.ambientColor.r,f.ambientColor.g,f.ambientColor.b),this.set1i("uLightCount",u),v=0;v0&&this.flush();var o=this.inverseRotationMatrix;if(i){var f=-i,l=Math.cos(f),u=Math.sin(f);o[1]=u,o[3]=-u,o[0]=o[4]=l}else o[0]=o[4]=1,o[1]=o[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,o),this.currentNormalMapRotation=i}},setTexture2D:function(i,o){var f=this.renderer;i===void 0&&(i=f.whiteTexture);var l=this.getNormalMap(o);this.isNewNormalMap(i,l)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(l),this.currentNormalMap=l);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.setNormalMapRotation(u),0},setGameObject:function(i,o){o===void 0&&(o=i.frame);var f=o.glTexture,l=this.getNormalMap(i);if(this.isNewNormalMap(f,l)&&(this.flush(),this.createBatch(f),this.addTextureToBatch(l),this.currentNormalMap=l),i.parentContainer){var u=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(u.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return 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.normalMap;return o?o.glTexture:this.renderer.normalMap},batchSprite:function(i,o,f){this.lightsActive&&r.prototype.batchSprite.call(this,i,o,f)},batchTexture:function(i,o,f,l,u,v,g,x,m,y,T,E,C,A,P,M,F,L,D,I,U,z,w,G,R,O,B,N,X,V,Y,W){this.lightsActive&&r.prototype.batchTexture.call(this,i,o,f,l,u,v,g,x,m,y,T,E,C,A,P,M,F,L,D,I,U,z,w,G,R,O,B,N,X,V,Y,W)},batchTextureFrame:function(i,o,f,l,u,v,g){this.lightsActive&&r.prototype.batchTextureFrame.call(this,i,o,f,l,u,v,g)}});p.exports=h},56527:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(57516),r=t(45561),n=t(60722),e=t(14500),s=t(29100),h=new d({Extends:a,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",a.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),this.set1i("uRoundPixels",i.config.roundPixels)}});p.exports=h},57516:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(94811),a=t(95540),r=t(98840),n=t(44667),e=t(61340),s=t(70554),h=t(14500),i=t(29100),o=new d({Extends:i,initialize:function(l){var u=l.game.renderer,v=a(l,"fragShader",r);l.fragShader=s.parseFragmentShaderMaxTextures(v,u.maxTextures),l.vertShader=a(l,"vertShader",n),l.attributes=a(l,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),l.resizeUniform="uResolution",i.call(this,l),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 f=this.renderer;this.set1iv("uMainSampler",f.textureIndexes),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)},batchSprite:function(f,l,u){this.manager.set(this,f);var v=this._tempMatrix1,g=this._tempMatrix2,x=this._tempMatrix3,m=f.frame,y=m.glTexture,T=m.u0,E=m.v0,C=m.u1,A=m.v1,P=m.x,M=m.y,F=m.cutWidth,L=m.cutHeight,D=m.customPivot,I=f.displayOriginX,U=f.displayOriginY,z=-I+P,w=-U+M;if(f.isCropped){var G=f._crop;(G.flipX!==f.flipX||G.flipY!==f.flipY)&&m.updateCropUVs(G,f.flipX,f.flipY),T=G.u0,E=G.v0,C=G.u1,A=G.v1,F=G.width,L=G.height,P=G.x,M=G.y,z=-I+P,w=-U+M}var R=1,O=1;f.flipX&&(D||(z+=-m.realWidth+I*2),R=-1),(f.flipY||m.source.isGLTexture&&m.source.isRenderTexture&&!y.flipY)&&(D||(w+=-m.realHeight+U*2),O=-1);var B=f.x,N=f.y;g.applyITRS(B,N,f.rotation,f.scaleX*R,f.scaleY*O),v.copyFrom(l.matrix),u?(v.multiplyWithOffset(u,-l.scrollX*f.scrollFactorX,-l.scrollY*f.scrollFactorY),g.e=B,g.f=N):(g.e-=l.scrollX*f.scrollFactorX,g.f-=l.scrollY*f.scrollFactorY),v.multiply(g,x);var X=x.setQuad(z,w,z+F,w+L),V=s.getTintAppendFloatAlpha,Y=l.alpha,W=V(f.tintTopLeft,Y*f._alphaTL),H=V(f.tintTopRight,Y*f._alphaTR),b=V(f.tintBottomLeft,Y*f._alphaBL),K=V(f.tintBottomRight,Y*f._alphaBR);this.shouldFlush(6)&&this.flush();var J=this.setGameObject(f,m);this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",l.roundPixels),this.batchQuad(f,X[0],X[1],X[2],X[3],X[4],X[5],X[6],X[7],T,E,C,A,W,H,b,K,f.tintFill,y,J),this.manager.postBatch(f)},batchTexture:function(f,l,u,v,g,x,m,y,T,E,C,A,P,M,F,L,D,I,U,z,w,G,R,O,B,N,X,V,Y,W,H,b,K){K===void 0&&(K=!1),this.manager.set(this,f);var J=this._tempMatrix1,Z=this._tempMatrix2,$=this._tempMatrix3,q=I/u+X,tt=U/v+V,_=(I+z)/u+X,Q=(U+w)/v+V,k=m,j=y,et=-L,it=-D;if(f.isCropped){var ht=f._crop,ot=ht.width,nt=ht.height;k=ot,j=nt,m=ot,y=nt,I=ht.x,U=ht.y;var st=I,ut=U;A&&(st=z-ht.x-ot),P&&(ut=w-ht.y-nt),q=st/u+X,tt=ut/v+V,_=(st+ot)/u+X,Q=(ut+nt)/v+V,et=-L+I,it=-D+U}P=P^(!H&&l.isRenderTexture?1:0),A&&(k*=-1,et+=m),P&&(j*=-1,it+=y),Z.applyITRS(g,x,C,T,E),J.copyFrom(Y.matrix),W?(J.multiplyWithOffset(W,-Y.scrollX*M,-Y.scrollY*F),Z.e=g,Z.f=x):(Z.e-=Y.scrollX*M,Z.f-=Y.scrollY*F),J.multiply(Z,$);var rt=$.setQuad(et,it,et+k,it+j);b==null&&(b=this.setTexture2D(l)),f&&!K&&this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",Y.roundPixels),this.batchQuad(f,rt[0],rt[1],rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],q,tt,_,Q,G,R,O,B,N,l,b),f&&!K&&this.manager.postBatch(f)},batchTextureFrame:function(f,l,u,v,g,x,m){this.manager.set(this);var y=this._tempMatrix1.copyFrom(x),T=this._tempMatrix2;m?y.multiply(m,T):T=y;var E=T.setQuad(l,u,l+f.width,u+f.height),C=this.setTexture2D(f.source.glTexture);v=s.getTintAppendFloatAlpha(v,g),this.batchQuad(null,E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],f.u0,f.v0,f.u1,f.v1,v,v,v,v,0,f.glTexture,C)},batchFillRect:function(f,l,u,v,g,x){this.renderer.pipelines.set(this);var m=this.calcMatrix;x&&x.multiply(g,m);var y=m.setQuad(f,l,f+u,l+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(f,l,u,v,g,x,m,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(m,T);var E=T.getX(f,l),C=T.getY(f,l),A=T.getX(u,v),P=T.getY(u,v),M=T.getX(g,x),F=T.getY(g,x),L=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,E,C,A,P,M,F,0,0,1,1,L.TL,L.TR,L.BL,2)},batchStrokeTriangle:function(f,l,u,v,g,x,m,y,T){var E=this.tempTriangle;E[0].x=f,E[0].y=l,E[0].width=m,E[1].x=u,E[1].y=v,E[1].width=m,E[2].x=g,E[2].y=x,E[2].width=m,E[3].x=f,E[3].y=l,E[3].width=m,this.batchStrokePath(E,m,!1,y,T)},batchFillPath:function(f,l,u){this.renderer.pipelines.set(this);var v=this.calcMatrix;u&&u.multiply(l,v);for(var g=f.length,x=this.polygonCache,m,y,T=this.fillTint.TL,E=this.fillTint.TR,C=this.fillTint.BL,A=0;A0&&k[4]?this.batchQuad(null,J,Z,W,H,k[0],k[1],k[2],k[3],0,0,1,1,q,tt,_,Q,2):(j[0]=J,j[1]=Z,j[2]=W,j[3]=H,j[4]=1),T&&j[4]?this.batchQuad(null,V,Y,b,K,j[0],j[1],j[2],j[3],0,0,1,1,q,tt,_,Q,2):(k[0]=V,k[1]=Y,k[2]=b,k[3]=K,k[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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(4127),r=t(89924),n=t(29100),e=new d({Extends:n,initialize:function(h){h.vertShader=c(h,"vertShader",r),h.fragShader=c(h,"fragShader",a),h.attributes=c(h,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,h)},onRender:function(s,h){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",h.zoom)},batchPointLight:function(s,h,i,o,f,l,u,v,g,x,m,y){var T=s.color,E=s.intensity,C=s.radius,A=s.attenuation,P=T.r*E,M=T.g*E,F=T.b*E,L=h.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,o,m,y,C,A,P,M,F,L),this.batchLightVert(f,l,m,y,C,A,P,M,F,L),this.batchLightVert(u,v,m,y,C,A,P,M,F,L),this.batchLightVert(i,o,m,y,C,A,P,M,F,L),this.batchLightVert(u,v,m,y,C,A,P,M,F,L),this.batchLightVert(g,x,m,y,C,A,P,M,F,L),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,h,i,o,f,l,u,v,g,x){var m=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;m[++y]=s,m[++y]=h,m[++y]=i,m[++y]=o,m[++y]=f,m[++y]=l,m[++y]=u,m[++y]=v,m[++y]=g,m[++y]=x,this.vertexCount++}});p.exports=e},84057:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(89422),a=t(95540),r=t(27681),n=t(49627),e=t(29100),s=new d({Extends:e,initialize:function(i){i.renderTarget=a(i,"renderTarget",1),i.fragShader=a(i,"fragShader",r),i.vertShader=a(i,"vertShader",n),i.attributes=a(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 h=this.manager.UTILITY_PIPELINE;this.fullFrame1=h.fullFrame1,this.fullFrame2=h.fullFrame2,this.halfFrame1=h.halfFrame1,this.halfFrame2=h.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height),this.set1i("uRoundPixels",i.config.roundPixels);for(var o=this.renderTargets,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c=t(67502),a=t(83419),r=t(96293),n=t(95540),e=t(57516),s=t(27681),h=t(87841),i=t(32302),o=t(45561),f=t(60722),l=t(29100),u=new a({Extends:e,initialize:function(g){var x=n(g,"fragShader",s),m=n(g,"vertShader",f),y=n(g,"drawShader",s),T=[{name:"DrawSprite",fragShader:o,vertShader:f},{name:"CopySprite",fragShader:x,vertShader:m},{name:"DrawGame",fragShader:y,vertShader:f},{name:"ColorMatrix",fragShader:r}],E=n(g,"shaders",[]);g.shaders=T.concat(E),g.vertShader||(g.vertShader=m),g.batchSize=1,e.call(this,g),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){l.prototype.boot.call(this);var v=this.shaders,g=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(g,g.width,g.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=g.createVertexBuffer(x,this.gl.STATIC_DRAW),this.onResize(g.width,g.height),this.currentShader=this.copyShader,this.set2f("uResolution",g.width,g.height),this.set1i("uRoundPixels",g.config.roundPixels)},onResize:function(v,g){var x=this.quadVertexViewF32;x[1]=g,x[22]=g,x[14]=v,x[28]=v,x[35]=v,x[36]=g},batchQuad:function(v,g,x,m,y,T,E,C,A,P,M,F,L,D,I,U,z,w,G){var R=Math.min(g,m,T,C),O=Math.min(x,y,E,A),B=Math.max(g,m,T,C),N=Math.max(x,y,E,A),X=B-R,V=N-O,Y=this.spriteBounds.setTo(R,O,X,V),W=v?v.preFX.padding:0,H=X+W*2,b=V+W*2,K=Math.abs(Math.max(H,b)),J=this.manager.getRenderTarget(K),Z=this.targetBounds.setTo(0,0,J.width,J.height);c(Z,Y.centerX,Y.centerY),this.tempSprite=v;var $=this.gl,q=this.renderer;q.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",q.width,q.height),this.set1i("uRoundPixels",q.config.roundPixels),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,J),v.preFX.onFX(this));var tt=this.fsTarget;return this.flush(),$.viewport(0,0,q.width,q.height),$.bindFramebuffer($.FRAMEBUFFER,tt.framebuffer.webGLFramebuffer),$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,tt.texture.webGLTexture,0),$.clearColor(0,0,0,0),$.clear($.COLOR_BUFFER_BIT),this.setTexture2D(G),this.batchVert(g,x,P,M,0,w,D),this.batchVert(m,y,P,L,0,w,U),this.batchVert(T,E,F,L,0,w,z),this.batchVert(g,x,P,M,0,w,D),this.batchVert(T,E,F,L,0,w,z),this.batchVert(C,A,F,M,0,w,I),this.flush(),this.flipProjectionMatrix(!1),$.activeTexture($.TEXTURE0),$.bindTexture($.TEXTURE_2D,J.texture.webGLTexture),$.copyTexSubImage2D($.TEXTURE_2D,0,0,0,Z.x,Z.y,Z.width,Z.height),$.bindFramebuffer($.FRAMEBUFFER,null),$.bindTexture($.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(J,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,g,x,m,y,T,E){x===void 0&&(x=!0),m===void 0&&(m=!0),y===void 0&&(y=!1),E===void 0&&(E=this.copyShader);var C=this.gl,A=this.tempSprite;T&&(E=this.colorMatrixShader),this.currentShader=E;var P=this.setVertexBuffer(this.quadVertexBuffer);E.bind(P,!1);var M=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",M.width,M.height),this.set1i("uRoundPixels",M.config.roundPixels),A.preFX.onFXCopy(this),this.onCopySprite(v,g,A),T&&(this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha)),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,v.texture.webGLTexture),v.height>g.height)C.viewport(0,0,v.width,v.height),this.setTargetUVs(v,g);else{var F=g.height-v.height;C.viewport(0,F,v.width,v.height),this.resetUVs()}if(C.bindFramebuffer(C.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,g.texture.webGLTexture,0),x&&(C.clearColor(0,0,0,+!m),C.clear(C.COLOR_BUFFER_BIT)),y){var L=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}C.bufferData(C.ARRAY_BUFFER,this.quadVertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),y&&this.renderer.setBlendMode(L),C.bindFramebuffer(C.FRAMEBUFFER,null)},copy:function(v,g){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,g.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,g.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,g,x,m,y){this.manager.blendFrames(v,g,x,m,y)},blendFramesAdditive:function(v,g,x,m,y){this.manager.blendFramesAdditive(v,g,x,m,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 g=this.gl,x=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var m=this._tempMatrix1.loadIdentity(),y=this.targetBounds.x,T=this.targetBounds.y,E=y+v.width,C=T+v.height,A=m.getX(y,T),P=m.getX(y,C),M=m.getX(E,C),F=m.getX(E,T),L=m.getY(y,T),D=m.getY(y,C),I=m.getY(E,C),U=m.getY(E,T),z=16777215;this.batchVert(A,L,0,0,0,0,z),this.batchVert(P,D,0,1,0,0,z),this.batchVert(M,I,1,1,0,0,z),this.batchVert(A,L,0,0,0,0,z),this.batchVert(M,I,1,1,0,0,z),this.batchVert(F,U,1,0,0,0,z),x.restoreFramebuffer(!1,!0),x.currentFramebuffer||g.viewport(0,0,x.width,x.height),x.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,g,x,m,y,T,E,C){var A=this.quadVertexViewF32;A[2]=v,A[3]=g,A[9]=x,A[10]=m,A[16]=y,A[17]=T,A[23]=v,A[24]=g,A[30]=y,A[31]=T,A[37]=E,A[38]=C},setTargetUVs:function(v,g){var x=g.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(57516),r=new d({Extends:a,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),a.call(this,e)}});p.exports=r},12385:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(57516),r=t(45561),n=t(60722),e=t(29100),s=new d({Extends:a,initialize:function(i){i.fragShader=c(i,"fragShader",r),i.vertShader=c(i,"vertShader",n),i.forceZero=!0,a.call(this,i)},boot:function(){e.prototype.boot.call(this);var h=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",h.width,h.height),this.set1i("uRoundPixels",h.config.roundPixels)}});p.exports=s},7589:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35407),c=t(10312),a=t(83419),r=t(89422),n=t(96293),e=t(36682),s=t(95540),h=t(48247),i=t(49627),o=t(29100),f=new a({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:h},{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 l=this.shaders,u=this.renderTargets;this.copyShader=l[0],this.addShader=l[1],this.linearShader=l[2],this.colorMatrixShader=l[3],this.fullFrame1=u[0],this.fullFrame2=u[1],this.halfFrame1=u[2],this.halfFrame2=u[3]},copyFrame:function(l,u,v,g,x){v===void 0&&(v=1),g===void 0&&(g=!0),x===void 0&&(x=!0);var m=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,l.texture.webGLTexture),u?(m.viewport(0,0,u.width,u.height),m.bindFramebuffer(m.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,u.texture.webGLTexture,0)):m.viewport(0,0,l.width,l.height),g&&(x?m.clearColor(0,0,0,0):m.clearColor(0,0,0,1),m.clear(m.COLOR_BUFFER_BIT)),m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.STATIC_DRAW),m.drawArrays(m.TRIANGLES,0,6),m.bindFramebuffer(m.FRAMEBUFFER,null),m.bindTexture(m.TEXTURE_2D,null)},blitFrame:function(l,u,v,g,x,m,y){v===void 0&&(v=1),g===void 0&&(g=!0),x===void 0&&(x=!0),m===void 0&&(m=!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,l.texture.webGLTexture),l.height>u.height)T.viewport(0,0,l.width,l.height),this.setTargetUVs(l,u);else{var E=u.height-l.height;T.viewport(0,E,l.width,l.height)}if(T.bindFramebuffer(T.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,u.texture.webGLTexture,0),g&&(x?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT)),m){var C=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),m&&this.renderer.setBlendMode(C),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(l,u,v,g,x,m,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var E=this.gl;E.bindFramebuffer(E.FRAMEBUFFER,l.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,l.texture.webGLTexture,0),y&&(T?E.clearColor(0,0,0,0):E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,u.texture.webGLTexture),E.copyTexSubImage2D(E.TEXTURE_2D,0,0,0,v,g,x,m),E.bindFramebuffer(E.FRAMEBUFFER,null),E.bindTexture(E.TEXTURE_2D,null)},copyToGame:function(l){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,l.texture.webGLTexture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6)},drawFrame:function(l,u,v,g){v===void 0&&(v=!0),g===void 0&&(g=this.colorMatrix);var x=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",g.getData()),this.set1f("uAlpha",g.alpha),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,l.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,l.width,l.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(l,u,v,g,x,m){g===void 0&&(g=1),x===void 0&&(x=!0),m===void 0&&(m=this.linearShader);var y=this.gl;this.setShader(m),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",g),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,l.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,l.width,l.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(l,u,v,g,x){this.blendFrames(l,u,v,g,x,this.addShader)},clearFrame:function(l,u){u===void 0&&(u=!0);var v=this.gl;v.viewport(0,0,l.width,l.height),v.bindFramebuffer(v.FRAMEBUFFER,l.framebuffer.webGLFramebuffer),u?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var g=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,g.webGLFramebuffer)},setUVs:function(l,u,v,g,x,m,y,T){var E=this.vertexViewF32;E[2]=l,E[3]=u,E[6]=v,E[7]=g,E[10]=x,E[11]=m,E[14]=l,E[15]=u,E[18]=x,E[19]=m,E[22]=y,E[23]=T},setTargetUVs:function(l,u){var v=u.height/l.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=f},36060:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineafterflush"},36712:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinebeforeflush"},40285:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinebind"},65918:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineboot"},92852:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinedestroy"},56072:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinerebind"},57566:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineresize"},77085:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(99155),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(24400),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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,h=this.fullFrame2;this.copyFrame(n,h);for(var i=2/n.width*e.offsetX,o=2/n.height*e.offsetY,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(41514),a=t(51078),r=t(94328),n=t(84057),e=new d({Extends:n,initialize:function(h){n.call(this,{game:h,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:a},{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 h=this.getController(),i=this.gl,o=this.fullFrame1,f=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[h.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",h.strength),this.set3fv("color",h.glcolor);for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(90610),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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,h){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&&h&&this.set2f("resolution",s,h,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(91899),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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,h){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&&h&&this.set2f("resolution",s,h,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(84057),a=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=a},63563:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(47838),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=t(98656),r=t(84057),n=t(70554),e=new d({Extends:r,initialize:function(h,i){var o=c(i,"quality",.1),f=c(i,"distance",10);r.call(this,{game:h,fragShader:n.setGlowQuality(a,h,o,f)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,h,i,o){s=this.getController(s),this.set1f("outerStrength",s.outerStrength,h),this.set1f("innerStrength",s.innerStrength,h),this.set4fv("glowColor",s.glcolor,h),this.setBoolean("knockout",s.knockout,h),i&&o&&this.set2f("resolution",i,o,h)},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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(70463),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50831),a=t(84057),r=new d({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,s,h){n=this.getController(n),this.set1f("amount",n.amount,e),s&&h&&this.set2f("resolution",s,h,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(92595),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(72464),a=t(84057),r=new d({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,s,h){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&&h&&this.set2f("resolution",s,h,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(39249),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(2878),a=t(84057),r=new d({Extends:a,initialize:function(e){a.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,h=n.wipeWidth,i=n.direction,o=n.axis;this.set4f("config",s,h,i,o,e),this.setBoolean("reveal",n.reveal,e)}});p.exports=r},58918:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36060),c=t(79291),a={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)};a=c(!1,a,d),p.exports=a},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 int uRoundPixels;","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);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.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 int uRoundPixels;","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);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.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 int uRoundPixels;","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);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},89350:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @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-2024 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 a=this.gl;a.isContextLost()||(this.webGLAttribLocation=a.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-2024 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 a=this.gl;if(!a.isContextLost()){var r=this.bufferType,n=a.createBuffer();this.webGLBuffer=n,a.bindBuffer(r,this.webGLBuffer),a.bufferData(r,this.initialDataOrSize,this.bufferUsage),a.bindBuffer(r,null)}}},destroy:function(){var a=this.gl;a.isContextLost()||a.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-2024 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"},a=new d({initialize:function(n,e,s,h,i){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=s,this.renderTexture=h,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 h=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,h),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,h)}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=a},1482:(p,S,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 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 a=this.gl;if(!a.isContextLost()){var r=a.createProgram(),n=a.createShader(a.VERTEX_SHADER),e=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(n,this.vertexSource),a.shaderSource(e,this.fragmentSource),a.compileShader(n),a.compileShader(e);var s=`Shader failed: +`;if(!a.getShaderParameter(n,a.COMPILE_STATUS))throw new Error("Vertex "+s+a.getShaderInfoLog(n));if(!a.getShaderParameter(e,a.COMPILE_STATUS))throw new Error("Fragment "+s+a.getShaderInfoLog(e));if(a.attachShader(r,n),a.attachShader(r,e),a.linkProgram(r),!a.getProgramParameter(r,a.LINK_STATUS))throw new Error("Link "+s+a.getProgramInfoLog(r));a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50030),a=new d({initialize:function(n,e,s,h,i,o,f,l,u,v,g,x,m){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=s,this.magFilter=h,this.wrapT=i,this.wrapS=o,this.format=f,this.pixels=l,this.width=u,this.height=v,this.pma=g??!0,this.forceSize=!!x,this.flipY=!!m,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof a){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();r.activeTexture(r.TEXTURE0);var e=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,n),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),this.flipY&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0);var s=this.pixels,h=this.mipLevel,i=this.width,o=this.height,f=this.format,l=!1;if(s==null)r.texImage2D(r.TEXTURE_2D,h,f,i,o,0,f,r.UNSIGNED_BYTE,null),l=c(i,o);else if(s.compressed){i=s.width,o=s.height,l=s.generateMipmap;for(var u=0;u{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 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 a=this.gl;a.isContextLost()||(this.webGLUniformLocation=a.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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13560),c=t(83419),a=t(50792),r=t(97480),n=t(8443),e=t(57811),s=t(74403),h=t(45818),i=t(29747),o=t(87841),f=t(86555),l=t(56583),u=t(26099),v=t(38058),g=new c({Extends:a,initialize:function(m){a.call(this),this.game=m,this.canvas,this.canvasBounds=new o,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 u(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:i,windowResize:i,fullScreenChange:i,fullScreenError:i}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var x=this.game;this.canvas=x.canvas,this.fullscreen=x.device.fullscreen,this.scaleMode!==d.SCALE_MODE.RESIZE&&this.scaleMode!==d.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===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()),x.events.on(n.PRE_STEP,this.step,this),x.events.once(n.READY,this.refresh,this),x.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(x){this.getParent(x),this.getParentBounds();var m=x.width,y=x.height,T=x.scaleMode,E=x.zoom,C=x.autoRound;if(typeof m=="string")if(m.substr(-1)!=="%")m=parseInt(m,10);else{var A=this.parentSize.width;A===0&&(A=window.innerWidth);var P=parseInt(m,10)/100;m=Math.floor(A*P)}if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var M=this.parentSize.height;M===0&&(M=window.innerHeight);var F=parseInt(y,10)/100;y=Math.floor(M*F)}this.scaleMode=T,this.autoRound=C,this.autoCenter=x.autoCenter,this.resizeInterval=x.resizeInterval,C&&(m=Math.floor(m),y=Math.floor(y)),this.gameSize.setSize(m,y),E===d.ZOOM.MAX_ZOOM&&(E=this.getMaxZoom()),this.zoom=E,E!==1&&(this._resetZoom=!0),this.baseSize.setSize(m,y),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),x.minWidth>0&&this.displaySize.setMin(x.minWidth*E,x.minHeight*E),x.maxWidth>0&&this.displaySize.setMax(x.maxWidth*E,x.maxHeight*E),this.displaySize.setSize(m,y),(x.snapWidth>0||x.snapHeight>0)&&this.displaySize.setSnap(x.snapWidth,x.snapHeight),this.orientation=h(m,y)},getParent:function(x){var m=x.parent;if(m!==null){if(this.parent=s(m),this.parentIsWindow=this.parent===document.body,x.expandParent&&x.scaleMode!==d.SCALE_MODE.NONE){var y=this.parent.getBoundingClientRect();(this.parentIsWindow||y.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",y=this.parent.getBoundingClientRect(),!this.parentIsWindow&&y.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}x.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=s(x.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var x=this.parentSize,m=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(m.height=e(!0));var y=m.width,T=m.height;if(x.width!==y||x.height!==T)return x.setSize(y,T),!0;if(this.canvas){var E=this.canvasBounds,C=this.canvas.getBoundingClientRect();if(C.x!==E.x||C.y!==E.y)return!0}return!1},lockOrientation:function(x){var m=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return m?m.call(screen,x):!1},setParentSize:function(x,m){return this.parentSize.setSize(x,m),this.refresh()},setGameSize:function(x,m){var y=this.autoRound;y&&(x=Math.floor(x),m=Math.floor(m));var T=this.width,E=this.height;return this.gameSize.resize(x,m),this.baseSize.resize(x,m),y&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(x/m),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(T,E)},resize:function(x,m){var y=this.zoom,T=this.autoRound;T&&(x=Math.floor(x),m=Math.floor(m));var E=this.width,C=this.height;this.gameSize.resize(x,m),this.baseSize.resize(x,m),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(x*y,m*y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var A=this.canvas.style,P=x*y,M=m*y;return T&&(P=Math.floor(P),M=Math.floor(M)),(P!==x||M!==m)&&(A.width=P+"px",A.height=M+"px"),this.refresh(E,C)},setZoom:function(x){return this.zoom=x,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(x,m){return x===void 0&&(x=0),m===void 0&&(m=x),this.displaySize.setSnap(x,m),this.refresh()},refresh:function(x,m){x===void 0&&(x=this.width),m===void 0&&(m=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var y=this.game.domContainer;if(y){this.baseSize.setCSS(y);var T=this.canvas.style,E=y.style;E.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",E.marginLeft=T.marginLeft,E.marginTop=T.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,x,m),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var x=h(this.width,this.height);x!==this.orientation&&(this.orientation=x,this.emit(r.ORIENTATION_CHANGE,x))}},updateScale:function(){var x=this.canvas.style,m=this.gameSize.width,y=this.gameSize.height,T,E,C=this.zoom,A=this.autoRound;if(this.scaleMode===d.SCALE_MODE.NONE)this.displaySize.setSize(m*C,y*C),T=this.displaySize.width,E=this.displaySize.height,A&&(T=Math.floor(T),E=Math.floor(E)),this._resetZoom&&(x.width=T+"px",x.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),T=this.displaySize.width,E=this.displaySize.height,A&&(T=Math.floor(T),E=Math.floor(E)),this.canvas.width=T,this.canvas.height=E;else if(this.scaleMode===d.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),T=this.displaySize.width,E=this.displaySize.height,A&&(T=Math.floor(T),E=Math.floor(E)),x.width=T+"px",x.height=E+"px";var P=this.parentSize.width/this.gameSize.width,M=this.parentSize.height/this.gameSize.height;P=0?0:-(E.x*C.x),P=E.y>=0?0:-(E.y*C.y),M;T.width>=E.width?M=y.width:M=y.width-(E.width-T.width)*C.x;var F;return T.height>=E.height?F=y.height:F=y.height-(E.height-T.height)*C.y,m.setTo(A,P,M,F),x&&(m.width/=x.zoomX,m.height/=x.zoomY,m.centerX=x.centerX+x.scrollX,m.centerY=x.centerY+x.scrollY),m},step:function(x,m){this.parent&&(this._lastCheck+=m,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var x=this.domlisteners;window.removeEventListener("orientationchange",x.orientationChange,!1),window.removeEventListener("resize",x.windowResize,!1);var m=["webkit","moz",""];m.forEach(function(y){document.removeEventListener(y+"fullscreenchange",x.fullScreenChange,!1),document.removeEventListener(y+"fullscreenerror",x.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",x.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",x.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=g},64743:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},81050:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="enterfullscreen"},2336:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fullscreenfailed"},47412:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fullscreenunsupported"},51452:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="leavefullscreen"},20666:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="orientationchange"},47945:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resize"},97480:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79291),c=t(13560),a={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};a=d(!1,a,c.CENTER),a=d(!1,a,c.ORIENTATION),a=d(!1,a,c.SCALE_MODE),a=d(!1,a,c.ZOOM),p.exports=a},27397:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=t(35355),a=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 h in e)h=c(h.concat("Physics")),s.indexOf(h)===-1&&s.push(h);return s}};p.exports=a},52106:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=function(a){var r=a.plugins.getDefaultScenePlugins(),n=d(a.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};p.exports=c},87033:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(2368),a=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=a},60903:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(89993),a=t(44594),r=t(8443),n=t(35154),e=t(54899),s=t(29747),h=t(97482),i=t(2368),o=new d({initialize:function(l,u){if(this.game=l,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)),l.sys.destroy())}return this},bootScene:function(f){var l=f.sys,u=l.settings;l.sceneUpdate=s,f.init&&(f.init.call(f,u.data),u.status=c.INIT,u.isTransition&&l.events.emit(a.TRANSITION_INIT,u.transitionFrom,u.transitionDuration));var v;l.load&&(v=l.load,v.reset()),v&&f.preload?(f.preload.call(f),u.status=c.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(f)},loadComplete:function(f){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,l){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(f,l),v.scenePlugin&&v.scenePlugin._target&&v.scenePlugin.step(f,l)}},render:function(f){for(var l=0;l=c.LOADING&&u.settings.status=c.START&&g<=c.CREATING)return this;if(g>=c.RUNNING&&g<=c.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(l);else{v.sceneUpdate=s,v.start(l);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(f,l){var u=this.getScene(f);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(l)}return this},switch:function(f,l){var u=this.getScene(f),v=this.getScene(l);return u&&v&&u!==v&&(this.sleep(f),this.isSleeping(l)?this.wake(l):this.start(l)),this},getAt:function(f){return this.scenes[f]},getIndex:function(f){var l=this.getScene(f);return this.scenes.indexOf(l)},bringToTop:function(f){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:f,keyB:null});else{var l=this.getIndex(f);if(l!==-1&&l0){var u=this.getScene(f);this.scenes.splice(l,1),this.scenes.unshift(u)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var l=this.getIndex(f);if(l>0){var u=l-1,v=this.getScene(f),g=this.getAt(u);this.scenes[l]=g,this.scenes[u]=v}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var l=this.getIndex(f);if(lu),0,g)}}return this},moveBelow:function(f,l){if(f===l)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:f,keyB:l});else{var u=this.getIndex(f),v=this.getIndex(l);if(u!==-1&&v!==-1&&v>u){var g=this.getAt(v);this.scenes.splice(v,1),u===0?this.scenes.unshift(g):this.scenes.splice(u-(v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(h){this.scene=h,this.systems=h.sys,this.settings=h.sys.settings,this.key=h.sys.settings.key,this.manager=h.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,h.sys.events.once(a.BOOT,this.boot,this),h.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},start:function(s,h){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,h),this},restart:function(s){var h=this.key;return this.manager.queueOp("stop",h),this.manager.queueOp("start",h,s),this},transition:function(s){s===void 0&&(s={});var h=r(s,"target",!1),i=this.manager.getScene(h);if(!h||!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 f=r(s,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var l=r(s,"allowInput",!1);this.settings.transitionAllowInput=l;var u=i.sys.settings;u.isTransition=!0,u.transitionFrom=this.scene,u.transitionDuration=o,u.transitionAllowInput=l,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,h):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,h),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(h,r(s,"data"));var v=r(s,"onStart",null),g=r(s,"onStartScope",this.scene);return v&&v.call(g,this.scene,i,o),this.systems.events.emit(a.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,h){this._elapsed+=h,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,h=this._target.sys.settings;s.events.emit(a.TRANSITION_COMPLETE,this.scene),h.isTransition=!1,h.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,h,i,o){return this.manager.add(s,h,i,o)},launch:function(s,h){return s&&s!==this.key&&this.manager.queueOp("start",s,h),this},run:function(s,h){return s&&s!==this.key&&this.manager.queueOp("run",s,h),this},pause:function(s,h){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,h),this},resume:function(s,h){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,h),this},sleep:function(s,h){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,h),this},wake:function(s,h){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,h),this},switch:function(s){return s!==this.key&&this.manager.queueOp("switch",this.key,s),this},stop:function(s,h){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,h),this},setActive:function(s,h,i){h===void 0&&(h=this.key);var o=this.manager.getScene(h);return o&&o.sys.setActive(s,i),this},setVisible:function(s,h){h===void 0&&(h=this.key);var i=this.manager.getScene(h);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,h){return h===void 0&&(h=this.key),s!==h&&this.manager.swapPosition(s,h),this},moveAbove:function(s,h){return h===void 0&&(h=this.key),s!==h&&this.manager.moveAbove(s,h),this},moveBelow:function(s,h){return h===void 0&&(h=this.key),s!==h&&this.manager.moveBelow(s,h),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 h=this.manager.getScene(s);if(h)return h.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(a.SHUTDOWN,this.shutdown,this),s.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(89993),c=t(35154),a=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",a(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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(89993),a=t(42363),r=t(44594),n=t(27397),e=t(52106),s=t(29747),h=t(55681),i=new d({initialize:function(f,l){this.scene=f,this.game,this.renderer,this.config=l,this.settings=h.create(l),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 f=o.plugins;this.plugins=f,f.addToScene(this,a.Global,[a.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(o,f){var l=this.events;l.emit(r.PRE_UPDATE,o,f),l.emit(r.UPDATE,o,f),this.sceneUpdate.call(this.scene,o,f),l.emit(r.POST_UPDATE,o,f)},render:function(o){var f=this.displayList;f.depthSort(),this.events.emit(r.PRE_RENDER,o),this.cameras.render(o,f),this.events.emit(r.RENDER,o)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(o){var f=this.settings,l=this.getStatus();return l!==c.CREATING&&l!==c.RUNNING?console.warn("Cannot pause non-running Scene",f.key):this.settings.active&&(f.status=c.PAUSED,f.active=!1,this.events.emit(r.PAUSE,this,o)),this},resume:function(o){var f=this.events,l=this.settings;return this.settings.active||(l.status=c.RUNNING,l.active=!0,f.emit(r.RESUME,this,o)),this},sleep:function(o){var f=this.settings,l=this.getStatus();return l!==c.CREATING&&l!==c.RUNNING?console.warn("Cannot sleep non-running Scene",f.key):(f.status=c.SLEEPING,f.active=!1,f.visible=!1,this.events.emit(r.SLEEP,this,o)),this},wake:function(o){var f=this.events,l=this.settings;return l.status=c.RUNNING,l.active=!0,l.visible=!0,f.emit(r.WAKE,this,o),l.isTransition&&f.emit(r.TRANSITION_WAKE,l.transitionFrom,l.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,f){return o?this.resume(f):this.pause(f)},start:function(o){var f=this.events,l=this.settings;o&&(l.data=o),l.status=c.START,l.active=!0,l.visible=!0,f.emit(r.START,this),f.emit(r.READY,this,o)},shutdown:function(o){var f=this.events,l=this.settings;f.off(r.TRANSITION_INIT),f.off(r.TRANSITION_START),f.off(r.TRANSITION_COMPLETE),f.off(r.TRANSITION_OUT),l.status=c.SHUTDOWN,l.active=!1,l.visible=!1,f.emit(r.SHUTDOWN,this,o)},destroy:function(){var o=this.events,f=this.settings;f.status=c.DESTROYED,f.active=!1,f.visible=!1,o.emit(r.DESTROY,this),o.removeAllListeners();for(var l=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addedtoscene"},7919:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},46763:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="create"},11763:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},71555:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},36735:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="preupdate"},58262:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},91633:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedfromscene"},10319:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="render"},87132:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},81961:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="shutdown"},90194:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleep"},6265:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},33178:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitioncomplete"},43063:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitioninit"},11259:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionout"},61611:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionstart"},45209:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionwake"},22966:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},21747:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wake"},44594:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(89993),c=t(79291),a={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};a=c(!1,a,d),p.exports=a},30341:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=t(14463),r=t(79291),n=t(29747),e=new d({Extends:c,initialize:function(h,i,o){c.call(this),this.manager=h,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 h=this.markers[s];return h?(this.markers[s]=null,h):null},play:function(s,h){if(s===void 0&&(s=""),typeof s=="object"&&(h=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,h),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,h=this.currentConfig.detune+this.manager.detune,i=Math.pow(s,h);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(41786),a=t(50792),r=t(14463),n=t(8443),e=t(46710),s=t(58731),h=t(29747),i=t(26099),o=new d({Extends:a,initialize:function(l){a.call(this),this.game=l,this.jsonCache=l.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,l.events.on(n.BLUR,this.onGameBlur,this),l.events.on(n.FOCUS,this.onGameFocus,this),l.events.on(n.PRE_STEP,this.update,this),l.events.once(n.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(f,l){l===void 0&&(l={});var u=this.add(f,l);u.spritemap=this.jsonCache.get(f).spritemap;for(var v in u.spritemap)if(u.spritemap.hasOwnProperty(v)){var g=c(l),x=u.spritemap[v];g.loop=x.hasOwnProperty("loop")?x.loop:!1,u.addMarker({name:v,start:x.start,duration:x.end-x.start,config:g})}return u},get:function(f){return s(this.sounds,"key",f)},getAll:function(f){return f?e(this.sounds,"key",f):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(f,l){var u=this.add(f);return u.once(r.COMPLETE,u.destroy,u),l?l.name?(u.addMarker(l),u.play(l.name)):u.play(l):u.play()},playAudioSprite:function(f,l,u){var v=this.addAudioSprite(f);return v.once(r.COMPLETE,v.destroy,v),v.play(l,u)},remove:function(f){var l=this.sounds.indexOf(f);return l!==-1?(f.destroy(),this.sounds.splice(l,1),!0):!1},removeAll:function(){this.sounds.forEach(function(f){f.destroy()}),this.sounds.length=0},removeByKey:function(f){for(var l=0,u=this.sounds.length-1;u>=0;u--){var v=this.sounds[u];v.key===f&&(v.destroy(),this.sounds.splice(u,1),l++)}return l},pauseAll:function(){this.forEachActiveSound(function(f){f.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(f){f.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:h,stopAll:function(){this.forEachActiveSound(function(f){f.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(f){var l=0;return this.getAll(f).forEach(function(u){u.stop()&&l++}),l},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(f,l){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(f,l)})},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(f,l){var u=this;this.sounds.forEach(function(v,g){v&&!v.pendingRemove&&f.call(l||u,v,g,u.sounds)})},setRate:function(f){return this.rate=f,this},rate:{get:function(){return this._rate},set:function(f){this._rate=f,this.forEachActiveSound(function(l){l.calculateRate()}),this.emit(r.GLOBAL_RATE,this,f)}},setDetune:function(f){return this.detune=f,this},detune:{get:function(){return this._detune},set:function(f){this._detune=f,this.forEachActiveSound(function(l){l.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,f)}}});p.exports=o},14747:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33684),c=t(25960),a=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 a(n):new d(n)}};p.exports=r},19723:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},98882:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="decodedall"},57506:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="decoded"},73146:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},11305:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="detune"},40577:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="detune"},30333:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="mute"},20394:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="rate"},21802:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="volume"},1299:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="looped"},99190:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},97125:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="mute"},89259:p=>{/** + * @author pi-kei + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pan"},79986:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pauseall"},17586:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},19618:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="play"},42306:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="rate"},10387:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resumeall"},48959:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},9960:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seek"},19180:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stopall"},98328:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},50401:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unlocked"},52498:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="volume"},14463:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30341),c=t(83419),a=t(14463),r=t(45319),n=new c({Extends:d,initialize:function(s,h,i){if(i===void 0&&(i={}),this.tags=s.game.cache.audio.get(h),!this.tags)throw new Error('No cached audio asset with key "'+h);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,h,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(a.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(a.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(a.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(a.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,s=this.currentConfig.delay,h=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=h,this.audio.currentTime=h,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=h-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-h),i=this.audio.currentTime):i=h){this.reset(),this.stopAndReleaseAudioTag(),this.emit(a.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(a.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(a.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,a.RATE,e)&&(this.calculateRate(),this.emit(a.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,a.DETUNE,e)&&(this.calculateRate(),this.emit(a.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(a.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(a.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(a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85034),c=t(83419),a=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 h=new r(this,e,s);return this.sounds.push(h),h},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(o,f){for(var l=0;l{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30341),c=t(83419),a=t(50792),r=t(79291),n=t(29747),e=function(){return!1},s=function(){return null},h=function(){return this},i=new c({Extends:a,initialize:function(f,l,u){u===void 0&&(u={}),a.call(this),this.manager=f,this.key=l,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:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85034),c=t(83419),a=t(50792),r=t(4603),n=t(29747),e=new c({Extends:a,initialize:function(h){a.call(this),this.game=h,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(s,h){var i=new r(this,s,h);return this.sounds.push(i),i},addAudioSprite:function(s,h){var i=this.add(s,h);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,h){return!1},playAudioSprite:function(s,h,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,h){d.prototype.forEachActiveSound.call(this,s,h)},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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30341),c=t(83419),a=t(14463),r=t(95540),n=new c({Extends:d,initialize:function(s,h,i){if(i===void 0&&(i={}),this.audioBuffer=s.game.cache.audio.get(h),!this.audioBuffer)throw new Error('Audio key "'+h+'" missing from 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,h,i)},play:function(e,s){return d.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(a.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(53134),c=t(85034),a=t(83419),r=t(14463),n=t(8443),e=t(71741),s=t(95540),h=new a({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"&&("ontouchstart"in window||"onclick"in window),c.call(this,o),this.locked&&o.isBooted?this.unlock():o.events.once(n.BOOT,this.unlock,this)},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 f=new e(this,i,o);return this.sounds.push(f),f},decodeAudio:function(i,o){var f;Array.isArray(i)?f=i:f=[{key:i,data:o}];for(var l=this.game.cache.audio,u=f.length,v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37105),c=t(83419),a=t(29747),r=t(19186),n=new c({initialize:function(s){this.parent=s,this.list=[],this.position=0,this.addCallback=a,this.removeCallback=a,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,h){return h?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(h,i){return h[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,h,i){return d.GetFirst(this.list,e,s,h,i)},getAll:function(e,s,h,i){return d.GetAll(this.list,e,s,h,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,h){return h?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,h,i){return d.SetAll(this.list,e,s,h,i),this},each:function(e,s){for(var h=[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-2024 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(a){if(Array.isArray(a))for(var r=0;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=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,h;for(s=0;s{/** + * @author Vladimir Agafonkin + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43886);function c(m){if(!(this instanceof c))return new c(m);this._maxEntries=Math.max(4,m||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(m){var y=this.data,T=[],E=this.toBBox;if(!v(m,y))return T;for(var C=[],A,P,M,F;y;){for(A=0,P=y.children.length;A=0&&A[y].children.length>this._maxEntries;)this._split(A,y),y--;this._adjustParentBBoxes(C,A,y)},_split:function(m,y){var T=m[y],E=T.children.length,C=this._minEntries;this._chooseSplitAxis(T,C,E);var A=this._chooseSplitIndex(T,C,E),P=g(T.children.splice(A,T.children.length-A));P.height=T.height,P.leaf=T.leaf,r(T,this.toBBox),r(P,this.toBBox),y?m[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(m,y){this.data=g([m,y]),this.data.height=m.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(m,y,T){var E,C,A,P,M,F,L,D;for(F=L=1/0,E=y;E<=T-y;E++)C=n(m,0,E,this.toBBox),A=n(m,E,T,this.toBBox),P=l(C,A),M=i(C)+i(A),P=y;F--)L=m.children[F],e(P,m.leaf?C(L):L),M+=o(P);return M},_adjustParentBBoxes:function(m,y,T){for(var E=T;E>=0;E--)e(y[E],m)},_condense:function(m){for(var y=m.length-1,T;y>=0;y--)m[y].children.length===0?y>0?(T=m[y-1].children,T.splice(T.indexOf(m[y]),1)):this.clear():r(m[y],this.toBBox)},compareMinX:function(m,y){return m.left-y.left},compareMinY:function(m,y){return m.top-y.top},toBBox:function(m){return{minX:m.left,minY:m.top,maxX:m.right,maxY:m.bottom}}};function a(m,y,T){if(!T)return y.indexOf(m);for(var E=0;E=m.minX&&y.maxY>=m.minY}function g(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(m,y,T,E,C){for(var A=[y,T],P;A.length;)T=A.pop(),y=A.pop(),!(T-y<=E)&&(P=y+Math.ceil((T-y)/E/2)*E,d(m,P,y,T,C),A.push(y,P,P,T))}p.exports=c},35072:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=0;a-1},union:function(a){var r=new c;return a.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(a){var r=new c;return this.entries.forEach(function(n){a.contains(n)&&r.set(n)}),r},difference:function(a){var r=new c;return this.entries.forEach(function(n){a.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(a){return a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45319),c=t(83419),a=t(56583),r=t(26099),n=new c({initialize:function(s,h,i,o){s===void 0&&(s=0),h===void 0&&(h=s),i===void 0&&(i=0),o===void 0&&(o=null),this._width=s,this._height=h,this._parent=o,this.aspectMode=i,this.aspectRatio=h===0?1:s/h,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(a(e,this.snapTo.x)),this._height=this.getNewHeight(a(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(a(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(a(e,this.snapTo.x)),this._height=this.getNewHeight(a(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,h){e===void 0&&(e=0),s===void 0&&(s=e),h===void 0&&(h=!0),e=this.getNewWidth(e),s=this.getNewHeight(s);var i=this.snapTo,o=s===0?1:e/s;return h&&this.aspectRatio>o||!h&&this.aspectRatio0&&(s=a(s,i.y),e=s*this.aspectRatio)):(h&&this.aspectRatioo)&&(s=a(s,i.y),e=s*this.aspectRatio,i.x>0&&(e=a(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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},56187:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},82348:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(45319),a=t(40987),r=t(8054),n=t(50030),e=t(79237),s=new d({Extends:e,initialize:function(i,o,f,l,u){e.call(this,i,o,f,l,u),this.add("__BASE",0,0,0,l,u),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=l,this.height=u,this.imageData=this.context.getImageData(0,0,l,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(h,i,o,f){return f===void 0&&(f=!0),this.context.drawImage(o,h,i),f&&this.update(),this},drawFrame:function(h,i,o,f,l){o===void 0&&(o=0),f===void 0&&(f=0),l===void 0&&(l=!0);var u=this.manager.getFrame(h,i);if(u){var v=u.canvasData,g=u.cutWidth,x=u.cutHeight,m=u.source.resolution;this.context.drawImage(u.source.image,v.x,v.y,g,x,o,f,g/m,x/m),l&&this.update()}return this},setPixel:function(h,i,o,f,l,u){u===void 0&&(u=255),h=Math.abs(Math.floor(h)),i=Math.abs(Math.floor(i));var v=this.getIndex(h,i);if(v>-1){var g=this.context.getImageData(h,i,1,1);g.data[0]=o,g.data[1]=f,g.data[2]=l,g.data[3]=u,this.context.putImageData(g,h,i)}return this},putData:function(h,i,o,f,l,u,v){return f===void 0&&(f=0),l===void 0&&(l=0),u===void 0&&(u=h.width),v===void 0&&(v=h.height),this.context.putImageData(h,i,o,f,l,u,v),this},getData:function(h,i,o,f){h=c(Math.floor(h),0,this.width-1),i=c(Math.floor(i),0,this.height-1),o=c(o,1,this.width-h),f=c(f,1,this.height-i);var l=this.context.getImageData(h,i,o,f);return l},getPixel:function(h,i,o){o||(o=new a);var f=this.getIndex(h,i);if(f>-1){var l=this.data,u=l[f+0],v=l[f+1],g=l[f+2],x=l[f+3];o.setTo(u,v,g,x)}return o},getPixels:function(h,i,o,f){h===void 0&&(h=0),i===void 0&&(i=0),o===void 0&&(o=this.width),f===void 0&&(f=o),h=Math.abs(Math.round(h)),i=Math.abs(Math.round(i));for(var l=c(h,0,this.width),u=c(h+o,0,this.width),v=c(i,0,this.height),g=c(i+f,0,this.height),x=new a,m=[],y=v;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10312),c=t(71911),a=t(27919),r=t(83419),n=t(8054),e=t(4327),s=t(95540),h=t(36060),i=t(32302),o=t(79237),f=t(70554),l=new r({Extends:o,initialize:function(v,g,x,m){x===void 0&&(x=256),m===void 0&&(m=256),this.type="DynamicTexture";var y=v.game.renderer,T=y&&y.type===n.CANVAS,E=T?a.create2D(this,x,m):[this];o.call(this,v,g,E,x,m),this.add("__BASE",0,0,0,x,m),this.renderer=y,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=T?E:null,this.context=T?E.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,x,m).setScene(v.game.scene.systemScene,!1),this.renderTarget=T?null:new i(y,x,m,1,0,!1,!0,!0,!1),this.pipeline=T?null:y.pipelines.get(h.SINGLE_PIPELINE),this.setSize(x,m)},setSize:function(u,v){v===void 0&&(v=u);var g=this.get(),x=g.source;if(u!==this.width||v!==this.height){this.canvas&&(this.canvas.width=u,this.canvas.height=v);var m=this.renderTarget;m&&(m.willResize(u,v)&&m.resize(u,v),m.texture!==x.glTexture&&this.renderer.deleteTexture(x.glTexture),this.setFromRenderTarget()),this.camera.setSize(u,v),x.width=u,x.height=v,g.setSize(u,v),this.width=u,this.height=v}else{var y=this.getSourceImage();g.cutX+u>y.width&&(u=y.width-g.cutX),g.cutY+v>y.height&&(v=y.height-g.cutY),g.setSize(u,v,g.cutX,g.cutY)}return this},setFromRenderTarget:function(){var u=this.get(),v=u.source,g=this.renderTarget;return v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=g.texture,v.glTexture.flipY=!0,this},setIsSpriteTexture:function(u){return this.isSpriteTexture=u,this},fill:function(u,v,g,x,m,y){var T=this.camera,E=this.renderer;v===void 0&&(v=1),g===void 0&&(g=0),x===void 0&&(x=0),m===void 0&&(m=this.width),y===void 0&&(y=this.height);var C=u>>16&255,A=u>>8&255,P=u&255,M=this.renderTarget;if(T.preRender(),M){M.bind(!0);var F=this.pipeline.manager.set(this.pipeline),L=E.width/M.width,D=E.height/M.height,I=M.height-(x+y);F.drawFillRect(g*L,I*D,m*L,y*D,f.getTintFromFloats(P/255,A/255,C/255,1),v),M.unbind(!0)}else{var U=this.context;E.setContext(U),U.globalCompositeOperation="source-over",U.fillStyle="rgba("+C+","+A+","+P+","+v+")",U.fillRect(g,x,m,y),E.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var u=this.context,v=this.renderTarget;v?v.clear():u&&(u.save(),u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,this.width,this.height),u.restore()),this.dirty=!1}return this},stamp:function(u,v,g,x,m){g===void 0&&(g=0),x===void 0&&(x=0);var y=s(m,"alpha",1),T=s(m,"tint",16777215),E=s(m,"angle",0),C=s(m,"rotation",0),A=s(m,"scale",1),P=s(m,"scaleX",A),M=s(m,"scaleY",A),F=s(m,"originX",.5),L=s(m,"originY",.5),D=s(m,"blendMode",0),I=s(m,"erase",!1),U=s(m,"skipBatch",!1),z=this.manager.resetStamp(y,T);return z.setAngle(0),E!==0?z.setAngle(E):C!==0&&z.setRotation(C),z.setScale(P,M),z.setTexture(u,v),z.setOrigin(F,L),z.setBlendMode(D),I&&(this._eraseMode=!0),U?this.batchGameObject(z,g,x):this.draw(z,g,x),I&&(this._eraseMode=!1),this},erase:function(u,v,g){return this._eraseMode=!0,this.draw(u,v,g),this._eraseMode=!1,this},draw:function(u,v,g,x,m){return this.beginDraw(),this.batchDraw(u,v,g,x,m),this.endDraw(),this},drawFrame:function(u,v,g,x,m,y){return this.beginDraw(),this.batchDrawFrame(u,v,g,x,m,y),this.endDraw(),this},repeat:function(u,v,g,x,m,y,T,E,C){if(g===void 0&&(g=0),x===void 0&&(x=0),m===void 0&&(m=this.width),y===void 0&&(y=this.height),T===void 0&&(T=1),E===void 0&&(E=16777215),C===void 0&&(C=!1),u instanceof e?v=u:v=this.manager.getFrame(u,v),!v)return this;var A=this.manager.resetStamp(T,E);A.setFrame(v),A.setOrigin(0);var P=v.width,M=v.height;m=Math.floor(m),y=Math.floor(y);var F=Math.ceil(m/P),L=Math.ceil(y/M),D=F*P-m,I=L*M-y;D>0&&(D=P-D),I>0&&(I=M-I),g<0&&(F+=Math.ceil(Math.abs(g)/P)),x<0&&(L+=Math.ceil(Math.abs(x)/M));var U=g,z=x,w=!1,G=this.manager.stampCrop.setTo(0,0,P,M);C||this.beginDraw();for(var R=0;R0&&O===F-1&&(w=!0,G.width=D),I>0&&R===L-1&&(w=!0,G.height=I),w&&A.setCrop(G),this.batchGameObject(A,U,z),A.isCropped=!1,G.setTo(0,0,P,M),U+=P}U=g,z+=M}return C||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var u=this.camera,v=this.renderer,g=this.renderTarget;u.preRender(),g?v.beginCapture(g.width,g.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(u,v,g,x,m){return Array.isArray(u)||(u=[u]),this.batchList(u,v,g,x,m),this},batchDrawFrame:function(u,v,g,x,m,y){g===void 0&&(g=0),x===void 0&&(x=0),m===void 0&&(m=1),y===void 0&&(y=16777215);var T=this.manager.getFrame(u,v);return T&&(this.renderTarget?this.pipeline.batchTextureFrame(T,g,x,y,m,this.camera.matrix,null):this.batchTextureFrame(T,g,x,m,y)),this},endDraw:function(u){if(u===void 0&&(u=this._eraseMode),this.isDrawing){var v=this.renderer,g=this.renderTarget;if(g){var x=v.endCapture(),m=v.pipelines.setUtility();m.blitFrame(x,g,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,g,x,m){var y=u.length;if(y!==0)for(var T=0;T0&&C.height>0&&E.drawImage(A,C.x,C.y,C.width,C.height,v,g,C.width,C.height),E.restore()}},snapshotArea:function(u,v,g,x,m,y,T){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,m,!1,u,v,g,x,y,T):this.renderer.snapshotCanvas(this.canvas,m,!1,u,v,g,x,y,T),this},snapshot:function(u,v,g){return this.snapshotArea(0,0,this.width,this.height,u,v,g)},snapshotPixel:function(u,v,g){return this.snapshotArea(u,v,1,1,g,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(u,v,g,x){var m=this.manager.resetStamp();m.setTexture(this),m.setOrigin(0),m.renderWebGL(u,m,g,x)},renderCanvas:function(){},destroy:function(){var u=this.manager.stamp;u&&u.texture===this&&this.manager.resetStamp(),o.prototype.destroy.call(this),a.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});p.exports=l},4327:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(45319),a=t(79291),r=new d({initialize:function(e,s,h,i,o,f,l){this.texture=e,this.name=s,this.source=e.source[h],this.sourceIndex=h,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(f,l,i,o)},setSize:function(n,e,s,h){s===void 0&&(s=0),h===void 0&&(h=0),this.cutX=s,this.cutY=h,this.cutWidth=n,this.cutHeight=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=h,o.w=n,o.h=e,o.r=s+n,o.b=h+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 f=i.drawImage;return f.x=s,f.y=h,f.width=n,f.height=e,this.updateUVs()},setTrim:function(n,e,s,h,i,o){var f=this.data,l=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=n,f.sourceSize.h=e,l.x=s,l.y=h,l.w=i,l.h=o,l.r=s+i,l.b=h+o,this.x=s,this.y=h,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,h){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&h===this.height,i.scale9Borders.x=n,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=h,this},setCropUVs:function(n,e,s,h,i,o,f){var l=this.cutX,u=this.cutY,v=this.cutWidth,g=this.cutHeight,x=this.realWidth,m=this.realHeight;e=c(e,0,x),s=c(s,0,m),h=c(h,0,x-e),i=c(i,0,m-s);var y=l+e,T=u+s,E=h,C=i,A=this.data;if(A.trim){var P=A.spriteSourceSize;h=c(h,0,v-e),i=c(i,0,g-s);var M=e+h,F=s+i,L=!(P.rM||P.y>F);if(L){var D=Math.max(P.x,e),I=Math.max(P.y,s),U=Math.min(P.r,M)-D,z=Math.min(P.b,F)-I;E=U,C=z,o?y=l+(v-(D-P.x)-U):y=l+(D-P.x),f?T=u+(g-(I-P.y)-z):T=u+(I-P.y),e=D,s=I,h=U,i=z}else y=0,T=0,E=0,C=0}else o&&(y=l+(v-e-h)),f&&(T=u+(g-s-i));var w=this.source.width,G=this.source.height;return n.u0=Math.max(0,y/w),n.v0=Math.max(0,T/G),n.u1=Math.min(1,(y+E)/w),n.v1=Math.min(1,(T+C)/G),n.x=e,n.y=s,n.cx=y,n.cy=T,n.cw=E,n.ch=C,n.width=h,n.height=i,n.flipX=o,n.flipY=f,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,h,i,o){var f=this.data.drawImage;return f.width=n,f.height=e,this.u0=s,this.v0=h,this.u1=i,this.v1=o,this},updateUVs:function(){var n=this.cutX,e=this.cutY,s=this.cutWidth,h=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=h;var o=this.source.width,f=this.source.height;return this.u0=n/o,this.v0=e/f,this.u1=(n+s)/o,this.v1=(e+h)/f,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=a(!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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(4327),a=t(11876),r='Texture "%s" has no frame "%s"',n=new d({initialize:function(s,h,i,o,f){Array.isArray(i)||(i=[i]),this.manager=s,this.key=h,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var l=0;lo&&(o=u.cutX+u.cutWidth),u.cutY+u.cutHeight>f&&(f=u.cutY+u.cutHeight)}return{x:h,y:i,width:o-h,height:f-i}},getFrameNames:function(e){e===void 0&&(e=!1);var s=Object.keys(this.frames);if(!e){var h=s.indexOf("__BASE");h!==-1&&s.splice(h,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],h;return s?h=s.sourceIndex:(console.warn(r,this.key,e),h=this.frames.__BASE.sourceIndex),this.dataSource[h].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c=t(57382),a=t(83419),r=t(40987),n=t(8054),e=t(81320),s=t(50792),h=t(69442),i=t(4327),o=t(8443),f=t(99584),l=t(35154),u=t(88571),v=t(41212),g=t(61309),x=t(87841),m=t(79237),y=new a({Extends:s,initialize:function(E){s.call(this),this.game=E,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,E.events.once(o.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(h.LOAD,this.updatePending,this),this.on(h.ERROR,this.updatePending,this);var T=this.game.config;this.addBase64("__DEFAULT",T.defaultImage),this.addBase64("__MISSING",T.missingImage),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(E){this.stamp=new u(E).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(h.LOAD),this.off(h.ERROR),this.emit(h.READY))},checkKey:function(T){return 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 E=T.key;return this.list.hasOwnProperty(E)&&(T.destroy(),this.emit(h.REMOVE,E),this.emit(h.REMOVE_KEY+E)),this},removeKey:function(T){return this.list.hasOwnProperty(T)&&delete this.list[T],this},addBase64:function(T,E){if(this.checkKey(T)){var C=this,A=new Image;A.onerror=function(){C.emit(h.ERROR,T)},A.onload=function(){var P=C.create(T,A);g.Image(P,0),C.emit(h.ADD,T,P),C.emit(h.ADD_KEY+T,P),C.emit(h.LOAD,T,P)},A.src=E}return this},getBase64:function(T,E,C,A){C===void 0&&(C="image/png"),A===void 0&&(A=.92);var P="",M=this.getFrame(T,E);if(M&&(M.source.isRenderTexture||M.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(M){var F=M.canvasData,L=d.create2D(this,F.width,F.height),D=L.getContext("2d",{willReadFrequently:!0});F.width>0&&F.height>0&&D.drawImage(M.source.image,F.x,F.y,F.width,F.height,0,0,F.width,F.height),P=L.toDataURL(C,A),d.remove(L)}return P},addImage:function(T,E,C){var A=null;return this.checkKey(T)&&(A=this.create(T,E),g.Image(A,0),C&&A.setDataSource(C),this.emit(h.ADD,T,A),this.emit(h.ADD_KEY+T,A)),A},addGLTexture:function(T,E){var C=null;if(this.checkKey(T)){var A=E.width,P=E.height;C=this.create(T,E,A,P),C.add("__BASE",0,0,0,A,P),this.emit(h.ADD,T,C),this.emit(h.ADD_KEY+T,C)}return C},addCompressedTexture:function(T,E,C){var A=null;if(this.checkKey(T)){if(A=this.create(T,E),A.add("__BASE",0,0,0,E.width,E.height),C){var P=function(F,L,D){Array.isArray(D.textures)||Array.isArray(D.frames)?g.JSONArray(F,L,D):g.JSONHash(F,L,D)};if(Array.isArray(C))for(var M=0;M=M.x&&T=M.y&&E=M.x&&T=M.y&&E{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27919),c=t(83419),a=t(50030),r=t(29795),n=t(82751),e=new c({initialize:function(h,i,o,f,l){l===void 0&&(l=!1);var u=h.manager.game;this.renderer=u.renderer,this.texture=h,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=f||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=a(this.width,this.height),this.glTexture=null,this.flipY=l,this.init(u)},init:function(s){var h=this.renderer;if(h){var i=this.source;if(h.gl){var o=this.image,f=this.flipY,l=this.width,u=this.height,v=this.scaleMode;this.isCanvas?this.glTexture=h.createCanvasTexture(o,!1,f):this.isVideo?this.glTexture=h.createVideoTexture(o,!1,f):this.isRenderTexture?this.glTexture=h.createTextureFromSource(null,l,u,v):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=h.createTextureFromSource(i,void 0,void 0,v):i instanceof Uint8Array?this.glTexture=h.createUint8ArrayTexture(i,l,u,v):this.glTexture=h.createTextureFromSource(o,l,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),this.flipY=s,this},update:function(){var s=this.renderer,h=this.image,i=this.flipY,o=s.gl;o&&this.isCanvas?s.updateCanvasTexture(h,this.glTexture,i):o&&this.isVideo&&s.updateVideoTexture(h,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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addtexture"},63486:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addtexture-"},94851:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="onerror"},29099:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="onload"},8678:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},86415:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removetexture"},30879:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removetexture-"},69442:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79291),c=t(19673),a={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)};a=d(!1,a,c),p.exports=a},89905:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=t.source[d];t.add("__BASE",d,0,0,a.width,a.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41786),c=function(a,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=a.source[r];a.add("__BASE",r,0,0,e.width,e.height);for(var s=Array.isArray(n.textures)?n.textures[r].frames:n.frames,h,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41786),c=function(a,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=a.source[r];a.add("__BASE",r,0,0,e.width,e.height);var s=n.frames,h;for(var i in s)if(s.hasOwnProperty(i)){var o=s[i];if(h=a.add(i,r,o.frame.x,o.frame.y,o.frame.w,o.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+i);continue}o.trimmed&&h.setTrim(o.sourceSize.w,o.sourceSize.h,o.spriteSourceSize.x,o.spriteSourceSize.y,o.spriteSourceSize.w,o.spriteSourceSize.h),o.rotated&&(h.rotated=!0,h.updateUVsInverted());var f=o.anchor||o.pivot;f&&(h.customPivot=!0,h.pivotX=f.x,h.pivotY=f.y),o.scale9Borders&&h.setScale9(o.scale9Borders.x,o.scale9Borders.y,o.scale9Borders.w,o.scale9Borders.h),h.customData=d(o)}for(var l in n)l!=="frames"&&(Array.isArray(n[l])?a.customData[l]=n[l].slice(0):a.customData[l]=n[l]);return a};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,a=new Uint8Array(t,0,12);for(c=0;c>1),x=Math.max(1,x>>1),v+=m}return{mipmaps:u,width:i,height:o,internalFormat:h,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(E,C,A,P,M,F,L){return L===void 0&&(L=16),Math.floor((E+A)/M)*Math.floor((C+P)/F)*L}function t(E,C){return E=Math.max(E,16),C=Math.max(C,8),E*C/4}function d(E,C){return E=Math.max(E,8),C=Math.max(C,8),E*C/2}function c(E,C){return Math.ceil(E/4)*Math.ceil(C/4)*16}function a(E,C){return S(E,C,3,3,4,4,8)}function r(E,C){return S(E,C,3,3,4,4)}function n(E,C){return S(E,C,4,3,5,4)}function e(E,C){return S(E,C,4,4,5,5)}function s(E,C){return S(E,C,5,4,6,5)}function h(E,C){return S(E,C,5,5,6,6)}function i(E,C){return S(E,C,7,4,8,5)}function o(E,C){return S(E,C,7,5,8,6)}function f(E,C){return S(E,C,7,7,8,8)}function l(E,C){return S(E,C,9,4,10,5)}function u(E,C){return S(E,C,9,5,10,6)}function v(E,C){return S(E,C,9,7,10,8)}function g(E,C){return S(E,C,9,9,10,10)}function x(E,C){return S(E,C,11,9,12,10)}function m(E,C){return S(E,C,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:a,glFormat:[36196]},7:{sizeFunc:a,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:a,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:a,glFormat:[37494,37495]},25:{sizeFunc:a,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:h,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:o,glFormat:[37814,37846]},34:{sizeFunc:f,glFormat:[37815,37847]},35:{sizeFunc:l,glFormat:[37816,37848]},36:{sizeFunc:u,glFormat:[37817,37849]},37:{sizeFunc:v,glFormat:[37818,37850]},38:{sizeFunc:g,glFormat:[37819,37851]},39:{sizeFunc:x,glFormat:[37820,37852]},40:{sizeFunc:m,glFormat:[37821,37853]}},T=function(E){for(var C=new Uint32Array(E,0,13),A=C[0],P=A===55727696,M=P?C[2]:C[3],F=C[4],L=y[M].glFormat[F],D=y[M].sizeFunc,I=C[11],U=C[7],z=C[6],w=52+C[12],G=new Uint8Array(E,w),R=new Array(I),O=0,B=U,N=z,X=0;X>1),N=Math.max(1,N>>1),O+=V}return{mipmaps:R,width:U,height:z,internalFormat:L,compressed:!0,generateMipmap:!1}};p.exports=T},75549:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=function(a,r,n,e,s,h,i){var o=d(i,"frameWidth",null),f=d(i,"frameHeight",o);if(o===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var l=a.source[r];a.add("__BASE",r,0,0,l.width,l.height);var u=d(i,"startFrame",0),v=d(i,"endFrame",-1),g=d(i,"margin",0),x=d(i,"spacing",0),m=Math.floor((s-g+x)/(o+x)),y=Math.floor((h-g+x)/(f+x)),T=m*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",a.key),(u>T||u<-T)&&(u=0),u<0&&(u=T+u),(v===-1||v>T||vs&&(A=L-s),D>h&&(P=D-h),F>=u&&F<=v&&(a.add(M,r,n+E,e+C,o-A,f-P),M++),E+=o+x,E+o>s&&(E=g,C+=f+x)}return a};p.exports=c},47534:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=function(a,r,n){var e=d(n,"frameWidth",null),s=d(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var h=a.source[0];a.add("__BASE",0,0,0,h.width,h.height),d(n,"startFrame",0),d(n,"endFrame",-1);for(var i=d(n,"margin",0),o=d(n,"spacing",0),f=r.cutX,l=r.cutY,u=r.cutWidth,v=r.cutHeight,g=r.realWidth,x=r.realHeight,m=Math.floor((g-i+o)/(e+o)),y=Math.floor((x-i+o)/(s+o)),T=r.x,E=e-T,C=e-(g-u-T),A=r.y,P=s-A,M=s-(x-v-A),F,L=i,D=i,I=0,U=0,z=0;z{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=0,t=function(c,a,r,n){var e=S-n.y-n.height;c.add(r,a,n.x,e,n.width,n.height)},d=function(c,a,r){var n=c.source[a];c.add("__BASE",a,0,0,n.width,n.height),S=n.height;for(var e=r.split(` +`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",i="",o={x:0,y:0,width:0,height:0},f=0;f{/** + * @author Ben Richards + * @copyright 2024 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50030),c=function(h){for(var i=h.mipmaps,o=1;o{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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,h,i,o){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),h===void 0&&(h=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=h|0,this.imageSpacing=i|0,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(a){return a>=this.firstgid&&a{/** + * @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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(80341),c=t(87010),a=t(46177),r=t(49075),n=function(e,s,h,i,o,f,l,u){h===void 0&&(h=32),i===void 0&&(i=32),o===void 0&&(o=10),f===void 0&&(f=10),u===void 0&&(u=!1);var v=null;if(Array.isArray(l)){var g=s!==void 0?s:"map";v=a(g,d.ARRAY_2D,l,h,i,u)}else if(s!==void 0){var x=e.cache.tilemap.get(s);x?v=a(s,x.format,x.data,h,i,u):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:h,tileHeight:i,width:o,height:f})),new r(e,v)};p.exports=n},23029:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(31401),a=t(91907),r=t(62644),n=t(93232),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(h,i,o,f,l,u,v,g){this.layer=h,this.index=i,this.x=o,this.y=f,this.width=l,this.height=u,this.right,this.bottom,this.baseWidth=v!==void 0?v:l,this.baseHeight=g!==void 0?g: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,h){return!(sthis.right||h>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 h=this.tilemapLayer;if(h){var i=h.tileToWorldXY(this.x,this.y,void 0,s);return i.x}return this.x*this.baseWidth},getRight:function(s){var h=this.tilemapLayer;return h?this.getLeft(s)+this.width*h.scaleX:this.getLeft(s)+this.width},getTop:function(s){var h=this.tilemapLayer;if(h){var i=h.tileToWorldXY(this.x,this.y,void 0,s);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(s){var h=this.tilemapLayer;return h?this.getTop(s)+this.height*h.scaleY:this.getTop(s)+this.height},getBounds:function(s,h){return h===void 0&&(h=new n),h.x=this.getLeft(s),h.y=this.getTop(s),h.width=this.getRight(s)-h.x,h.height=this.getBottom(s)-h.y,h},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,h,i,o){return!(i<=this.pixelX||o<=this.pixelY||s>=this.right||h>=this.bottom)},isInteresting:function(s,h){return s&&h?this.canCollide||this.hasInterestingFace:s?this.collides:h?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 h=this.tilemapLayer;h&&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,h,i,o,f){if(h===void 0&&(h=s),i===void 0&&(i=s),o===void 0&&(o=s),f===void 0&&(f=!0),this.collideLeft=s,this.collideRight=h,this.collideUp=i,this.collideDown=o,this.faceLeft=s,this.faceRight=h,this.faceTop=i,this.faceBottom=o,f){var l=this.tilemapLayer;l&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(s,h){return s===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=s,this.collisionCallbackContext=h),this},setSize:function(s,h,i,o){return s!==void 0&&(this.width=s),h!==void 0&&(this.height=h),i!==void 0&&(this.baseWidth=i),o!==void 0&&(this.baseHeight=o),this.updatePixelXY(),this},updatePixelXY:function(){var s=this.layer.orientation;if(s===a.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(s===a.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(s===a.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(s===a.HEXAGONAL){var h=this.layer.staggerAxis,i=this.layer.staggerIndex,o=this.layer.hexSideLength,f,l;h==="y"?(l=(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*l):h==="x"&&(f=(this.baseWidth-o)/2+o,this.pixelX=this.x*f,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 h=s.gidMap[this.index];if(h)return h}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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84101),c=t(83419),a=t(39506),r=t(80341),n=t(95540),e=t(14977),s=t(27462),h=t(91907),i=t(36305),o=t(19133),f=t(68287),l=t(23029),u=t(81086),v=t(20442),g=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 E=this.orientation;this._convert={WorldToTileXY:u.GetWorldToTileXYFunction(E),WorldToTileX:u.GetWorldToTileXFunction(E),WorldToTileY:u.GetWorldToTileYFunction(E),TileToWorldXY:u.GetTileToWorldXYFunction(E),TileToWorldX:u.GetTileToWorldXFunction(E),TileToWorldY:u.GetTileToWorldYFunction(E),GetTileCorners:u.GetTileCornersFunction(E)}},setRenderOrder:function(m){var y=["right-down","left-down","right-up","left-up"];return typeof m=="number"&&(m=y[m]),y.indexOf(m)>-1&&(this.renderOrder=m),this},addTilesetImage:function(m,y,T,E,C,A,P,M){if(m===void 0)return null;y==null&&(y=m);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),D=this.getTilesetIndex(m);if(D===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',m,this.tilesets),null;var I=this.tilesets[D];return I?(I.setTileSize(T,E),I.setSpacing(C,A),I.setImage(L),I):(T===void 0&&(T=this.tileWidth),E===void 0&&(E=this.tileHeight),C===void 0&&(C=0),A===void 0&&(A=0),P===void 0&&(P=0),M===void 0&&(M={x:0,y:0}),I=new g(m,P,T,E,C,A,void 0,void 0,M),I.setImage(L),this.tilesets.push(I),this.tiles=d(this),I)},copy:function(m,y,T,E,C,A,P,M){return M=this.getLayer(M),M!==null?(u.Copy(m,y,T,E,C,A,P,M),this):null},createBlankLayer:function(m,y,T,E,C,A,P,M){T===void 0&&(T=0),E===void 0&&(E=0),C===void 0&&(C=this.width),A===void 0&&(A=this.height),P===void 0&&(P=this.tileWidth),M===void 0&&(M=this.tileHeight);var F=this.getLayerIndex(m);if(F!==null)return console.warn("Invalid Tilemap Layer ID: "+m),null;for(var L=new e({name:m,tileWidth:P,tileHeight:M,width:C,height:A,orientation:this.orientation}),D,I=0;I-1&&this.putTileAt(y,A.x,A.y,T,A.tilemapLayer)}return E},removeTileAt:function(m,y,T,E,C){return T===void 0&&(T=!0),E===void 0&&(E=!0),C=this.getLayer(C),C===null?null:u.RemoveTileAt(m,y,T,E,C)},removeTileAtWorldXY:function(m,y,T,E,C,A){return T===void 0&&(T=!0),E===void 0&&(E=!0),A=this.getLayer(A),A===null?null:u.RemoveTileAtWorldXY(m,y,T,E,C,A)},renderDebug:function(m,y,T){return T=this.getLayer(T),T===null?null:(this.orientation===h.ORTHOGONAL&&u.RenderDebug(m,y,T),this)},renderDebugFull:function(m,y){for(var T=this.layers,E=0;E{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44603),c=t(31989);d.register("tilemap",function(a){var r=a!==void 0?a:{};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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39429),c=t(31989);d.register("tilemap",function(a,r,n,e,s,h,i){return a===null&&(a=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,a,r,n,e,s,h,i)})},20442:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(78389),a=t(31401),r=t(95643),n=t(81086),e=t(19218),s=t(26099),h=new d({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.Transform,a.Visible,a.ScrollFactor,c,e],initialize:function(o,f,l,u,v,g){r.call(this,o,"TilemapLayer"),this.isTilemap=!0,this.tilemap=f,this.layerIndex=l,this.layer=f.layers[l],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,g),this.setOrigin(0,0),this.setSize(f.tileWidth*this.layer.width,f.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var o=[],f=[],l=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,f,l){return n.CalculateFacesWithin(i,o,f,l,this.layer),this},createFromTiles:function(i,o,f,l,u){return n.CreateFromTiles(i,o,f,l,u,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,o,f,l,u,v,g){return n.Copy(i,o,f,l,u,v,g,this.layer),this},fill:function(i,o,f,l,u,v){return n.Fill(i,o,f,l,u,v,this.layer),this},filterTiles:function(i,o,f,l,u,v,g){return n.FilterTiles(i,o,f,l,u,v,g,this.layer)},findByIndex:function(i,o,f){return n.FindByIndex(i,o,f,this.layer)},findTile:function(i,o,f,l,u,v,g){return n.FindTile(i,o,f,l,u,v,g,this.layer)},forEachTile:function(i,o,f,l,u,v,g){return n.ForEachTile(i,o,f,l,u,v,g,this.layer),this},setTint:function(i,o,f,l,u,v){i===void 0&&(i=16777215);var g=function(x){x.tint=i,x.tintFill=!1};return this.forEachTile(g,this,o,f,l,u,v)},setTintFill:function(i,o,f,l,u,v){i===void 0&&(i=16777215);var g=function(x){x.tint=i,x.tintFill=!0};return this.forEachTile(g,this,o,f,l,u,v)},getTileAt:function(i,o,f){return n.GetTileAt(i,o,f,this.layer)},getTileAtWorldXY:function(i,o,f,l){return n.GetTileAtWorldXY(i,o,f,l,this.layer)},getIsoTileAtWorldXY:function(i,o,f,l,u){f===void 0&&(f=!0);var v=this.tempVec;return n.IsometricWorldToTileXY(i,o,!0,v,u,this.layer,f),this.getTileAt(v.x,v.y,l)},getTilesWithin:function(i,o,f,l,u){return n.GetTilesWithin(i,o,f,l,u,this.layer)},getTilesWithinShape:function(i,o,f){return n.GetTilesWithinShape(i,o,f,this.layer)},getTilesWithinWorldXY:function(i,o,f,l,u,v){return n.GetTilesWithinWorldXY(i,o,f,l,u,v,this.layer)},hasTileAt:function(i,o){return n.HasTileAt(i,o,this.layer)},hasTileAtWorldXY:function(i,o,f){return n.HasTileAtWorldXY(i,o,f,this.layer)},putTileAt:function(i,o,f,l){return n.PutTileAt(i,o,f,l,this.layer)},putTileAtWorldXY:function(i,o,f,l,u){return n.PutTileAtWorldXY(i,o,f,l,u,this.layer)},putTilesAt:function(i,o,f,l){return n.PutTilesAt(i,o,f,l,this.layer),this},randomize:function(i,o,f,l,u){return n.Randomize(i,o,f,l,u,this.layer),this},removeTileAt:function(i,o,f,l){return n.RemoveTileAt(i,o,f,l,this.layer)},removeTileAtWorldXY:function(i,o,f,l,u){return n.RemoveTileAtWorldXY(i,o,f,l,u,this.layer)},renderDebug:function(i,o){return n.RenderDebug(i,o,this.layer),this},replaceByIndex:function(i,o,f,l,u,v){return n.ReplaceByIndex(i,o,f,l,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,f,l){return n.SetCollision(i,o,f,this.layer,l),this},setCollisionBetween:function(i,o,f,l){return n.SetCollisionBetween(i,o,f,l,this.layer),this},setCollisionByProperty:function(i,o,f){return n.SetCollisionByProperty(i,o,f,this.layer),this},setCollisionByExclusion:function(i,o,f){return n.SetCollisionByExclusion(i,o,f,this.layer),this},setCollisionFromCollisionGroup:function(i,o){return n.SetCollisionFromCollisionGroup(i,o,this.layer),this},setTileIndexCallback:function(i,o,f){return n.SetTileIndexCallback(i,o,f,this.layer),this},setTileLocationCallback:function(i,o,f,l,u,v){return n.SetTileLocationCallback(i,o,f,l,u,v,this.layer),this},shuffle:function(i,o,f,l){return n.Shuffle(i,o,f,l,this.layer),this},swapByIndex:function(i,o,f,l,u,v){return n.SwapByIndex(i,o,f,l,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,f,l){return this.tilemap.tileToWorldXY(i,o,f,l,this)},getTileCorners:function(i,o,f){return this.tilemap.getTileCorners(i,o,f,this)},weightedRandomize:function(i,o,f,l,u){return n.WeightedRandomize(o,f,l,u,i,this.layer),this},worldToTileX:function(i,o,f){return this.tilemap.worldToTileX(i,o,f,this)},worldToTileY:function(i,o,f){return this.tilemap.worldToTileY(i,o,f,this)},worldToTileXY:function(i,o,f,l,u){return this.tilemap.worldToTileXY(i,o,f,l,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=h},16153:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61340),c=new d,a=new d,r=new d,n=function(e,s,h,i){var o=s.cull(h),f=o.length,l=h.alpha*s.alpha;if(!(f===0||l<=0)){var u=c,v=a,g=r;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),u.copyFrom(h.matrix);var x=e.currentContext,m=s.gidMap;x.save(),i?(u.multiplyWithOffset(i,-h.scrollX*s.scrollFactorX,-h.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,u.multiply(v,g),g.copyToContext(x)):(v.e-=h.scrollX*s.scrollFactorX,v.f-=h.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29747),c=d,a=d;c=t(99558),a=t(16153),p.exports={renderWebGL:c,renderCanvas:a}},99558:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70554),c=function(a,r,n){var e=r.cull(n),s=e.length,h=n.alpha*r.alpha;if(!(s===0||h<=0)){var i=r.gidMap,o=a.pipelines.set(r.pipeline,r),f=d.getTintAppendFloatAlpha,l=r.scrollFactorX,u=r.scrollFactorY,v=r.x,g=r.y,x=r.scaleX,m=r.scaleY;a.pipelines.preBatch(r);for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(26099),a=new d({initialize:function(n,e,s,h,i,o,f,l,u){(s===void 0||s<=0)&&(s=32),(h===void 0||h<=0)&&(h=32),i===void 0&&(i=0),o===void 0&&(o=0),f===void 0&&(f={}),l===void 0&&(l={}),this.name=n,this.firstgid=e,this.tileWidth=s,this.tileHeight=h,this.tileMargin=i,this.tileSpacing=o,this.tileProperties=f,this.tileData=l,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 h=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(h%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),h=Math.floor(h),i=Math.floor(i),this.rows=h,this.columns=i,this.total=h*i,this.texCoordinates.length=0;for(var o=this.tileMargin+e,f=this.tileMargin+s,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7423),c=function(a,r,n){var e=d(a,r,!0,n),s=d(a,r-1,!0,n),h=d(a,r+1,!0,n),i=d(a-1,r,!0,n),o=d(a+1,r,!0,n),f=e&&e.collides;return f&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(f&&(e.faceTop=!1),s.faceBottom=!f),h&&h.collides&&(f&&(e.faceBottom=!1),h.faceTop=!f),i&&i.collides&&(f&&(e.faceLeft=!1),i.faceRight=!f),o&&o.collides&&(f&&(e.faceRight=!1),o.faceLeft=!f),e&&!e.collides&&e.resetFaces(),e};p.exports=c},42573:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7423),c=t(7386),a=function(r,n,e,s,h){for(var i=null,o=null,f=null,l=null,u=c(r,n,e,s,null,h),v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=new d,a=function(r,n,e,s){var h=e.tilemapLayer,i=h.cullPaddingX,o=h.cullPaddingY,f=h.tilemap.tileToWorldXY(r,n,c,s,h);return f.x>s.worldView.x+h.scaleX*e.tileWidth*(-i-.5)&&f.xs.worldView.y+h.scaleY*e.tileHeight*(-o-1)&&f.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42573),c=t(7386),a=t(62991),r=t(23029),n=function(e,s,h,i,o,f,l,u){l===void 0&&(l=!0);var v=c(e,s,h,i,null,u),g=[];v.forEach(function(A){var P=new r(A.layer,A.index,A.x,A.y,A.width,A.height,A.baseWidth,A.baseHeight);P.copy(A),g.push(P)});for(var x=o-e,m=f-s,y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62644),c=t(7386),a=t(27987),r=function(n,e,s,h,i,o){s||(s={}),Array.isArray(n)||(n=[n]);var f=o.tilemapLayer;h||(h=f.scene),i||(i=h.cameras.main);var l=o.width,u=o.height,v=c(0,0,l,u,null,o),g=[],x,m=function(C,A,P){for(var M=0;M{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87841),c=t(63448),a=t(56583),r=new d,n=function(e,s){var h=e.tilemapLayer.tilemap,i=e.tilemapLayer,o=Math.floor(h.tileWidth*i.scaleX),f=Math.floor(h.tileHeight*i.scaleY),l=a(s.worldView.x-i.x,o,0,!0)-i.cullPaddingX,u=c(s.worldView.right-i.x,o,0,!0)+i.cullPaddingX,v=a(s.worldView.y-i.y,f,0,!0)-i.cullPaddingY,g=c(s.worldView.bottom-i.y,f,0,!0)+i.cullPaddingY;return r.setTo(l,v,u-l,g-v)};p.exports=n},30003:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19545),c=t(32483),a=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var h=r.tilemapLayer,i=d(r,n);return(h.skipCull||h.scrollFactorX!==1||h.scrollFactorY!==1)&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=a},35137:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=t(42573),a=t(20576),r=function(n,e,s,h,i,o,f){for(var l=f.collideIndexes.indexOf(n)!==-1,u=d(e,s,h,i,null,f),v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=function(a,r,n,e,s,h,i,o){var f=d(n,e,s,h,i,o);return f.filter(a,r)};p.exports=c},52692:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d===void 0&&(d=0),c===void 0&&(c=!1);var r=0,n,e,s;if(c){for(e=a.height-1;e>=0;e--)for(n=a.width-1;n>=0;n--)if(s=a.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}}else for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=function(a,r,n,e,s,h,i,o){var f=d(n,e,s,h,i,o);return f.find(a,r)||null};p.exports=c},97560:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=function(a,r,n,e,s,h,i,o){var f=d(n,e,s,h,i,o);f.forEach(a,r)};p.exports=c},43305:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(30003),a=t(9474),r=t(14018),n=t(29747),e=t(54503),s=function(h){return h===d.ORTHOGONAL?c:h===d.HEXAGONAL?a:h===d.STAGGERED?e:h===d.ISOMETRIC?r:n};p.exports=s},7423:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62991),c=function(a,r,n,e){if(n===void 0&&(n=!1),d(a,r,e)){var s=e.data[r][a]||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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7423),c=t(26099),a=new c,r=function(n,e,s,h,i){return i.tilemapLayer.worldToTileXY(n,e,!0,a,h),d(a.x,a.y,s,i)};p.exports=r},55826:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e){var s=e.baseTileWidth,h=e.baseTileHeight,i=e.tilemapLayer,o=0,f=0;i&&(n||(n=i.scene.cameras.main),o=i.x+n.scrollX*(1-i.scrollFactorX),f=i.y+n.scrollY*(1-i.scrollFactorY),s*=i.scaleX,h*=i.scaleY);var l=o+a*s,u=f+r*h;return[new d(l,u),new d(l+s,u),new d(l+s,u+h),new d(l,u+h)]};p.exports=c},11758:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(27229),a=t(29747),r=t(55826),n=function(e){return e===d.ORTHOGONAL?r:e===d.ISOMETRIC?a:e===d.HEXAGONAL?c:(e===d.STAGGERED,a)};p.exports=n},39167:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(29747),a=t(97281),r=function(n){return n===d.ORTHOGONAL?a:c};p.exports=r},62e3:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(19951),a=t(14127),r=t(29747),n=t(97202),e=t(70326),s=function(h){return h===d.ORTHOGONAL?e:h===d.ISOMETRIC?a:h===d.HEXAGONAL?c:h===d.STAGGERED?n:r};p.exports=s},5984:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(29747),a=t(28054),r=t(29650),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?a:c};p.exports=n},7386:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=function(a,r,n,e,s,h){a===void 0&&(a=0),r===void 0&&(r=0),n===void 0&&(n=h.width),e===void 0&&(e=h.height),s||(s={});var i=d(s,"isNotEmpty",!1),o=d(s,"isColliding",!1),f=d(s,"hasInterestingFace",!1);a<0&&(n+=a,a=0),r<0&&(e+=r,r=0),a+n>h.width&&(n=Math.max(h.width-a,0)),r+e>h.height&&(e=Math.max(h.height-r,0));for(var l=[],u=r;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(55738),c=t(7386),a=t(91865),r=t(29747),n=t(26099),e=function(f,l){return a.RectangleToTriangle(l,f)},s=new n,h=new n,i=new n,o=function(f,l,u,v){if(f===void 0)return[];var g=r;f instanceof d.Circle?g=a.CircleToRectangle:f instanceof d.Rectangle?g=a.RectangleToRectangle:f instanceof d.Triangle?g=e:f instanceof d.Line&&(g=a.LineToRectangle),v.tilemapLayer.worldToTileXY(f.left,f.top,!0,h,u);var x=h.x,m=h.y;v.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,i,u);var y=Math.ceil(i.x),T=Math.ceil(i.y),E=Math.max(y-x,1),C=Math.max(T-m,1),A=c(x,m,E,C,l,v),P=v.tileWidth,M=v.tileHeight;v.tilemapLayer&&(P*=v.tilemapLayer.scaleX,M*=v.tilemapLayer.scaleY);for(var F=[],L=new d.Rectangle(0,0,P,M),D=0;D{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=t(26099),a=new c,r=new c,n=function(e,s,h,i,o,f,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(e,s,!0,a,f,l);var v=a.x,g=a.y;u(e+h,s+i,!1,r,f,l);var x=Math.ceil(r.x),m=Math.ceil(r.y);return d(v,g,x-v,m-g,o,l)};p.exports=n},96113:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(20242),a=t(10095),r=function(n){return n===d.ORTHOGONAL?a:c};p.exports=r},16926:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(86625),a=t(96897),r=t(29747),n=t(15108),e=t(85896),s=function(h){return h===d.ORTHOGONAL?e:h===d.ISOMETRIC?a:h===d.HEXAGONAL?c:h===d.STAGGERED?n:r};p.exports=s},55762:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=t(20242),a=t(51900),r=t(63288),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?a:c};p.exports=n},45091:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62991),c=function(a,r,n){if(d(a,r,n)){var e=n.data[r][a];return e!==null&&e.index>-1}else return!1};p.exports=c},24152:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45091),c=t(26099),a=new c,r=function(n,e,s,h){h.tilemapLayer.worldToTileXY(n,e,!0,a,s);var i=a.x,o=a.y;return d(i,o,h)};p.exports=r},90454:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63448),c=t(56583),a=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,h=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),o=r.hexSideLength,f,l,u,v;if(r.staggerAxis==="y"){var g=(i-o)/2+o;f=c(n.worldView.x-s.x,h,0,!0)-s.cullPaddingX,l=d(n.worldView.right-s.x,h,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,g,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,g,0,!0)+s.cullPaddingY}else{var x=(h-o)/2+o;f=c(n.worldView.x-s.x,x,0,!0)-s.cullPaddingX,l=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:f,right:l,top:u,bottom:v}};p.exports=a},9474:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(90454),c=t(32483),a=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var h=r.tilemapLayer,i=d(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=a},27229:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19951),c=t(26099),a=new c,r=function(n,e,s,h){var i=h.baseTileWidth,o=h.baseTileHeight,f=h.tilemapLayer;f&&(i*=f.scaleX,o*=f.scaleY);var l=d(n,e,a,s,h),u=[],v=.5773502691896257,g,x;h.staggerAxis==="y"?(g=v*i,x=o/2):(g=i/2,x=v*o);for(var m=0;m<6;m++){var y=2*Math.PI*(.5-m)/6;u.push(new c(l.x+g*Math.cos(y),l.y+x*Math.sin(y)))}return u};p.exports=r},19951:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s){n||(n=new d);var h=s.baseTileWidth,i=s.baseTileHeight,o=s.tilemapLayer,f=0,l=0;o&&(e||(e=o.scene.cameras.main),f=o.x+e.scrollX*(1-o.scrollFactorX),l=o.y+e.scrollY*(1-o.scrollFactorY),h*=o.scaleX,i*=o.scaleY);var u=h/2,v=i/2,g,x;return s.staggerAxis==="y"?(g=f+h*a+h,x=l+1.5*r*v+v,r%2===0&&(this.staggerIndex==="odd"?g-=u:g+=u)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(g=f+1.5*a*u+u,x=l+i*a+i,a%2===0&&(this.staggerIndex==="odd"?x-=v:x+=v)),n.set(g,x)};p.exports=c},86625:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s,h){e||(e=new d);var i=h.baseTileWidth,o=h.baseTileHeight,f=h.tilemapLayer;f&&(s||(s=f.scene.cameras.main),a=a-(f.x+s.scrollX*(1-f.scrollFactorX)),r=r-(f.y+s.scrollY*(1-f.scrollFactorY)),i*=f.scaleX,o*=f.scaleY);var l=.5773502691896257,u=-.3333333333333333,v=0,g=.6666666666666666,x=i/2,m=o/2,y,T,E,C,A;h.staggerAxis==="y"?(y=(a-x)/(l*i),T=(r-m)/m,E=l*y+u*T,C=v*y+g*T):(y=(a-x)/x,T=(r-m)/(l*o),E=u*y+l*T,C=g*y+v*T),A=-E-C;var P=Math.round(E),M=Math.round(C),F=Math.round(A),L=Math.abs(P-E),D=Math.abs(M-C),I=Math.abs(F-A);L>D&&L>I?P=-M-F:D>I&&(M=-P-F);var U,z=M;return h.staggerIndex==="odd"?U=z%2===0?M/2+P:M/2+P-.5:U=z%2===0?M/2+P:M/2+P+.5,e.set(U,z)};p.exports=c},62991:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33528),c=function(a,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var s=a.tilemapLayer,h=a.data,i=a.width,o=a.height,f=s.skipCull,l=0,u=i,v=0,g=o,x,m,y;if(e===0)for(m=v;m=l;x--)y=h[m][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!f&&!d(x,m,a,r)||n.push(y));else if(e===2)for(m=g;m>=v;m--)for(x=l;x=v;m--)for(x=u;x>=l;x--)y=h[m][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!f&&!d(x,m,a,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s){n||(n=new d);var h=s.baseTileWidth,i=s.baseTileHeight,o=s.tilemapLayer,f=0,l=0;o&&(e||(e=o.scene.cameras.main),f=o.x+e.scrollX*(1-o.scrollFactorX),h*=o.scaleX,l=o.y+e.scrollY*(1-o.scrollFactorY),i*=o.scaleY);var u=f+(a-r)*(h/2),v=l+(a+r)*(i/2);return n.set(u,v)};p.exports=c},96897:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s,h,i){e||(e=new d);var o=h.baseTileWidth,f=h.baseTileHeight,l=h.tilemapLayer;l&&(s||(s=l.scene.cameras.main),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),f*=l.scaleY,a=a-(l.x+s.scrollX*(1-l.scrollFactorX)),o*=l.scaleX);var u=o/2,v=f/2;a=a-u,i||(r=r-f);var g=.5*(a/u+r/v),x=.5*(-a/u+r/v);return n&&(g=Math.floor(g),x=Math.floor(x)),e.set(g,x)};p.exports=c},71558:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23029),c=t(62991),a=t(72023),r=t(20576),n=function(e,s,h,i,o){if(i===void 0&&(i=!0),!c(s,h,o))return null;var f,l=o.data[h][s],u=l&&l.collides;e instanceof d?(o.data[h][s]===null&&(o.data[h][s]=new d(o,e.index,s,h,o.tileWidth,o.tileHeight)),o.data[h][s].copy(e)):(f=e,o.data[h][s]===null?o.data[h][s]=new d(o,f,s,h,o.tileWidth,o.tileHeight):o.data[h][s].index=f);var v=o.data[h][s],g=o.collideIndexes.indexOf(v.index)!==-1;if(f=e instanceof d?e.index:e,f===-1)v.width=o.tileWidth,v.height=o.tileHeight;else{var x=o.tilemapLayer.tilemap,m=x.tiles,y=m[f][2],T=x.tilesets[y];v.width=T.tileWidth,v.height=T.tileHeight}return r(v,g),i&&u!==v.collides&&a(s,h,o),v};p.exports=n},26303:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71558),c=t(26099),a=new c,r=function(n,e,s,h,i,o){return o.tilemapLayer.worldToTileXY(e,s,!0,a,i,o),d(n,a.x,a.y,h,o)};p.exports=r},14051:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42573),c=t(71558),a=function(r,n,e,s,h){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,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=t(26546),a=function(r,n,e,s,h,i){var o,f=d(r,n,e,s,{},i);if(!h)for(h=[],o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23029),c=t(62991),a=t(72023),r=function(n,e,s,h,i){if(s===void 0&&(s=!0),h===void 0&&(h=!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 h&&o&&o.collides&&a(n,e,i),o};p.exports=r},94178:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63557),c=t(26099),a=new c,r=function(n,e,s,h,i,o){return o.tilemapLayer.worldToTileXY(n,e,!0,a,i,o),d(a.x,a.y,s,h,o)};p.exports=r},15533:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=t(3956),a=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(s,h,i){h===void 0&&(h={});var o=h.tileColor!==void 0?h.tileColor:a,f=h.collidingTileColor!==void 0?h.collidingTileColor:r,l=h.faceColor!==void 0?h.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=function(a,r,n,e,s,h,i){for(var o=d(n,e,s,h,null,i),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=t.data,n=t.width,e=t.height,s=t.tilemapLayer,h=Math.max(0,d.left),i=Math.min(n,d.right),o=Math.max(0,d.top),f=Math.min(e,d.bottom),l,u,v;if(c===0)for(u=o;u=h;l--)v=r[u][l],!(!v||v.index===-1||!v.visible||v.alpha===0)&&a.push(v);else if(c===2)for(u=f;u>=o;u--)for(l=h;r[u]&&l=o;u--)for(l=i;r[u]&&l>=h;l--)v=r[u][l],!(!v||v.index===-1||!v.visible||v.alpha===0)&&a.push(v);return s.tilesDrawn=a.length,s.tilesTotal=n*e,a};p.exports=S},57068:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20576),c=t(42573),a=t(9589),r=function(n,e,s,h,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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20576),c=t(42573),a=t(9589),r=function(n,e,s,h,i,o){if(s===void 0&&(s=!0),h===void 0&&(h=!0),o===void 0&&(o=!0),!(n>e)){for(var f=n;f<=e;f++)a(f,s,i);if(o)for(var l=0;l=n&&v.index<=e&&d(v,s)}h&&c(0,0,i.width,i.height,i)}};p.exports=r},75661:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20576),c=t(42573),a=t(9589),r=function(n,e,s,h){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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20576),c=t(42573),a=t(97022),r=function(n,e,s,h){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20576),c=t(42573),a=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=a},9589:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=c.collideIndexes.indexOf(t);d&&a===-1?c.collideIndexes.push(t):!d&&a!==-1&&c.collideIndexes.splice(a,1)};p.exports=S},20576:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){if(typeof t=="number")a.callbacks[t]=d!==null?{callback:d,callbackContext:c}:void 0;else for(var r=0,n=t.length;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=function(a,r,n,e,s,h,i){for(var o=d(a,r,n,e,null,i),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=t(33680),a=function(r,n,e,s,h){var i=d(r,n,e,s,null,h),o=i.map(function(l){return l.index});c(o);for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63448),c=t(56583),a=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,h=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),o=c(n.worldView.x-s.x,h,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,h,0,!0)+s.cullPaddingX,l=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:f,top:l,bottom:u}};p.exports=a},54503:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61325),c=t(32483),a=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var h=r.tilemapLayer,i=d(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=a},97202:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s){n||(n=new d);var h=s.baseTileWidth,i=s.baseTileHeight,o=s.tilemapLayer,f=0,l=0;o&&(e||(e=o.scene.cameras.main),f=o.x+e.scrollX*(1-o.scrollFactorX),h*=o.scaleX,l=o.y+e.scrollY*(1-o.scrollFactorY),i*=o.scaleY);var u=f+a*h+r%2*(h/2),v=l+r*(i/2);return n.set(u,v)};p.exports=c},28054:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=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),a*=r.scaleY),n+t*(a/2)+a};p.exports=S},15108:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s,h){e||(e=new d);var i=h.baseTileWidth,o=h.baseTileHeight,f=h.tilemapLayer;f&&(s||(s=f.scene.cameras.main),r=r-(f.y+s.scrollY*(1-f.scrollFactorY)),o*=f.scaleY,a=a-(f.x+s.scrollX*(1-f.scrollFactorX)),i*=f.scaleX);var l=n?Math.floor(r/(o/2)):r/(o/2),u=n?Math.floor((a+l%2*.5*i)/i):(a+l%2*.5*i)/i;return e.set(u,l)};p.exports=c},51900:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=a.baseTileHeight,n=a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=function(a,r,n,e,s,h,i){for(var o=d(n,e,s,h,null,i),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.x+d.scrollX*(1-r.scrollFactorX),a*=r.scaleX),n+t*a};p.exports=S},70326:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97281),c=t(29650),a=t(26099),r=function(n,e,s,h,i){return s||(s=new a(0,0)),s.x=d(n,h,i),s.y=c(e,h,i),s};p.exports=r},29650:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),a*=r.scaleY),n+t*a};p.exports=S},77366:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(7386),c=t(75508),a=function(r,n,e,s,h,i){if(h){var o,f=d(r,n,e,s,null,i),l=0;for(o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85896),c=t(26099),a=new c,r=function(n,e,s,h){return d(n,0,e,a,s,h),a.x};p.exports=r},85896:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26099),c=function(a,r,n,e,s,h){n===void 0&&(n=!0),e||(e=new d);var i=h.baseTileWidth,o=h.baseTileHeight,f=h.tilemapLayer;f&&(s||(s=f.scene.cameras.main),a=a-(f.x+s.scrollX*(1-f.scrollFactorX)),r=r-(f.y+s.scrollY*(1-f.scrollFactorY)),i*=f.scaleX,o*=f.scaleY);var l=a/i,u=r/o;return n&&(l=Math.floor(l),u=Math.floor(u)),e.set(l,u)};p.exports=c},63288:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85896),c=t(26099),a=new c,r=function(n,e,s,h){return d(0,n,e,a,s,h),a.y};p.exports=r},81086:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79291),c=t(21829),a={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)};a=d(!1,a,c.ORIENTATION),p.exports=a},14977:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(91907),a=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=a(e,"name","layer"),this.id=a(e,"id",0),this.x=a(e,"x",0),this.y=a(e,"y",0),this.width=a(e,"width",0),this.height=a(e,"height",0),this.tileWidth=a(e,"tileWidth",0),this.tileHeight=a(e,"tileHeight",0),this.baseTileWidth=a(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=a(e,"baseTileHeight",this.tileHeight),this.orientation=a(e,"orientation",c.ORTHOGONAL),this.widthInPixels=a(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=a(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=a(e,"alpha",1),this.visible=a(e,"visible",!0),this.properties=a(e,"properties",[]),this.indexes=a(e,"indexes",[]),this.collideIndexes=a(e,"collideIndexes",[]),this.callbacks=a(e,"callbacks",[]),this.bodies=a(e,"bodies",[]),this.data=a(e,"data",[]),this.tilemapLayer=a(e,"tilemapLayer",null),this.hexSideLength=a(e,"hexSideLength",0),this.staggerAxis=a(e,"staggerAxis","y"),this.staggerIndex=a(e,"staggerIndex","odd")}});p.exports=r},87010:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(91907),a=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=a(e,"name","map"),this.width=a(e,"width",0),this.height=a(e,"height",0),this.infinite=a(e,"infinite",!1),this.tileWidth=a(e,"tileWidth",0),this.tileHeight=a(e,"tileHeight",0),this.widthInPixels=a(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=a(e,"heightInPixels",this.height*this.tileHeight),this.format=a(e,"format",null),this.orientation=a(e,"orientation",c.ORTHOGONAL),this.renderOrder=a(e,"renderOrder","right-down"),this.version=a(e,"version","1"),this.properties=a(e,"properties",{}),this.layers=a(e,"layers",[]),this.images=a(e,"images",[]),this.objects=a(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=a(e,"collision",{}),this.tilesets=a(e,"tilesets",[]),this.imageCollections=a(e,"imageCollections",[]),this.tiles=a(e,"tiles",[]),this.hexSideLength=a(e,"hexSideLength",0),this.staggerAxis=a(e,"staggerAxis","y"),this.staggerIndex=a(e,"staggerIndex","odd")}});p.exports=r},48700:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=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=a},6641:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91907),c=function(a){return a=a.toLowerCase(),a==="isometric"?d.ISOMETRIC:a==="staggered"?d.STAGGERED:a==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};p.exports=c},46177:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(80341),c=t(2342),a=t(82593),r=t(46594),n=t(87021),e=function(s,h,i,o,f,l){var u;switch(h){case d.ARRAY_2D:u=c(s,i,o,f,l);break;case d.CSV:u=a(s,i,o,f,l);break;case d.TILED_JSON:u=r(s,i,l);break;case d.WELTMEISTER:u=n(s,i,l);break;default:console.warn("Unrecognized tilemap data format: "+h),u=null}return u};p.exports=e},2342:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(80341),c=t(14977),a=t(87010),r=t(23029),n=function(e,s,h,i,o){for(var f=new c({tileWidth:h,tileHeight:i}),l=new a({name:e,tileWidth:h,tileHeight:i,format:d.ARRAY_2D,layers:[f]}),u=[],v=s.length,g=0,x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(80341),c=t(2342),a=function(r,n,e,s,h){var i=n.trim().split(` +`).map(function(f){return f.split(",")}),o=c(r,i,e,s,h);return o.format=d.CSV,o};p.exports=a},6656:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14977),c=t(23029),a=function(r,n){for(var e=[],s=0;s-1?g=new c(i,v,u,l,h.tilesize,h.tilesize):g=n?null:new c(i,-1,u,l,h.tilesize,h.tilesize),o.push(g)}f.push(o),o=[]}i.data=f,e.push(i)}return e};p.exports=a},96483:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33629),c=function(a){for(var r=[],n=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(80341),c=t(87010),a=t(6656),r=t(96483),n=function(e,s,h){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,o=0,f=0;fi&&(i=s.layer[f].width),s.layer[f].height>o&&(o=s.layer[f].height);var l=new c({width:i,height:o,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return l.layers=a(s,h),l.tilesets=r(s),l};p.exports=n},52833:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79291),c=function(a){for(var r,n,e,s,h,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 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,a=new Array(c/4),r=0;r>>0;return a};p.exports=S},84101:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33629),c=function(a){var r,n,e=[];for(r=0;r{/** + * @author Seth Berrier + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=function(a,r,n){if(!r)return{i:0,layers:a.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*a.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=2147483648,t=1073741824,d=536870912,c=function(a){var r=!!(a&S),n=!!(a&t),e=!!(a&d);a=a&~(S|t|d);var s=0,h=!1;return r&&n&&e?(s=Math.PI/2,h=!0):r&&n&&!e?(s=Math.PI,h=!1):r&&!n&&e?(s=Math.PI/2,h=!1):r&&!n&&!e?(s=0,h=!0):!r&&n&&e?(s=3*Math.PI/2,h=!1):!r&&n&&!e?(s=Math.PI,h=!0):!r&&!n&&e?(s=3*Math.PI/2,h=!0):!r&&!n&&!e&&(s=0,h=!1),{gid:a,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:h}};p.exports=c},12635:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=t(79677),a=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 h=s.layers[s.i];if(s.i++,h.type!=="imagelayer"){if(h.type==="group"){var i=c(r,h,s);e.push(s),s=i}continue}var o=d(h,"offsetx",0)+d(h,"startx",0),f=d(h,"offsety",0)+d(h,"starty",0);n.push({name:s.name+h.name,image:h.image,x:s.x+o+h.x,y:s.y+f+h.y,alpha:s.opacity*h.opacity,visible:s.visible&&h.visible,properties:d(h,"properties",{})})}return n};p.exports=a},46594:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(51233),c=t(84101),a=t(91907),r=t(62644),n=t(80341),e=t(6641),s=t(87010),h=t(12635),i=t(22611),o=t(28200),f=t(24619),l=function(u,v,g){var x=r(v),m=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});m.orientation===a.HEXAGONAL&&(m.hexSideLength=x.hexsidelength,m.staggerAxis=x.staggeraxis,m.staggerIndex=x.staggerindex),m.layers=o(x,g),m.images=h(x);var y=f(x);return m.tilesets=y.tilesets,m.imageCollections=y.imageCollections,m.objects=i(x),m.tiles=c(m),d(m),m};p.exports=l},52205:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(18254),c=t(29920),a=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,s,h){s===void 0&&(s=0),h===void 0&&(h=0);var i=d(e,r);if(i.x+=s,i.y+=h,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(a):e.polygon?i.polygon=e.polygon.map(a):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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95540),c=t(52205),a=t(48700),r=t(79677),n=function(e){for(var s=[],h=[],i=r(e);i.i0;){if(i.i>=i.layers.length){if(h.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=h.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 f=r(e,o,i);h.push(i),i=f}continue}o.name=i.name+o.name;for(var l=i.x+d(o,"startx",0)+d(o,"offsetx",0),u=i.y+d(o,"starty",0)+d(o,"offsety",0),v=[],g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41868),c=t(91907),a=t(79677),r=t(6641),n=t(95540),e=t(14977),s=t(29920),h=t(23029),i=function(o,f){for(var l=n(o,"infinite",!1),u=[],v=[],g=a(o);g.i0;){if(g.i>=g.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}g=v.pop();continue}var x=g.layers[g.i];if(g.i++,x.type!=="tilelayer"){if(x.type==="group"){var m=a(o,x,g);v.push(g),g=m}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?(C=new h(T,E.gid,B,N,o.tilewidth,o.tileheight),C.rotation=E.rotation,C.flipX=E.flipped,P[N][B]=C):(A=f?null:new h(T,-1,B,N,o.tilewidth,o.tileheight),P[N][B]=A),M++,M===U.width&&(G++,M=0)}}else{T=new e({name:g.name+x.name,id:x.id,x:g.x+n(x,"offsetx",0)+x.x,y:g.y+n(x,"offsety",0)+x.y,width:x.width,height:x.height,tileWidth:o.tilewidth,tileHeight:o.tileheight,alpha:g.opacity*x.opacity,visible:g.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);for(var X=[],V=0,Y=x.data.length;V0?(C=new h(T,E.gid,M,P.length,o.tilewidth,o.tileheight),C.rotation=E.rotation,C.flipX=E.flipped,X.push(C)):(A=f?null:new h(T,-1,M,P.length,o.tilewidth,o.tileheight),X.push(A)),M++,M===x.width&&(P.push(X),M=0,X=[])}T.data=P,u.push(T)}return u};p.exports=i},24619:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33629),c=t(16536),a=t(52205),r=t(57880),n=function(e){for(var s=[],h=[],i=null,o,f=0;f1){var v=void 0,g=void 0;if(Array.isArray(l.tiles)){v=v||{},g=g||{};for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2024 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,h,i;if(Array.isArray(a.edgecolors))for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(37277),a=t(44594),r=t(94880),n=t(72905),e=new d({initialize:function(h){this.scene=h,this.systems=h.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],h.sys.events.once(a.BOOT,this.boot,this),h.sys.events.on(a.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var s=this.systems.events;s.on(a.PRE_UPDATE,this.preUpdate,this),s.on(a.UPDATE,this.update,this),s.once(a.SHUTDOWN,this.shutdown,this)},addEvent:function(s){var h;return s instanceof r?(h=s,this.removeEvent(h),h.elapsed=h.startAt,h.hasDispatched=!1,h.repeatCount=h.repeat===-1||h.loop?999999999999:h.repeat):h=new r(s),this._pendingInsertion.push(h),h},delayedCall:function(s,h,i,o){return this.addEvent({delay:s,callback:h,args:i,callbackScope:o})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var h=0;h-1&&this._active.splice(f,1),o.destroy()}for(i=0;i=o.delay)){var f=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--,f>=o.delay)for(;f>=o.delay&&o.repeatCount>0;)o.callback&&o.callback.apply(o.callbackScope,o.args),f-=o.delay,o.repeatCount--;o.elapsed=f,o.hasDispatched=!1}else o.hasDispatched&&this._pendingRemoval.push(o)}}}},shutdown:function(){var s;for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=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.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var f=this.systems.events;f.on(n.PRE_UPDATE,this.preUpdate,this),f.on(n.UPDATE,this.update,this),f.once(n.SHUTDOWN,this.destroy,this),o&&this.add(o)},preUpdate:function(h,i){this.paused||(this.elapsed+=i)},update:function(){if(!(this.paused||this.complete)){var h,i=this.events,o=!1,f=this.systems,l;for(h=0;h=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(h){return h===void 0&&(h=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,h&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(h){return(h===void 0||h===!0)&&(h=-1),h===!1&&(h=0),this.loop=h,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(h){h===void 0&&(h=!1),this.elapsed=0,h||(this.iteration=0);for(var i=0;i0&&(o=i[i.length-1].time);for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(95540),a=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.repeat>0||this.loop))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=a},35945:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},89809:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72905),c=t(83419),a=t(43491),r=t(88032),n=t(37277),e=t(44594),s=t(93109),h=t(86081),i=t(8357),o=t(43960),f=t(26012),l=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=[],g=0;g-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 g=this.prevTime-this.startTime,x=g-this.nextTime,m=g-this.time*1e3;return x>0||u?(g/=1e3,this.time=g,this.nextTime+=x+(x>=this.gap?4:this.gap-x)):m=0,m},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 g,x,m=[],y=this.tweens;for(g=0;g0){for(g=0;g-1&&(x.isPendingRemove()||x.isDestroyed())&&(y.splice(E,1),x.destroy())}m.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 g,x=[null];for(g=1;g{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62640),c=t(35355),a=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 h=s.toLowerCase();h==="in"?s="easeIn":h==="out"?s="easeOut":h==="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=a},91389:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(89318),c=t(77259),a=t(28392),r={bezier:d,catmull:c,catmullrom:c,linear:a},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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a;if(t.hasOwnProperty(d)){var r=typeof t[d];r==="function"?a=function(n,e,s,h,i,o){return t[d](n,e,s,h,i,o)}:a=function(){return t[d]}}else typeof c=="function"?a=c:a=function(){return c};return a};p.exports=S},82985:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(81076),c=function(a){var r,n=[];if(a.hasOwnProperty("props"))for(r in a.props)r.substring(0,1)!=="_"&&n.push({key:r,value:a.props[r]});else for(r in a)d.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:a[r]});return n};p.exports=c},62329:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35154),c=function(a){var r=d(a,"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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30976),c=t(99472);function a(h){return!!h.getActive&&typeof h.getActive=="function"}function r(h){return!!h.getStart&&typeof h.getStart=="function"}function n(h){return!!h.getEnd&&typeof h.getEnd=="function"}function e(h){return r(h)||n(h)||a(h)}var s=function(h,i){var o,f=function(U,z,w){return w},l=function(U,z,w){return w},u=null,v=typeof i;if(v==="number")f=function(){return i};else if(Array.isArray(i))l=function(){return i[0]},f=function(){return i[i.length-1]};else if(v==="string"){var g=i.toLowerCase(),x=g.substring(0,6)==="random",m=g.substring(0,3)==="int";if(x||m){var y=g.indexOf("("),T=g.indexOf(")"),E=g.indexOf(",");if(y&&T&&E){var C=parseFloat(g.substring(y+1,E)),A=parseFloat(g.substring(E+1,T));x?f=function(){return c(C,A)}:f=function(){return d(C,A)}}else throw new Error("invalid random() format")}else{g=g[0];var P=parseFloat(i.substr(2));switch(g){case"+":f=function(U,z,w){return w+P};break;case"-":f=function(U,z,w){return w-P};break;case"*":f=function(U,z,w){return w*P};break;case"/":f=function(U,z,w){return w/P};break;default:f=function(){return parseFloat(i)}}}}else if(v==="function")f=i;else if(v==="object")if(e(i))a(i)&&(u=i.getActive),n(i)&&(f=i.getEnd),r(i)&&(l=i.getStart);else if(i.hasOwnProperty("value"))o=s(h,i.value);else{var M=i.hasOwnProperty("to"),F=i.hasOwnProperty("from"),L=i.hasOwnProperty("start");if(M&&(F||L)){if(o=s(h,i.to),L){var D=s(h,i.start);o.getActive=D.getEnd}if(F){var I=s(h,i.from);o.getStart=I.getEnd}}}return o||(o={getActive:u,getEnd:f,getStart:l}),o};p.exports=s},88032:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70402),c=t(69902),a=t(23568),r=t(57355),n=t(6113),e=t(55292),s=t(35154),h=t(17777),i=t(269),o=t(86081),f=function(l,u,v){if(u instanceof o)return u.parent=l,u;v===void 0?v=c:v=i(c,v);var g=s(u,"from",0),x=s(u,"to",1),m=[{value:g}],y=s(u,"delay",v.delay),T=s(u,"easeParams",v.easeParams),E=s(u,"ease",v.ease),C=h("value",x),A=new o(l,m),P=A.add(0,"value",C.getEnd,C.getStart,C.getActive,n(s(u,"ease",E),s(u,"easeParams",T)),e(u,"delay",y),s(u,"duration",v.duration),r(u,"yoyo",v.yoyo),s(u,"hold",v.hold),s(u,"repeat",v.repeat),s(u,"repeatDelay",v.repeatDelay),!1,!1);P.start=g,P.current=g,A.completeDelay=a(u,"completeDelay",0),A.loop=Math.round(a(u,"loop",0)),A.loopDelay=Math.round(a(u,"loopDelay",0)),A.paused=r(u,"paused",!1),A.persist=r(u,"persist",!1),A.callbackScope=s(u,"callbackScope",A);for(var M=d.TYPES,F=0;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6113),c=t(35154),a=t(36383),r=function(n,e){e===void 0&&(e={});var s,h=c(e,"start",0),i=c(e,"ease",null),o=c(e,"grid",null),f=c(e,"from",0),l=f==="first",u=f==="center",v=f==="last",g=typeof f=="number",x=Array.isArray(n),m=parseFloat(x?n[0]:n),y=x?parseFloat(n[1]):0,T=Math.max(m,y);if(x&&(h+=m),o){var E=o[0],C=o[1],A=0,P=0,M=0,F=0,L=[];v?(A=E-1,P=C-1):g?(A=f%E,P=Math.floor(f/E)):u&&(A=(E-1)/2,P=(C-1)/2);for(var D=a.MIN_SAFE_INTEGER,I=0;ID&&(D=z),L[I][U]=z}}}var w=i?d(i):null;return o?s=function(G,R,O,B){var N=0,X=B%E,V=Math.floor(B/E);X>=0&&X=0&&V{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70402),c=t(69902),a=t(23568),r=t(57355),n=t(6113),e=t(91389),s=t(55292),h=t(82985),i=t(62329),o=t(35154),f=t(17777),l=t(269),u=t(86081),v=function(g,x,m){if(x instanceof u)return x.parent=g,x;m===void 0?m=c:m=l(c,m);var y=i(x);!y&&m.targets&&(y=m.targets);for(var T=h(x),E=o(x,"delay",m.delay),C=o(x,"duration",m.duration),A=o(x,"easeParams",m.easeParams),P=o(x,"ease",m.ease),M=o(x,"hold",m.hold),F=o(x,"repeat",m.repeat),L=o(x,"repeatDelay",m.repeatDelay),D=r(x,"yoyo",m.yoyo),I=r(x,"flipX",m.flipX),U=r(x,"flipY",m.flipY),z=o(x,"interpolation",m.interpolation),w=function(b,K,J,Z){if(J==="texture"){var $=Z,q=void 0;Array.isArray(Z)?($=Z[0],q=Z[1]):Z.hasOwnProperty("value")?($=Z.value,Array.isArray(Z.value)?($=Z.value[0],q=Z.value[1]):typeof Z.value=="string"&&($=Z.value)):typeof Z=="string"&&($=Z),b.addFrame(K,$,q,s(Z,"delay",E),o(Z,"duration",C),o(Z,"hold",M),o(Z,"repeat",F),o(Z,"repeatDelay",L),r(Z,"flipX",I),r(Z,"flipY",U))}else{var tt=f(J,Z),_=e(o(Z,"interpolation",z));b.add(K,J,tt.getEnd,tt.getStart,tt.getActive,n(o(Z,"ease",P),o(Z,"easeParams",A)),s(Z,"delay",E),o(Z,"duration",C),r(Z,"yoyo",D),o(Z,"hold",M),o(Z,"repeat",F),o(Z,"repeatDelay",L),r(Z,"flipX",I),r(Z,"flipY",U),_,_?Z:null)}},G=new u(g,y),R=0;R{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70402),c=t(23568),a=t(57355),r=t(62329),n=t(35154),e=t(8357),s=t(43960),h=function(i,o){if(o instanceof s)return o.parent=i,o;var f=new s(i);f.startDelay=n(o,"delay",0),f.completeDelay=c(o,"completeDelay",0),f.loop=Math.round(c(o,"loop",n(o,"repeat",0))),f.loopDelay=Math.round(c(o,"loopDelay",n(o,"repeatDelay",0))),f.paused=a(o,"paused",!1),f.persist=a(o,"persist",!1),f.callbackScope=n(o,"callbackScope",f);var l,u=d.TYPES;for(l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="active"},98540:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},67233:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},2859:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},98336:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="repeat"},25764:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},32193:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},84371:p=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},70766:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},55659:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="yoyo"},842:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(50792),a=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(a.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(a.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(a.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(a.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(a.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,s,h){return h===void 0&&(h=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:s,params:h}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE},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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83419),c=t(842),a=t(86353),r=new d({initialize:function(e,s,h,i,o,f,l,u,v,g){this.tween=e,this.targetIndex=s,this.duration=i,this.totalDuration=0,this.delay=0,this.getDelay=h,this.yoyo=o,this.hold=f,this.repeat=l,this.repeatDelay=u,this.repeatCounter=0,this.flipX=v,this.flipY=g,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=a.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=a.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=a.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=a.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=a.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=a.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=a.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=a.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===a.CREATED},isDelayed:function(){return this.state===a.DELAY},isPendingRender:function(){return this.state===a.PENDING_RENDER},isPlayingForward:function(){return this.state===a.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===a.PLAYING_BACKWARD},isHolding:function(){return this.state===a.HOLD_DELAY},isRepeating:function(){return this.state===a.REPEAT_DELAY},isComplete:function(){return this.state===a.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,h=n.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(h,i,0,s,e,n),this.repeatCounter=this.repeat===-1?a.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var f=o+this.repeatDelay;this.totalDuration=this.delay+o,this.repeat===-1?(this.totalDuration+=f*a.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=f*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,s){var h=this.tween,i=h.totalTargets,o=this.targetIndex,f=h.targets[o],l=this.key,u=l!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&f.toggleFlipX(),this.flipY&&f.toggleFlipY(),u&&(e||s)&&(this.start=this.getStartValue(f,l,this.start,o,i,h)),s){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,u&&(this.end=this.getEndValue(f,l,this.start,o,i,h)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,u&&(this.current=this.start,f[l]=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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70402),c=t(83419),a=t(842),r=t(44603),n=t(39429),e=t(36383),s=t(86353),h=t(48177),i=t(42220),o=new c({Extends:d,initialize:function(l,u){d.call(this,l),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},add:function(f,l,u,v,g,x,m,y,T,E,C,A,P,M,F,L){var D=new h(this,f,l,u,v,g,x,m,y,T,E,C,A,P,M,F,L);return this.totalData=this.data.push(D),D},addFrame:function(f,l,u,v,g,x,m,y,T,E){var C=new i(this,f,l,u,v,g,x,m,y,T,E);return this.totalData=this.data.push(C),C},getValue:function(f){f===void 0&&(f=0);var l=null;return this.data&&(l=this.data[f].current),l},hasTarget:function(f){return this.targets&&this.targets.indexOf(f)!==-1},updateTo:function(f,l,u){if(u===void 0&&(u=!1),f!=="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(a.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(f,l,u){if(f===void 0&&(f=0),l===void 0&&(l=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(a.TWEEN_ACTIVE,"onActive");var v=this.paused;if(this.paused=!1,f>0){for(var g=Math.floor(f/l),x=f-g*l,m=0;m0&&this.update(x)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(f){f===void 0&&(f=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var l=this.data,u=0;u0?this.totalDuration=v+g+(v+m)*x:this.totalDuration=v+g},reset:function(f){return f===void 0&&(f=!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),f||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive")),this},update:function(f){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(f*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(f),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(f),!1;this.hasStarted||(this.startDelay-=f,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(a.TWEEN_START,"onStart"),f=0));var l=!1;if(this.isActive())for(var u=this.data,v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72905),c=t(70402),a=t(83419),r=t(842),n=t(44603),e=t(39429),s=t(86353),h=new a({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.dispatchEvent(r.TWEEN_ACTIVE,"onActive"),this},add:function(i){var o=this.parent.create(i);Array.isArray(o)||(o=[o]);for(var f=this.data,l=0;l0)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,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95042),c=t(45319),a=t(83419),r=t(842),n=new a({Extends:d,initialize:function(s,h,i,o,f,l,u,v,g,x,m,y,T,E,C,A,P){d.call(this,s,h,v,g,x,m,y,T,E,C),this.key=i,this.getActiveValue=l,this.getEndValue=o,this.getStartValue=f,this.ease=u,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=A,this.interpolationData=P},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex],h=this.key;e&&(s[h]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(s[h]=this.getActiveValue(s,h,0))},update:function(e){var s=this.tween,h=s.totalTargets,i=this.targetIndex,o=s.targets[i],f=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,f,o[f],i,h,s),this.end=this.getEndValue(o,f,this.start,i,h,s),this.current=this.start,o[f]=this.start,this.setPlayingForwardState(),!0;var l=this.isPlayingForward(),u=this.isPlayingBackward();if(l||u){var v=this.elapsed,g=this.duration,x=0,m=!1;v+=e,v>=g?(x=v-g,v=g,m=!0):v<0&&(v=0);var y=c(v/g,0,1);if(this.elapsed=v,this.progress=y,this.previous=this.current,m)l?(this.current=this.end,o[f]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(x)):(this.current=this.start,o[f]=this.start,this.setStateFromStart(x));else{l||(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[f]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var h=this.tween;if(!h.isSeeking){var i=h.targets[this.targetIndex],o=this.key,f=this.current,l=this.previous;h.emit(e,h,o,i,f,l);var u=h.callbacks[s];u&&u.func.apply(h.callbackScope,[h,i,o,f,l].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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95042),c=t(45319),a=t(83419),r=t(842),n=new a({Extends:d,initialize:function(s,h,i,o,f,l,u,v,g,x,m){d.call(this,s,h,f,l,!1,u,v,g,x,m),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,h=this.targetIndex,i=s.targets[h];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(),f=this.isPlayingBackward();if(o||f){var l=this.elapsed,u=this.duration,v=0,g=!1;l+=e,l>=u?(v=l-u,l=u,g=!0):l<0&&(l=0);var x=c(l/u,0,1);this.elapsed=l,this.progress=x,g&&(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 h=this.tween;if(!h.isSeeking){var i=h.targets[this.targetIndex],o=this.key;h.emit(e,h,o,i);var f=h.callbacks[s];f&&f.func.apply(h.callbackScope,[h,i,o].concat(f.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-2024 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-2024 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 h=s?n[e]:Object.getOwnPropertyDescriptor(n,e);return!s&&h.value&&typeof h.value=="object"&&(h=h.value),h&&S(h)?(typeof h.enumerable>"u"&&(h.enumerable=!0),typeof h.configurable>"u"&&(h.configurable=!0),h):!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,h){for(var i in e)if(e.hasOwnProperty(i)){var o=t(e,i,s);if(o!==!1){var f=h||n;if(d(f.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 a(n,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,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),a&&a.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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),a>0){var e=a-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;a>0&&s>e&&(d.splice(e),s=e);for(var h=s-1;h>=0;h--){var i=d[h];t.splice(c,0,i),r&&r.call(n,i)}return d};p.exports=S},66905:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82011),c=function(a,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=a.length);var h=0;if(d(a,e,s))for(var i=e;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a,r=[null];for(a=3;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82011),c=function(a,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=a.length),d(a,e,s)){var h,i=[null];for(h=5;h{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=1,r,n;if(c){if(td.length&&(a=d.length),c?(r=d[a-1][c],n=d[a][c],n-t<=t-r?d[a]:d[a-1]):(r=d[a-1],n=d[a],n-t<=t-r?n:r)};p.exports=S},43491:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82011),c=function(a,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=a.length);var h=[];if(d(a,e,s))for(var i=e;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82011),c=function(a,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=a.length),d(a,e,s))for(var h=e;h{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=d+Math.floor(Math.random()*c);return t[a]===void 0?null:t[a]};p.exports=S},85835:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===c)return t;var a=t.indexOf(d),r=t.indexOf(c);if(a<0||r<0)throw new Error("Supplied items must be elements of the same array");return a>r||(t.splice(a,1),r===t.length-1?t.push(d):t.splice(r,0,d)),t};p.exports=S},83371:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===c)return t;var a=t.indexOf(d),r=t.indexOf(c);if(a<0||r<0)throw new Error("Supplied items must be elements of the same array");return a{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=t[c-1],r=t.indexOf(a);t[c]=a,t[r]=d}return t};p.exports=S},69693:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=t.indexOf(d);if(a===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return a!==c&&(t.splice(a,1),t.splice(c,0,d)),d};p.exports=S},40853:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=[],n,e=!1;if((c||a)&&(e=!0,c||(c=""),a||(a="")),d=d;n--)e?r.push(c+n.toString()+a):r.push(n);else for(n=t;n<=d;n++)e?r.push(c+n.toString()+a):r.push(n);return r};p.exports=S},593:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2284),c=function(a,r,n){a===void 0&&(a=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=a,a=0);for(var e=[],s=Math.max(d((r-a)/(n||1)),0),h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(c,a,r){var n=c[a];c[a]=c[r],c[r]=n}function t(c,a){return ca?1:0}var d=function(c,a,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,h=a-r+1,i=Math.log(s),o=.5*Math.exp(2*i/3),f=.5*Math.sqrt(i*o*(s-o)/s)*(h-s/2<0?-1:1),l=Math.max(r,Math.floor(a-h*o/s+f)),u=Math.min(n,Math.floor(a+(s-h)*o/s+f));d(c,a,l,u,e)}var v=c[a],g=r,x=n;for(S(c,r,a),e(c[n],v)>0&&S(c,r,n);g0;)x--}e(c[r],v)===0?S(c,r,x):(x++,S(c,x,n)),x<=a&&(r=x+1),a<=x&&(n=x-1)}};p.exports=d},88492:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35154),c=t(33680),a=function(n,e,s){for(var h=[],i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19133),c=function(a,r,n,e){e===void 0&&(e=a);var s;if(!Array.isArray(r))return s=a.indexOf(r),s!==-1?(d(a,s),n&&n.call(e,r),r):null;for(var h=r.length-1,i=[];h>=0;){var o=r[h];s=a.indexOf(o),s!==-1&&(d(a,s),i.push(o),n&&n.call(e,o)),h--}return i};p.exports=c},60248:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19133),c=function(a,r,n,e){if(e===void 0&&(e=a),r<0||r>a.length-1)throw new Error("Index out of bounds");var s=d(a,r);return n&&n.call(e,s),s};p.exports=c},81409:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82011),c=function(a,r,n,e,s){if(r===void 0&&(r=0),n===void 0&&(n=a.length),s===void 0&&(s=a),d(a,r,n)){var h=n-r,i=a.splice(r,h);if(e)for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19133),c=function(a,r,n){r===void 0&&(r=0),n===void 0&&(n=a.length);var e=r+Math.floor(Math.random()*n);return d(a,e)};p.exports=c},42169:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=t.indexOf(d),r=t.indexOf(c);return a!==-1&&r===-1?(t[a]=c,!0):!1};p.exports=S},86003:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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,a=0;a{/** + * @author Richard Davey + * @copyright 2013-2024 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,a=0;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){var r=t.length;if(d<0||d>r||d>=c||c>r){if(a)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=S},89545:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82011),c=function(a,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=a.length),d(a,e,s))for(var h=e;h{/** + * @author Richard Davey + * @copyright 2013-2024 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)),a=t[d];t[d]=t[c],t[c]=a}return t};p.exports=S},90126:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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,a){return parseInt(c.replace(d,""),10)-parseInt(a.replace(d,""),10)}),t};p.exports=S},19133:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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,a=t[d],r=d;r{/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2024 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 a(e,s){var h=e.length;if(h<=1)return e;for(var i=new Array(h),o=1;oo&&(v=o),g>o&&(g=o),x=u,m=v;;)if(x{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===c)return t;var a=t.indexOf(d),r=t.indexOf(c);if(a<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[a]=c,t[r]=d,t};p.exports=S},37105:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41836),c=t(86922),a=function(r){var n="";if(!c(r))return n;for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37829),c=function(a){return d(a,180)};p.exports=c},44657:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37829),c=function(a,r){r===void 0&&(r=1);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(86922),c=t(2429),a=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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37829),c=function(a,r){r===void 0&&(r=1);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(86003),c=t(49498),a=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-2024 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,a=new Array(c),r=0;r-1;n--)a[r][n]=t[n][r]}return a};p.exports=S},54915:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var a=new Uint8Array(d),r=a.length,n=c?"data:"+c+";base64,":"",e=0;e>2],n+=S[(a[e]&3)<<4|a[e+1]>>4],n+=S[(a[e+1]&15)<<2|a[e+2]>>6],n+=S[a[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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d>4,l[e++]=(h&15)<<4|i>>2,l[e++]=(i&3)<<6|o&63;return f};p.exports=c},65839:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d,c,a;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(a in t)c=t[a],d[a]=S(c);return d};p.exports=S},79291:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41212),c=function(){var a,r,n,e,s,h,i=arguments[0]||{},o=1,f=arguments.length,l=!1;for(typeof i=="boolean"&&(l=i,i=arguments[1]||{},o=2),f===o&&(i=this,--o);o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75508),c=t(35154),a=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=a},95540:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var a=typeof t;return!t||a==="number"||a==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S},82840:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35154),c=t(45319),a=function(r,n,e,s,h){h===void 0&&(h=e);var i=d(r,n,h);return c(i,e,s)};p.exports=a},35154:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){if(!t&&!a||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(a&&a.hasOwnProperty(d))return a[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=a,s=c,h=c,i=!0,o=!0,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41786),c=function(a,r){var n=d(a);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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(41786),c=function(a,r){var n=d(a);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-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97022),c=function(a,r){for(var n={},e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 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 a=d.split("."),r=t,n=t,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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,a){return d[Number(a)-1]})};p.exports=S},41836:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,a){d===void 0&&(d=0),c===void 0&&(c=" "),a===void 0&&(a=3),t=t.toString();var r=0;if(d+1>=t.length)switch(a){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-2024 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-1)+t.slice(d)};p.exports=S},27671:p=>{/** + * @author Richard Davey + * @copyright 2013-2024 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-2024 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-2024 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-2024 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)}}},gt={};function at(p){var S=gt[p];if(S!==void 0)return S.exports;var t=gt[p]={exports:{}};return dt[p](t,t.exports,at),t.exports}at.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var pt=at(85454);return pt})())})(Rt);var wt=Rt.exports;const Ct=Dt(wt);function Bt(lt,ct){return new Promise(dt=>{lt.events.on(Ct.Scenes.Events.CREATE,()=>{const gt={ease:Ct.Math.Easing.Expo.InOut,from:0,start:0,to:2.5};lt.tweens.add({duration:3500,scaleX:gt,scaleY:gt,targets:ct,onComplete:()=>{dt()}})})})}var Pt,Ft;class It extends Ct.Scene{constructor(){super({key:"MainScene"});At(this,Pt)}preload(){this.load.image("BACKGROUND","assets/images/ansimuz/starfighter/background.png"),this.load.spritesheet("SHIP","assets/images/ansimuz/warped-vehicle/ship.png",{frameWidth:176,frameHeight:96})}create(){const{height:dt,width:gt}=this.scale;this.add.image(0,0,"BACKGROUND",0).setOrigin(0),Mt(this,Pt,Ft).call(this);const at=this.add.circle(gt/2,dt/2,dt/2).setVisible(!1),pt=at.createGeometryMask();this.cameras.main.setMask(pt),Bt(this,at).then(()=>{console.log("scene transition done")}).catch(()=>{})}}Pt=new WeakSet,Ft=function(){this.anims.create({key:"SHIP_IDLE",frames:this.anims.generateFrameNumbers("SHIP"),frameRate:6,repeat:-1});const{height:dt,width:gt}=this.scale,at=this.add.sprite(0,dt/2,"SHIP",0);at.play("SHIP_IDLE"),this.tweens.add({targets:at,x:gt,duration:6e3})};window.onload=()=>{const lt={type:Ct.CANVAS,pixelArt:!0,scale:{zoom:3,parent:"game-container",width:420,height:240},backgroundColor:"#000000",scene:It};new Ct.Game(lt)}; diff --git a/examples/scene-transition-geometry-mask/index.html b/examples/scene-transition-geometry-mask/index.html new file mode 100644 index 0000000..0263ca9 --- /dev/null +++ b/examples/scene-transition-geometry-mask/index.html @@ -0,0 +1,27 @@ + + + + + Phaser 3 Example - Geometry Mask + + + + +
+

Phaser 3 Example: Custom Scene Transition With Geometry Mask

+
+ + diff --git a/index.html b/index.html index eb9cf76..f15622c 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@

Examples

  • Shader Examples
  • Shader Battle Scene Transitions Examples
  • Scene Transition With Bitmap Mask Example
  • +
  • Scene Transition With Geometry Mask Example