PageSourceSearch

https://piggy-wanna.ok.kimi.link/assets/index-ykMpGagk.js

js piggy-wanna.ok.kimi.link collected 2026-10-03 05:06:22 UTC 1,793,938 bytes, 6,419 lines download raw bytes

1var Wn=Object.defineProperty;var Hn=($,N,C)=>N in $?Wn($,N,{enumerable:!0,configurable:!0,writable:!0,value:C}):$[N]=C;var H=($,N,C)=>Hn($,typeof N!="symbol"?N+"":N,C);(function(){const N=document.createElement("link").relList;if(N&&N.supports&&N.supports("modulepreload"))return;for(const R of document.querySelectorAll('link[rel="modulepreload"]'))w(R);new MutationObserver(R=>{for(const b of R)if(b.type==="childList")for(const c of b.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&w(c)}).observe(document,{childList:!0,subtree:!0});function C(R){const b={};return R.integrity&&(b.integrity=R.integrity),R.referrerPolicy&&(b.referrerPolicy=R.referrerPolicy),R.crossOrigin==="use-credentials"?b.credentials="include":R.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function w(R){if(R.ep)return;R.ep=!0;const b=C(R);fetch(R.href,b)}})();var Kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jn($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var On={exports:{}};(function($,N){(function(w,R){$.exports=R()})(Kn,()=>(()=>{var C={50792:c=>{var x=Object.prototype.hasOwnProperty,t="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(t=!1));function p(e,s,h){this.fn=e,this.context=s,this.once=h||!1}function a(e,s,h,i,l){if(typeof h!="function")throw new TypeError("The listener must be a function");var u=new p(h,i||e,l),d=t?t+s:s;return e._events[d]?e._events[d].fn?e._events[d]=[e._events[d],u]:e._events[d].push(u):(e._events[d]=u,e._eventsCount++),e}function n(e,s){--e._eventsCount===0?e._events=new o:delete e._events[s]}function r(){this._events=new o,this._eventsCount=0}r.prototype.eventNames=function(){var s=[],h,i;if(this._eventsCount===0)return s;for(i in h=this._events)x.call(h,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(h)):s},r.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 l=0,u=i.length,d=new Array(u);l<u;l++)d[l]=i[l].fn;return d},r.prototype.listenerCount=function(s){var h=t?t+s:s,i=this._events[h];return i?i.fn?1:i.length:0},r.prototype.emit=function(s,h,i,l,u,d){var f=t?t+s:s;if(!this._events[f])return!1;var v=this._events[f],m=arguments.length,y,g;if(v.fn){switch(v.once&&this.removeListener(s,v.fn,void 0,!0),m){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,h),!0;case 3:return v.fn.call(v.context,h,i),!0;case 4:return v.fn.call(v.context,h,i,l),!0;case 5:return v.fn.call(v.context,h,i,l,u),!0;case 6:return v.fn.call(v.context,h,i,l,u,d),!0}for(g=1,y=new Array(m-1);g<m;g++)y[g-1]=arguments[g];v.fn.apply(v.context,y)}else{var T=v.length,S;for(g=0;g<T;g++)switch(v[g].once&&this.removeListener(s,v[g].fn,void 0,!0),m){case 1:v[g].fn.call(v[g].context);break;case 2:v[g].fn.call(v[g].context,h);break;case 3:v[g].fn.call(v[g].context,h,i);break;case 4:v[g].fn.call(v[g].context,h,i,l);break;default:if(!y)for(S=1,y=new Array(m-1);S<m;S++)y[S-1]=arguments[S];v[g].fn.apply(v[g].context,y)}}return!0},r.prototype.on=function(s,h,i){return a(this,s,h,i,!1)},r.prototype.once=function(s,h,i){return a(this,s,h,i,!0)},r.prototype.removeListener=function(s,h,i,l){var u=t?t+s:s;if(!this._events[u])return this;if(!h)return n(this,u),this;var d=this._events[u];if(d.fn)d.fn===h&&(!l||d.once)&&(!i||d.context===i)&&n(this,u);else{for(var f=0,v=[],m=d.length;f<m;f++)(d[f].fn!==h||l&&!d[f].once||i&&d[f].context!==i)&&v.push(d[f]);v.length?this._events[u]=v.length===1?v[0]:v:n(this,u)}return this},r.prototype.removeAllListeners=function(s){var h;return s?(h=t?t+s:s,this._events[h]&&n(this,h)):(this._events=new o,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prefixed=t,r.EventEmitter=r,c.exports=r},11517:(c,x,t)=>{/**
2 * @author       samme
3 * @copyright    2013-2025 Phaser Studio Inc.
4 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5 */var o=t(38829),p=function(a,n,r,e){for(var s=a[0],h=1;h<a.length;h++){var i=a[h];o(i,s,n,r,e),s=i}return a};c.exports=p},80318:(c,x,t)=>{/**
6 * @author       Richard Davey <[email protected]>
7 * @copyright    2013-2025 Phaser Studio Inc.
8 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
9 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"angle",n,r,e,s)};c.exports=p},60757:c=>{/**
10 * @author       Richard Davey <[email protected]>
11 * @copyright    2013-2025 Phaser Studio Inc.
12 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
13 */var x=function(t,o,p){for(var a=0;a<t.length;a++){var n=t[a];o.call(p,n)}return t};c.exports=x},69927:c=>{/**
14 * @author       Richard Davey <[email protected]>
15 * @copyright    2013-2025 Phaser Studio Inc.
16 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
17 */var x=function(t,o,p){p===void 0&&(p=0);for(var a=p;a<t.length;a++){var n=t[a],r=!0;for(var e in o)n[e]!==o[e]&&(r=!1);if(r)return n}return null};c.exports=x},32265:c=>{/**
18 * @author       Richard Davey <[email protected]>
19 * @copyright    2013-2025 Phaser Studio Inc.
20 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
21 */var x=function(t,o,p){p===void 0&&(p=0);for(var a=t.length-1;a>=p;a--){var n=t[a],r=!0;for(var e in o)n[e]!==o[e]&&(r=!1);if(r)return n}return null};c.exports=x},94420:(c,x,t)=>{/**
22 * @author       Richard Davey <[email protected]>
23 * @copyright    2013-2025 Phaser Studio Inc.
24 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
25 */var o=t(11879),p=t(60461),a=t(95540),n=t(29747),r=t(41481),e=new r({sys:{queueDepthSort:n,events:{once:n}}},0,0,1,1).setOrigin(0,0),s=function(h,i){i===void 0&&(i={});var l=i.hasOwnProperty("width"),u=i.hasOwnProperty("height"),d=a(i,"width",-1),f=a(i,"height",-1),v=a(i,"cellWidth",1),m=a(i,"cellHeight",v),y=a(i,"position",p.TOP_LEFT),g=a(i,"x",0),T=a(i,"y",0),S=0,E=0,M=d*v,F=f*m;e.setPosition(g,T),e.setSize(v,m);for(var A=0;A<h.length;A++)if(o(h[A],e,y),l&&d===-1)e.x+=v;else if(u&&f===-1)e.y+=m;else if(u&&!l){if(E+=m,e.y+=m,E===F&&(E=0,S+=v,e.y=T,e.x+=v,S===M))break}else if(S+=v,e.x+=v,S===M&&(S=0,E+=m,e.x=g,e.y+=m,E===F))break;return h};c.exports=s},41721:(c,x,t)=>{/**
26 * @author       Richard Davey <[email protected]>
27 * @copyright    2013-2025 Phaser Studio Inc.
28 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
29 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"alpha",n,r,e,s)};c.exports=p},67285:(c,x,t)=>{/**
30 * @author       Richard Davey <[email protected]>
31 * @copyright    2013-2025 Phaser Studio Inc.
32 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
33 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"x",n,r,e,s)};c.exports=p},9074:(c,x,t)=>{/**
34 * @author       Richard Davey <[email protected]>
35 * @copyright    2013-2025 Phaser Studio Inc.
36 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
37 */var o=t(66979),p=function(a,n,r,e,s,h,i){return r==null&&(r=n),o(a,"x",n,e,h,i),o(a,"
37y",r,s,h,i)};c.exports=p},75222:(c,x,t)=>{/**
38 * @author       Richard Davey <[email protected]>
39 * @copyright    2013-2025 Phaser Studio Inc.
40 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
41 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"y",n,r,e,s)};c.exports=p},22983:c=>{/**
42 * @author       Richard Davey <[email protected]>
43 * @copyright    2013-2025 Phaser Studio Inc.
44 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
45 */var x=function(t,o,p,a){p===void 0&&(p=0),a===void 0&&(a=6.28);for(var n=p,r=(a-p)/t.length,e=o.x,s=o.y,h=o.radius,i=0;i<t.length;i++)t[i].x=e+h*Math.cos(n),t[i].y=s+h*Math.sin(n),n+=r;return t};c.exports=x},95253:c=>{/**
46 * @author       Richard Davey <[email protected]>
47 * @copyright    2013-2025 Phaser Studio Inc.
48 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
49 */var x=function(t,o,p,a){p===void 0&&(p=0),a===void 0&&(a=6.28);for(var n=p,r=(a-p)/t.length,e=o.width/2,s=o.height/2,h=0;h<t.length;h++)t[h].x=o.x+e*Math.cos(n),t[h].y=o.y+s*Math.sin(n),n+=r;return t};c.exports=x},88505:(c,x,t)=>{/**
50 * @author       Richard Davey <[email protected]>
51 * @copyright    2013-2025 Phaser Studio Inc.
52 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
53 */var o=t(15258),p=t(26708),a=function(n,r,e){var s;e?s=p(r,e,n.length):s=o(r,n.length);for(var h=0;h<n.length;h++){var i=n[h],l=s[h];i.x=l.x,i.y=l.y}return n};c.exports=a},41346:(c,x,t)=>{/**
54 * @author       Richard Davey <[email protected]>
55 * @copyright    2013-2025 Phaser Studio Inc.
56 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
57 */var o=t(14649),p=t(86003),a=t(49498),n=function(r,e,s){s===void 0&&(s=0);var h=o(e,!1,r.length);s>0?p(h,s):s<0&&a(h,Math.abs(s));for(var i=0;i<r.length;i++)r[i].x=h[i].x,r[i].y=h[i].y;return r};c.exports=n},11575:(c,x,t)=>{/**
58 * @author       Richard Davey <[email protected]>
59 * @copyright    2013-2025 Phaser Studio Inc.
60 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
61 */var o=t(84993),p=function(a,n,r){var e=o({x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},r),s=o({x1:n.x2,y1:n.y2,x2:n.x3,y2:n.y3},r),h=o({x1:n.x3,y1:n.y3,x2:n.x1,y2:n.y1},r);e.pop(),s.pop(),h.pop(),e=e.concat(s,h);for(var i=e.length/a.length,l=0,u=0;u<a.length;u++){var d=a[u],f=e[Math.floor(l)];d.x=f.x,d.y=f.y,l+=i}return a};c.exports=p},29953:c=>{/**
62 * @author       Richard Davey <[email protected]>
63 * @copyright    2013-2025 Phaser Studio Inc.
64 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
65 */var x=function(t,o,p){for(var a=0;a<t.length;a++){var n=t[a];n.anims&&n.anims.play(o,p)}return t};c.exports=x},66979:c=>{/**
66 * @author       Richard Davey <[email protected]>
67 * @copyright    2013-2025 Phaser Studio Inc.
68 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
69 */var x=function(t,o,p,a,n,r){a===void 0&&(a=0),n===void 0&&(n=0),r===void 0&&(r=1);var e,s=0,h=t.length;if(r===1)for(e=n;e<h;e++)t[e][o]+=p+s*a,s++;else for(e=n;e>=0;e--)t[e][o]+=p+s*a,s++;return t};c.exports=x},43967:c=>{/**
70 * @author       Richard Davey <[email protected]>
71 * @copyright    2013-2025 Phaser Studio Inc.
72 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
73 */var x=function(t,o,p,a,n,r){a===void 0&&(a=0),n===void 0&&(n=0),r===void 0&&(r=1);var e,s=0,h=t.length;if(r===1)for(e=n;e<h;e++)t[e][o]=p+s*a,s++;else for(e=n;e>=0;e--)t[e][o]=p+s*a,s++;return t};c.exports=x},88926:(c,x,t)=>{/**
74 * @author       Richard Davey <[email protected]>
75 * @copyright    2013-2025 Phaser Studio Inc.
76 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
77 */var o=t(28176),p=function(a,n){for(var r=0;r<a.length;r++)o(n,a[r]);return a};c.exports=p},33286:(c,x,t)=>{/**
78 * @author       Richard Davey <[email protected]>
79 * @copyright    2013-2025 Phaser Studio Inc.
80 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
81 */var o=t(24820),p=function(a,n){for(var r=0;r<a.length;r++)o(n,a[r]);return a};c.exports=p},96e3:(c,x,t)=>{/**
82 * @author       Richard Davey <[email protected]>
83 * @copyright    2013-2025 Phaser Studio Inc.
84 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
85 */var o=t(65822),p=function(a,n){for(var r=0;r<a.length;r++)o(n,a[r]);return a};c.exports=p},28789:(c,x,t)=>{/**
86 * @author       Richard Davey <[email protected]>
87 * @copyright    2013-2025 Phaser Studio Inc.
88 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
89 */var o=t(26597),p=function(a,n){for(var r=0;r<a.length;r++)o(n,a[r]);return a};c.exports=p},97154:(c,x,t)=>{/**
90 * @author       Richard Davey <[email protected]>
91 * @copyright    2013-2025 Phaser Studio Inc.
92 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
93 */var o=t(90260),p=function(a,n){for(var r=0;r<a.length;r++)o(n,a[r]);return a};c.exports=p},20510:(c,x,t)=>{/**
94 * @author       Richard Davey <[email protected]>
95 * @copyright    2013-2025 Phaser Studio Inc.
96 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
97 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"rotation",n,r,e,s)};c.exports=p},91051:(c,x,t)=>{/**
98 * @author       Richard Davey <[email protected]>
99 * @copyright    2013-2025 Phaser Studio Inc.
100 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
101 */var o=t(1163),p=t(20339),a=function(n,r,e){for(var s=r.x,h=r.y,i=0;i<n.length;i++){var l=n[i];o(l,s,h,e,Math.max(1,p(l.x,l.y,s,h)))}return n};c.exports=a},76332:(c,x,t)=>{/**
102 * @author       Richard Davey <[email protected]>
103 * @copyright    2013-2025 Phaser Studio Inc.
104 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
105 */var o=t(1163),p=function(a,n,r,e){var s=n.x,h=n.y;if(e===0)return a;for(var i=0;i<a.length;i++)o(a[i],s,h,r,e);return a};c.exports=p},61619:(c,x,t)=>{/**
106 * @author       Richard Davey <[email protected]>
107 * @copyright    2013-2025 Phaser Studio Inc.
108 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
109 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"scaleX",n,r,e,s)};c.exports=p},94868:(c,x,t)=>{/**
110 * @author       Richard Davey <[email protected]>
111 * @copyright    2013-2025 Phaser Studio Inc.
112 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
113 */var o=t(66979),p=function(a,n,r,e,s,h,i){return r==null&&(r=n),o(a,"scaleX",n,e,h,i),o(a,"scaleY",r,s,h,i)};c.exports=p},95532:(c,x,t)=>{/**
114 * @author       Richard Davey <[email protected]>
115 * @copyright    2013-2025 Phaser Studio Inc.
116 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
117 */var o=t(66979),p=function(a,n,r,e,s){return o(a,"scaleY",n,r,e,s)};c.exports=p},8689:(c,x,t)=>{/**
118 * @author       Richard Davey <[email protected]>
119 * @copyright    2013-2025 Phaser Studio Inc.
120 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
121 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"alpha",n,r,e,s)};c.exports=p},2645:(c,x,t)=>{/**
122 * @author       Richard Davey <[email protected]>
123 * @copyright    2013-2025 Phaser Studio Inc.
124 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
125 */var o=t(43967),p=function(a,n,r,e){return o(a,"blendMode",n,0,r,e)};c.exports=p},32372:(c,x,t)=>{/**
126 * @author       Richard Davey <[email protected]>
127 * @copyright    2013-2025 Phaser Studio Inc.
128 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
129 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"depth",n,r,e,s)};c.exports=p},85373:c=>{/**
130 * @author       Richard Davey <[email protected]>
131 * @copyright    2013-2025 Phaser Studio Inc.
132 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
133 */var x=function(t,o,p){for(var a=0;a<t.length;a++)t[a].setInteractive(o,p);return t};c.exports=x},81583:(c,x,t)=>{/**
134 * @author       Richard Davey <[email protected]>
135 * @copyright    2013-2025 Phaser Studio Inc.
136 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
137 */var o=t(43967),p=function(a,n,r,e,s,h,i){return r==null&&(r=n),o(a,"originX",n,e,h,i),o(a,"originY",r,s,h,i),a.forEach(function(l){l.updateDisplayOrigin()}),a};c.exports=p},79939:(c,x,t)=>{/**
138 * @author       Richard Davey <[email protected]>
139 * @copyright    2013-2025 Phaser Studio Inc.
140 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
141 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"rotation",n,r,e,s)};c.exports=p},2699:(c,x,t)=>{/**
142 * @author       Richard Davey <[email protected]>
143 * @copyright    2013-2025 Phaser Studio Inc.
144 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
145 */var o=t(43967),p=function(a,n,r,e,s,h,i){return r==null&&(r=n),o(a,"scaleX",n,e,h,i),o(a,"scaleY",r,s,h,i)};c.exports=p},98739:(c,x,t)=>{/**
146 * @author       Richard Davey <[email protected]>
147 * @copyright    2013-2025 Phaser Studio Inc.
148 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
149 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"scaleX",n,r,e,s)};c.exports=p},98476:(c,x,t)=>{/**
150 * @author       Richard Davey <[email protected]>
151 * @copyright    2013-2025 Phaser Studio Inc.
152 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
153 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"scaleY",n,r,e,s)};c.exports=p},6207:(c,x,t)=>{/**
154 * @author       Richard Davey <[email protected]>
155 * @copyright    2013-2025 Phaser Studio Inc.
156 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
157 */var o=t(43967),p=function(a,n,r,e,s,h,i){return r==null&&(r=n),o(a,"scrollFactorX",n,e,h,i),o(a,"scrollFactorY",r,s,h,i)};c.exports=p},6607:(c,x,t)=>{/**
158 * @author       Richard Davey <[email protected]>
159 * @copyright    2013-2025 Phaser Studio Inc.
160 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
161 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"scrollFactorX",n,r,e,s)};c.exports=p},72248:(c,x,t)=>{/**
162 * @author       Richard Davey <[email protected]>
163 * @copyright    2013-2025 Phaser Studio Inc.
164 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
165 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"scrollFactorY",n,r,e,s)};c.exports=p},14036:c=>{/**
166 * @author       Richard Davey <[email protected]>
167 * @copyright    2013-2025 Phaser Studio Inc.
168 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
169 */var x=function(t,o,p,a,n){for(var r=0;r<t.length;r++)t[r].setTint(o,p,a,n);return t};c.exports=x},50159:(c,x,t)=>{/**
170 * @author       Richard Davey <[email protected]>
171 * @copyright    2013-2025 Phaser Studio Inc.
172 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
173 */var o=t(43967),p=function(a,n,r,e){return o(a,"visible",n,0,r,e)};c.exports=p},77597:(c,x,t)=>{/**
174 * @author       Richard Davey <[email protected]>
175 * @copyright    2013-2025 Phaser Studio Inc.
176 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
177 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"x",n,r,e,s)};c.exports=p},83194:(c,x,t)=>{/**
178 * @author       Richard Davey <[email protected]>
179 * @copyright    2013-2025 Phaser Studio Inc.
180 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
181 */var o=t(43967),p=function(a,n,r,e,s,h,i){return r==null&&(r=n),o(a,"x",n,e,h,i),o(a,"
181y",r,s,h,i)};c.exports=p},67678:(c,x,t)=>{/**
182 * @author       Richard Davey <[email protected]>
183 * @copyright    2013-2025 Phaser Studio Inc.
184 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
185 */var o=t(43967),p=function(a,n,r,e,s){return o(a,"y",n,r,e,s)};c.exports=p},35850:(c,x,t)=>{/**
186 * @author       Richard Davey <[email protected]>
187 * @copyright    2013-2025 Phaser Studio Inc.
188 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
189 */var o=t(26099),p=function(a,n,r,e,s){e===void 0&&(e=0),s===void 0&&(s=new o);var h,i,l=a.length;if(l===1)h=a[0].x,i=a[0].y,a[0].x=n,a[0].y=r;else{var u=1,d=0;e===0&&(d=l-1,u=l-2),h=a[d].x,i=a[d].y,a[d].x=n,a[d].y=r;for(var f=0;f<l;f++)if(!(u>=l||u===-1)){var v=a[u],m=v.x,y=v.y;v.x=h,v.y=i,h=m,i=y,e===0?u--:u++}}return s.x=h,s.y=i,s};c.exports=p},8628:(c,x,t)=>{/**
190 * @author       Richard Davey <[email protected]>
191 * @copyright    2013-2025 Phaser Studio Inc.
192 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
193 */var o=t(33680),p=function(a){return o(a)};c.exports=p},21837:(c,x,t)=>{/**
194 * @author       Richard Davey <[email protected]>
195 * @copyright    2013-2025 Phaser Studio Inc.
196 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
197 */var o=t(7602),p=function(a,n,r,e,s){s===void 0&&(s=!1);var h=Math.abs(e-r)/a.length,i;if(s)for(i=0;i<a.length;i++)a[i][n]+=o(i*h,r,e);else for(i=0;i<a.length;i++)a[i][n]=o(i*h,r,e);return a};c.exports=p},21910:(c,x,t)=>{/**
198 * @author       Richard Davey <[email protected]>
199 * @copyright    2013-2025 Phaser Studio Inc.
200 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
201 */var o=t(54261),p=function(a,n,r,e,s){s===void 0&&(s=!1);var h=Math.abs(e-r)/a.length,i;if(s)for(i=0;i<a.length;i++)a[i][n]+=o(i*h,r,e);else for(i=0;i<a.length;i++)a[i][n]=o(i*h,r,e);return a};c.exports=p},62054:c=>{/**
202 * @author       Richard Davey <[email protected]>
203 * @copyright    2013-2025 Phaser Studio Inc.
204 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
205 */var x=function(t,o,p,a,n){if(n===void 0&&(n=!1),t.length===0)return t;if(t.length===1)return n?t[0][o]+=(a+p)/2:t[0][o]=(a+p)/2,t;var r=Math.abs(a-p)/(t.length-1),e;if(n)for(e=0;e<t.length;e++)t[e][o]+=e*r+p;else for(e=0;e<t.length;e++)t[e][o]=e*r+p;return t};c.exports=x},79815:c=>{/**
206 * @author       Richard Davey <[email protected]>
207 * @copyright    2013-2025 Phaser Studio Inc.
208 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
209 */var x=function(t){for(var o=0;o<t.length;o++)t[o].visible=!t[o].visible;return t};c.exports=x},39665:(c,x,t)=>{/**
210 * @author       Richard Davey <[email protected]>
211 * @author       samme <[email protected]>
212 * @copyright    2013-2025 Phaser Studio Inc.
213 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
214 */var o=t(15994),p=function(a,n,r){r===void 0&&(r=0);for(var e=0;e<a.length;e++){var s=a[e];s.x=o(s.x,n.left-r,n.right+r),s.y=o(s.y,n.top-r,n.bottom+r)}return a};c.exports=p},61061:(c,x,t)=>{/**
215 * @author       Richard Davey <[email protected]>
216 * @copyright    2013-2025 Phaser Studio Inc.
217 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
218 */c.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:(c,x,t)=>{/**
219 * @author       Richard Davey <[email protected]>
220 * @copyright    2013-2025 Phaser Studio Inc.
221 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
222 */var o=t(45319),p=t(83419),a=t(74943),n=t(81957),r=t(41138),e=t(35154),s=t(90126),h=new p({initialize:function(l,u,d){this.manager=l,this.key=u,this.type="frame",this.frames=this.getFrames(l.textureManager,e(d,"frames",[]),e(d,"defaultTextureKey",null),e(d,"sortFrames",!0)),this.frameRate=e(d,"frameRate",null),this.duration=e(d,"duration",null),this.msPerFrame,this.skipMissedFrames=e(d,"skipMissedFrames",!0),this.delay=e(d,"delay",0),this.repeat=e(d,"repeat",0),this.repeatDelay=e(d,"repeatDelay",0),this.yoyo=e(d,"yoyo",!1),this.showBeforeDelay=e(d,"showBeforeDelay",!1),this.showOnStart=e(d,"showOnStart",!1),this.hideOnComplete=e(d,"hideOnComplete",!1),this.randomFrame=e(d,"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,l,u,d){u===null&&d===null?(i.frameRate=24,i.duration=24/l*1e3):u&&d===null?(i.duration=u,i.frameRate=l/(u/1e3)):(i.frameRate=d,i.duration=l/d*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,l){var u=this.getFrames(this.manager.textureManager,l);if(u.length>0){if(i===0)this.frames=u.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(u);else{var d=this.frames.slice(0,i),f=this.frames.slice(i);this.frames=d.concat(u,f)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i<this.frames.length},getFirstTick:function(i){i.accumulator=0,i.nextTick=i.frameRate===i.currentAnim.frameRate&&i.currentFrame.duration||i.msPerFrame},getFrameAt:function(i){return this.frames[i]},getFrames:function(i,l,u,d){d===void 0&&(d=!0);var f=[],v,m,y=1,g,T;if(typeof l=="string"){if(T=l,!i.exists(T))return console.warn('Texture "%s" not found',T),f;var S=i.get(T),E=S.getFrameNames();
222d&&s(E),l=[],E.forEach(function(O){l.push({key:T,frame:O})})}if(!Array.isArray(l)||l.length===0)return f;for(g=0;g<l.length;g++){var M=l[g],F=e(M,"key",u);if(F){var A=e(M,"frame",0),P=i.getFrame(F,A);if(!P){console.warn('Texture "%s" not found',F);continue}m=new r(F,A,y,P),m.duration=e(M,"duration",0),m.isFirst=!v,v&&(v.nextFrame=m,m.prevFrame=v),f.push(m),v=m,y++}}if(f.length>0){m.isLast=!0,m.nextFrame=f[0],f[0].prevFrame=m;var L=1/(f.length-1);for(g=0;g<f.length;g++)f[g].progress=g*L}return f},getNextTick:function(i){i.accumulator-=i.nextTick,i.nextTick=i.frameRate===i.currentAnim.frameRate&&i.currentFrame.duration||i.msPerFrame},getFrameByProgress:function(i){return i=o(i,0,1),n(i,this.frames,"progress")},nextFrame:function(i){var l=i.currentFrame;l.isLast?i.yoyo?this.handleYoyoFrame(i,!1):i.repeatCounter>0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,l.nextFrame)},handleYoyoFrame:function(i,l){if(l||(l=!1),i.inReverse===!l&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=l),this.repeatAnimation(i);return}if(i.inReverse!==l&&i.repeatCounter===0){i.complete();return}i.forward=l;var u=l?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,u)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var l=i.currentFrame;l.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,l.prevFrame)},updateAndGetNextTick:function(i,l){i.setCurrentFrame(l),this.getNextTick(i)},removeFrame:function(i){var l=this.frames.indexOf(i);return l!==-1&&this.removeFrameAt(l),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()))}
222,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(l){i.frames.push(l.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,l=1/(i-1),u,d=0;d<i;d++)u=this.frames[d],u.index=d+1,u.isFirst=!1,u.isLast=!1,u.progress=d*l,d===0?(u.isFirst=!0,i===1?(u.isLast=!0,u.nextFrame=u,u.prevFrame=u):(u.isLast=!1,u.prevFrame=this.frames[i-1],u.nextFrame=this.frames[d+1])):d===i-1&&i>1?(u.isLast=!0,u.prevFrame=this.frames[i-2],u.nextFrame=this.frames[0]):i>1&&(u.prevFrame=this.frames[d-1],u.nextFrame=this.frames[d+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<this.frames.length;i++)this.frames[i].destroy();this.frames=[],this.manager=null}});c.exports=h},41138:(c,x,t)=>{/**
223 * @author       Richard Davey <[email protected]>
224 * @copyright    2013-2025 Phaser Studio Inc.
225 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
226 */var o=t(83419),p=new o({initialize:function(n,r,e,s,h){h===void 0&&(h=!1),this.textureKey=n,this.textureFrame=r,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}});c.exports=p},60848:(c,x,t)=>{/**
227 * @author       Richard Davey <[email protected]>
228 * @copyright    2013-2025 Phaser Studio Inc.
229 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
230 */var o=t(42099),p=t(83419),a=t(90330),n=t(50792),r=t(74943),e=t(8443),s=t(95540),h=t(35154),i=t(36383),l=t(20283),u=t(41836),d=new p({Extends:n,initialize:function(v){n.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(f,v,m){var y=this.anims,g=this.mixes,T=typeof f=="string"?f:f.key,S=typeof v=="string"?v:v.key;if(y.has(T)&&y.has(S)){var E=g.get(T);E||(E={}),E[S]=m,g.set(T,E)}return this},removeMix:function(f,v){var m=this.mixes,y=typeof f=="string"?f:f.key,g=m.get(y);if(g)if(v){var T=typeof v=="string"?v:v.key;g.hasOwnProperty(T)&&delete g[T]}else v||m.delete(y);return this},getMix:function(f,v){var m=this.mixes,y=typeof f=="string"?f:f.key,g=typeof v=="string"?v:v.key,T=m.get(y);return T&&T.hasOwnProperty(g)?T[g]:0},add:function(f,v){return this.anims.has(f)?(console.warn("Animation key exists: "+f),this):(v.key=f,this.anims.set(f,v),this.emit(r.ADD_ANIMATION,f,v),this)},exists:function(f){return this.anims.has(f)},createFromAseprite:function(f,v,m){var y=[],g=this.game.cache.json.get(f);if(!g)return console.warn("No Aseprite data found for: "+f),y;var T=this,S=h(g,"meta",null),E=h(g,"frames",null);if(S&&E){var M=h(S,"frameTags",[]);M.forEach(function(F){var A=[],P=s(F,"name",null),L=s(F,"from",0),O=s(F,"to",0),G=s(F,"direction","forward");if(P&&(!v||v&&v.indexOf(P)>-1)){for(var z=0,Y=L;Y<=O;Y++){var X=Y.toString(),I=E[X];if(I){var U=s(I,"duration",i.MAX_SAFE_INTEGER);A.push({key:f,frame:X,duration:U}),z+=U}}G==="reverse"&&(A=A.reverse());var D={key:P,frames:A,duration:z,yoyo:G==="pingpong"},V;m?m.anims&&(V=m.anims.create(D)):V=T.create(D),V&&y.push(V)}})}return y},create:function(f){var v=f.key,m=!1;return v&&(m=this.get(v),m?console.warn("AnimationManager key already exists: "+v):(m=new o(this,v,f),this.anims.set(v,m),this.emit(r.ADD_ANIMATION,v,m))),m},fromJSON:function(f,v){v===void 0&&(v=!1),v&&this.anims.clear(),typeof f=="string"&&(f=JSON.parse(f));var m=[];
vendor: 2,023 bytes, line 230
230if(f.hasOwnProperty("anims")&&Array.isArray(f.anims)){for(var y=0;y<f.anims.length;y++)m.push(this.create(f.anims[y]));f.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=f.globalTimeScale)}else f.hasOwnProperty("key")&&f.type==="frame"&&m.push(this.create(f));return m},generateFrameNames:function(f,v){var m=h(v,"prefix",""),y=h(v,"start",0),g=h(v,"end",0),T=h(v,"suffix",""),S=h(v,"zeroPad",0),E=h(v,"outputArray",[]),M=h(v,"frames",!1);if(!this.textureManager.exists(f))return console.warn('Texture "%s" not found',f),E;var F=this.textureManager.get(f);if(!F)return E;var A;if(v)for(M||(M=l(y,g)),A=0;A<M.length;A++){var P=m+u(M[A],S,"0",1)+T;F.has(P)?E.push({key:f,frame:P}):console.warn('Frame "%s" not found in texture "%s"',P,f)}else for(M=F.getFrameNames(),A=0;A<M.length;A++)E.push({key:f,frame:M[A]});return E},generateFrameNumbers:function(f,v){var m=h(v,"start",0),y=h(v,"end",-1),g=h(v,"first",!1),T=h(v,"outputArray",[]),S=h(v,"frames",!1);if(!this.textureManager.exists(f))return console.warn('Texture "%s" not found',f),T;var E=this.textureManager.get(f);if(!E)return T;g&&E.has(g)&&T.push({key:f,frame:g}),S||(y===-1&&(y=E.frameTotal-2),S=l(m,y));for(var M=0;M<S.length;M++){var F=S[M];E.has(F)?T.push({key:f,frame:F}):console.warn('Frame "%s" not found in texture "%s"',F,f)}return T},get:function(f){return this.anims.get(f)},getAnimsFromTexture:function(f){for(var v=this.textureManager.get(f),m=v.key,y=this.anims.getArray(),g=[],T=0;T<y.length;T++)for(var S=y[T],E=S.frames,M=0;M<E.length;M++)if(E[M].textureKey===m){g.push(S.key);break}return g},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(r.PAUSE_ALL)),this},play:function(f,v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++)v[m].anims.play(f);return this},staggerPlay:function(f,v,m,y){m===void 0&&(m=0),y===void 0&&(y=!0),Array.isArray(v)||(v=[v]);var g=v.length;y||g--;for(var T=0;T<v.length;T++){var S=m<0?Math.abs(m)*(g-T):m*T;v[T].anims.playAfterDelay(f,S)}return this},remove:function(f){var v=this.get(f);
230return v&&(this.emit(r.REMOVE_ANIMATION,f,v),this.anims.delete(f),this.removeMix(f)),v},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(r.RESUME_ALL)),this},toJSON:function(f){var v={anims:[],globalTimeScale:this.globalTimeScale};return f!==void 0&&f!==""?v.anims.push(this.anims.get(f).toJSON()):this.anims.each(function(m,y){v.anims.push(y.toJSON())}),v},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});c.exports=d},9674:(c,x,t)=>{/**
231 * @author       Richard Davey <[email protected]>
232 * @copyright    2013-2025 Phaser Studio Inc.
233 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
234 */var o=t(42099),p=t(30976),a=t(83419),n=t(90330),r=t(74943),e=t(95540),s=new a({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(r.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 l=0;l<h.length;l++){var u=h[l];this.nextAnim?this.nextAnimsQueue.push(u):this.nextAnim=u}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(h){this.isPlaying&&this.stop();var i=this.animationManager,l=typeof h=="string"?h:e(h,"key",null),u=this.exists(l)?this.get(l):i.get(l);if(!u)console.warn("Missing animation: "+l);else{this.currentAnim=u;var d=u.getTotalFrames(),f=e(h,"frameRate",u.frameRate),v=e(h,"duration",u.duration);u.calculateDuration(this,d,v,f),this.delay=e(h,"delay",u.delay),this.repeat=e(h,"repeat",u.repeat),this.repeatDelay=e(h,"repeatDelay",u.repeatDelay),this.yoyo=e(h,"yoyo",u.yoyo),this.showBeforeDelay=e(h,"showBeforeDelay",u.showBeforeDelay),this.showOnStart=e(h,"showOnStart",u.showOnStart),this.hideOnComplete=e(h,"hideOnComplete",u.hideOnComplete),this.skipMissedFrames=e(h,"skipMissedFrames",u.skipMissedFrames),this.randomFrame=e(h,"randomFrame",u.randomFrame),this.timeScale=e(h,"timeScale",this.timeScale);var m=e(h,"startFrame",0);m>d&&(m=0),this.randomFrame&&(m=p(0,d-1));var y=u.frames[m];m===0&&!this.forward&&(y=u.getLastFrame()),this.currentFrame=y}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 l=this.nextAnim,u=this.nextAnimsQueue;l&&u.unshift(l),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 l=this.nextAnim,u=this.nextAnimsQueue;l&&u.unshift(l),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 l=this.currentAnim,u=this.parent,d=typeof h=="string"?h:h.key;if(i&&this.isPlaying&&l.key===d)return u;if(l&&this.isPlaying){var f=this.animationManager.getMix(l.key,h);if(f>0)return this.playAfterDelay(h,f)}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 l=typeof h=="string"?h:h.key;return i&&this.isPlaying&&this.currentAnim.key===l?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,l=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)),l},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(r.ANIMATION_
234START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(r.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(r.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(r.ANIMATION_COMPLETE,r.ANIMATION_COMPLETE_KEY)},emitEvents:function(h,i){var l=this.currentAnim;if(l){var u=this.currentFrame,d=this.parent,f=u.textureFrame;d.emit(h,l,u,d,f),i&&d.emit(i+l.key,l,u,d,f)}},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 l=this.currentAnim,u=this.parent;return l?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),l.getFirstTick(this),this.emitEvents(r.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!h,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(l.frames[0]),this.parent):u},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 l=this.currentAnim;if(!(!this.isPlaying||!l||l.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?l.nextFrame(this):l.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var u=0;do this.forward?l.nextFrame(this):l.previousFrame(this),u++;while(this.isPlaying&&this.accumulator>this.nextTick&&u<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(r.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,l=!1;return i&&(l=this.get(i),l?console.warn("Animation key already exists: "+i):(l=new o(this,i,h),this.anims||(this.anims=new n),this.anims.set(i,l))),l},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(r.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}}});c.exports=s},57090:c=>{/**
235 * @author       Richard Davey <[email protected]>
236 * @copyright    2013-2025 Phaser Studio Inc.
237 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
238 */c.exports="add"},25312:c=>{/**
239 * @author       Richard Davey <[email protected]>
240 * @copyright    2013-2025 Phaser Studio Inc.
241 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
242 */c.exports="animationcomplete"},89580:c=>{/**
243 * @author       Richard Davey <[email protected]>
244 * @copyright    2013-2025 Phaser Studio Inc.
245 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
246 */c.exports="animationcomplete-"},52860:c=>{/**
247 * @author       Richard Davey <[email protected]>
248 * @copyright    2013-2025 Phaser Studio Inc.
249 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
250 */c.exports="animationrepeat"},63850:c=>{/**
251 * @author       Richard Davey <[email protected]>
252 * @copyright    2013-2025 Phaser Studio Inc.
253 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
254 */c.exports="animationrestart"},99085:c=>{/**
255 * @author       Richard Davey <[email protected]>
256 * @copyright    2013-2025 Phaser Studio Inc.
257 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
258 */c.exports="animationstart"},28087:c=>{/**
259 * @author       Richard Davey <[email protected]>
260 * @copyright    2013-2025 Phaser Studio Inc.
261 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
262 */c.exports="animationstop"},1794:c=>{/**
263 * @author       Richard Davey <[email protected]>
264 * @copyright    2013-2025 Phaser Studio Inc.
265 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
266 */c.exports="animationupdate"},52562:c=>{/**
267 * @author       Richard Davey <[email protected]>
268 * @copyright    2013-2025 Phaser Studio Inc.
269 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
270 */c.exports="pauseall"},57953:c=>
270{/**
271 * @author       Richard Davey <[email protected]>
272 * @copyright    2013-2025 Phaser Studio Inc.
273 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
274 */c.exports="remove"},68339:c=>{/**
275 * @author       Richard Davey <[email protected]>
276 * @copyright    2013-2025 Phaser Studio Inc.
277 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
278 */c.exports="resumeall"},74943:(c,x,t)=>{/**
279 * @author       Richard Davey <[email protected]>
280 * @copyright    2013-2025 Phaser Studio Inc.
281 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
282 */c.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:(c,x,t)=>{/**
283 * @author       Richard Davey <[email protected]>
284 * @copyright    2013-2025 Phaser Studio Inc.
285 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
286 */c.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(c,x,t)=>{/**
287 * @author       Richard Davey <[email protected]>
288 * @copyright    2013-2025 Phaser Studio Inc.
289 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
290 */var o=t(83419),p=t(90330),a=t(50792),n=t(24736),r=new o({initialize:function(){this.entries=new p,this.events=new a},add:function(e,s){return this.entries.set(e,s),this.events.emit(n.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(n.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}});c.exports=r},24047:(c,x,t)=>{/**
291 * @author       Richard Davey <[email protected]>
292 * @copyright    2013-2025 Phaser Studio Inc.
293 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
294 */var o=t(2161),p=t(83419),a=t(8443),n=new p({initialize:function(e){this.game=e,this.binary=new o,this.bitmapFont=new o,this.json=new o,this.physics=new o,this.shader=new o,this.audio=new o,this.video=new o,this.text=new o,this.html=new o,this.obj=new o,this.tilemap=new o,this.xml=new o,this.custom={},this.game.events.once(a.DESTROY,this.destroy,this)},addCustom:function(r){return this.custom.hasOwnProperty(r)||(this.custom[r]=new o),this.custom[r]},destroy:function(){for(var r=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e<r.length;e++)this[r[e]].destroy(),this[r[e]]=null;for(var s in this.custom)this.custom[s].destroy();this.custom=null,this.game=null}});c.exports=n},51464:c=>{/**
295 * @author       Richard Davey <[email protected]>
296 * @copyright    2013-2025 Phaser Studio Inc.
297 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
298 */c.exports="add"},59261:c=>{/**
299 * @author       Richard Davey <[email protected]>
300 * @copyright    2013-2025 Phaser Studio Inc.
301 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
302 */c.exports="remove"},24736:(c,x,t)=>{/**
303 * @author       Richard Davey <[email protected]>
304 * @copyright    2013-2025 Phaser Studio Inc.
305 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
306 */c.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(c,x,t)=>{/**
307 * @author       Richard Davey <[email protected]>
308 * @copyright    2013-2025 Phaser Studio Inc.
309 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
310 */c.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(c,x,t)=>{/**
311 * @author       Richard Davey <[email protected]>
312 * @copyright    2013-2025 Phaser Studio Inc.
313 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
314 */var o=t(83419),p=t(31401),a=t(39506),n=t(50792),r=t(19715),e=t(87841),s=t(61340),h=t(80333),i=t(26099),l=new o({Extends:n,Mixins:[p.AlphaSingle,p.Visible],initialize:function(d,f,v,m){d===void 0&&(d=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),n.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=d,this._y=f,this._width=v,this._height=m,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,m/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(u){this.renderList.push(u)},setOrigin:function(u,d){return u===void 0&&(u=.5),d===void 0&&(d=u),this.originX=u,this.originY=d,this},getScroll:function(u,d,f){f===void 0&&(f=new i);var v=this.width*.5,m=this.height*.5;return f.x=u-v,f.y=d-m,this.useBounds&&(f.x=this.clampX(f.x),f.y=this.clampY(f.y
314)),f},centerOnX:function(u){var d=this.width*.5;return this.midPoint.x=u,this.scrollX=u-d,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(u){var d=this.height*.5;return this.midPoint.y=u,this.scrollY=u-d,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(u,d){return this.centerOnX(u),this.centerOnY(d),this},centerToBounds:function(){if(this.useBounds){var u=this._bounds,d=this.width*.5,f=this.height*.5;this.midPoint.set(u.centerX,u.centerY),this.scrollX=u.centerX-d,this.scrollY=u.centerY-f}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(u){if(this.disableCull)return u;var d=this.matrix.matrix,f=d[0],v=d[1],m=d[2],y=d[3],g=f*y-v*m;if(!g)return u;var T=d[4],S=d[5],E=this.scrollX,M=this.scrollY,F=this.width,A=this.height,P=this.y,L=P+A,O=this.x,G=O+F,z=this.culledObjects,Y=u.length;g=1/g,z.length=0;for(var X=0;X<Y;++X){var I=u[X];if(!I.hasOwnProperty("width")||I.parentContainer){z.push(I);continue}var U=I.width,D=I.height,V=I.x-E*I.scrollFactorX-U*I.originX,B=I.y-M*I.scrollFactorY-D*I.originY,W=V*f+B*m+T,K=V*v+B*y+S,J=(V+U)*f+(B+D)*m+T,Z=(V+U)*v+(B+D)*y+S;J>O&&W<G&&Z>P&&K<L&&z.push(I)}return z},getWorldPoint:function(u,d,f){f===void 0&&(f=new i);var v=this.matrix.matrix,m=v[0],y=v[1],g=v[2],T=v[3],S=v[4],E=v[5],M=m*T-y*g;if(!M)return f.x=u,f.y=d,f;M=1/M;var F=T*M,A=-y*M,P=-g*M,L=m*M,O=(g*E-T*S)*M,G=(y*S-m*E)*M,z=Math.cos(this.rotation),Y=Math.sin(this.rotation),X=this.zoomX,I=this.zoomY,U=this.scrollX,D=this.scrollY,V=u+(U*z-D*Y)*X,B=d+(U*Y+D*z)*I;return f.x=V*F+B*P+O,f.y=V*A+B*L+G,f},ignore:function(u){var d=this.id;Array.isArray(u)||(u=[u]);for(var f=0;f<u.length;f++){var v=u[f];Array.isArray(v)?this.ignore(v):v.isParent?this.ignore(v.getChildren()):v.cameraFilter|=d}return this},clampX:function(u){var d=this._bounds,f=this.displayWidth,v=d.x+(f-this.width)/2,m=Math.max(v,v+d.width-f);return u<v?u=v:u>m&&(u=m),u},clampY:function(u){var d=this._bounds,f=this.displayHeight,v=d.y+(f-this.height)/2,m=Math.max(v,v+d.height-f);return u<v?u=v:u>m&&(u=m),u},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(u){return u===void 0&&(u=0),this.rotation=a(u),this},setBackgroundColor:function(u){return u===void 0&&(u="rgba(0,0,0,0)"),this.backgroundColor=h(u),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(u,d,f,v,m){return m===void 0&&(m=!1),this._bounds.setTo(u,d,f,v),this.dirty=!0,this.useBounds=!0,m?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(u){u===void 0&&(u=new e);var d=this._bounds;return u.setTo(d.x,d.y,d.width,d.height),u},setName:function(u){return u===void 0&&(u=""),this.name=u,this},setPosition:function(u,d){return d===void 0&&(d=u),this.x=u,this.y=d,this},setRotation:function(u){return u===void 0&&(u=0),this.rotation=u,this},setRoundPixels:function(u){return this.roundPixels=u,this},setScene:function(u,d){d===void 0&&(d=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=u,this.isSceneCamera=d;var f=u.sys;return this.sceneManager=f.game.scene,this.scaleManager=f.scale,this.cameraManager=f.cameras,this.updateSystem(),this},setScroll:function(u,d){return d===void 0&&(d=u),this.scrollX=u,this.scrollY=d,this},setSize:function(u,d){return d===void 0&&(d=u),this.width=u,this.height=d,this},setViewport:function(u,d,f,v){return this.x=u,this.y=d,this.width=f,this.height=v,this},setZoom:function(u,d){return u===void 0&&(u=1),d===void 0&&(d=u),u===0&&(u=.001),d===0&&(d=.001),this.zoomX=u,this.zoomY=d,this},setMask:function(u,d){return d===void 0&&(d=!0),this.mask=u,this._maskCamera=d?this.cameraManager.default:this,this},clearMask:function(u){return u===void 0&&(u=!1),u&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var u={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&&(u.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),u},update:function(){},setIsSceneCamera:function(u){return this.isSceneCamera=u,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var u=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,d=this.sceneManager;u&&!this._customViewport?d.customViewports++:!u&&this._customViewport&&d.customViewports--,this.dirty=!0,this._customViewport=u}}
314,destroy:function(){this.emit(r.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(u){this._x=u,this.updateSystem()}},y:{get:function(){return this._y},set:function(u){this._y=u,this.updateSystem()}},width:{get:function(){return this._width},set:function(u){this._width=u,this.updateSystem()}},height:{get:function(){return this._height},set:function(u){this._height=u,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(u){u!==this._scrollX&&(this._scrollX=u,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(u){u!==this._scrollY&&(this._scrollY=u,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(u){this._zoomX=u,this._zoomY=u,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(u){this._zoomX=u,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(u){this._zoomY=u,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(u){this._rotation=u,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}}});c.exports=l},38058:(c,x,t)=>{/**
315 * @author       Richard Davey <[email protected]>
316 * @copyright    2013-2025 Phaser Studio Inc.
317 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
318 */var o=t(71911),p=t(67502),a=t(45319),n=t(83419),r=t(31401),e=t(20052),s=t(19715),h=t(28915),i=t(87841),l=t(26099),u=new n({Extends:o,Mixins:[r.PostPipeline],initialize:function(f,v,m,y){o.call(this,f,v,m,y),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 l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(d,f){if(d===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=d,this.deadzone.height=f):this.deadzone=new i(0,0,d,f),this._follow){var v=this.width/2,m=this.height/2,y=this._follow.x-this.followOffset.x,g=this._follow.y-this.followOffset.y;this.midPoint.set(y,g),this.scrollX=y-v,this.scrollY=g-m}p(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(d,f,v,m,y,g){return this.fadeEffect.start(!1,d,f,v,m,!0,y,g)},fadeOut:function(d,f,v,m,y,g){return this.fadeEffect.start(!0,d,f,v,m,!0,y,g)},fadeFrom:function(d,f,v,m,y,g,T){return this.fadeEffect.start(!1,d,f,v,m,y,g,T)},fade:function(d,f,v,m,y,g,T){return this.fadeEffect.start(!0,d,f,v,m,y,g,T)},flash:function(d,f,v,m,y,g,T){return this.flashEffect.start(d,f,v,m,y,g,T)},shake:function(d,f,v,m,y){return this.shakeEffect.start(d,f,v,m,y)},pan:function(d,f,v,m,y,g,T){return this.panEffect.start(d,f,v,m,y,g,T)},rotateTo:function(d,f,v,m,y,g,T){return this.rotateToEffect.start(d,f,v,m,y,g,T)},zoomTo:function(d,f,v,m,y,g){return this.zoomEffect.start(d,f,v,m,y,g)},preRender:function(){this.renderList.length=0;var d=this.width,f=this.height,v=d*.5,m=f*.5,y=this.zoomX,g=this.zoomY,T=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(y)&&Number.isInteger(g);var S=d*this.originX,E=f*this.originY,M=this._follow,F=this.deadzone,A=this.scrollX,P=this.scrollY;F&&p(F,this.midPoint.x,this.midPoint.y);var L=!1;if(M&&!this.panEffect.isRunning){var O=this.lerp,G=M.x-this.followOffset.x,z=M.y-this.followOffset.y;F?(G<F.x?A=h(A,A-(F.x-G),O.x):G>F.right&&(A=h(A,A+(G-F.right),O.x)),z<F.y?P=h(P,P-(F.y-z),O.y):z>F.bottom&&(P=h(P,P+(z-F.bottom),O.y))):(A=h(A,G-S,O.x),P=h(P,z-E,O.y)),L=!0}this.roundPixels&&(A=Math.floor(A),P=Math.floor(P)),this.useBounds&&(A=this.clampX(A),P=this.clampY(P)),this.scrollX=A,this.scrollY=P;var Y=A+v,X=P+m;this.midPoint.set(Y,X);var I=Math.floor(d/y+.5),U=Math.floor(f/g+.5),D=Math.floor(Y-I/2+.5),V=Math.floor(X-U/2+.5);this.worldView.setTo(D,V,I,U),T.applyITRS(Math.floor(this.x+S+.5),Math.floor(this.y+E+.5),this.rotation,y,g),T.translate(-S,-E),this.shakeEffect.preRender(),L&&this.emit
318(s.FOLLOW_UPDATE,this,M)},setLerp:function(d,f){return d===void 0&&(d=1),f===void 0&&(f=d),this.lerp.set(d,f),this},setFollowOffset:function(d,f){return d===void 0&&(d=0),f===void 0&&(f=0),this.followOffset.set(d,f),this},startFollow:function(d,f,v,m,y,g){f===void 0&&(f=!1),v===void 0&&(v=1),m===void 0&&(m=v),y===void 0&&(y=0),g===void 0&&(g=y),this._follow=d,this.roundPixels=f,v=a(v,0,1),m=a(m,0,1),this.lerp.set(v,m),this.followOffset.set(y,g);var T=this.width/2,S=this.height/2,E=d.x-y,M=d.y-g;return this.midPoint.set(E,M),this.scrollX=E-T,this.scrollY=M-S,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(d,f){this.visible&&(this.rotateToEffect.update(d,f),this.panEffect.update(d,f),this.zoomEffect.update(d,f),this.shakeEffect.update(d,f),this.flashEffect.update(d,f),this.fadeEffect.update(d,f))},destroy:function(){this.resetFX(),o.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});c.exports=u},32743:(c,x,t)=>{/**
319 * @author       Richard Davey <[email protected]>
320 * @copyright    2013-2025 Phaser Studio Inc.
321 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
322 */var o=t(38058),p=t(83419),a=t(95540),n=t(37277),r=t(37303),e=t(97480),s=t(44594),h=new p({initialize:function(l){this.scene=l,this.systems=l.sys,this.roundPixels=l.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,l.sys.events.once(s.BOOT,this.boot,this),l.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 o(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 l=this.systems.events;l.on(s.UPDATE,this.update,this),l.once(s.SHUTDOWN,this.shutdown,this)},add:function(i,l,u,d,f,v){i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=this.scene.sys.scale.width),d===void 0&&(d=this.scene.sys.scale.height),f===void 0&&(f=!1),v===void 0&&(v="");var m=new o(i,l,u,d);return m.setName(v),m.setScene(this.scene),m.setRoundPixels(this.roundPixels),m.id=this.getNextID(),this.cameras.push(m),f&&(this.main=m),m},addExisting:function(i,l){l===void 0&&(l=!1);var u=this.cameras.indexOf(i);return u===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),l&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,l=1,u=0;u<32;u++){for(var d=!1,f=0;f<i.length;f++){var v=i[f];if(v&&v.id===l){d=!0;continue}}if(d)l=l<<1;else return l}return 0},getTotal:function(i){i===void 0&&(i=!1);for(var l=0,u=this.cameras,d=0;d<u.length;d++){var f=u[d];(!i||i&&f.visible)&&l++}return l},fromJSON:function(i){Array.isArray(i)||(i=[i]);for(var l=this.scene.sys.scale.width,u=this.scene.sys.scale.height,d=0;d<i.length;d++){var f=i[d],v=a(f,"x",0),m=a(f,"y",0),y=a(f,"width",l),g=a(f,"height",u),T=this.add(v,m,y,g);T.name=a(f,"name",""),T.zoom=a(f,"zoom",1),T.rotation=a(f,"rotation",0),T.scrollX=a(f,"scrollX",0),T.scrollY=a(f,"scrollY",0),T.roundPixels=a(f,"roundPixels",!1),T.visible=a(f,"visible",!0);var S=a(f,"backgroundColor",!1);S&&T.setBackgroundColor(S);var E=a(f,"bounds",null);if(E){var M=a(E,"x",0),F=a(E,"y",0),A=a(E,"width",l),P=a(E,"height",u);T.setBounds(M,F,A,P)}}return this},getCamera:function(i){for(var l=this.cameras,u=0;u<l.length;u++)if(l[u].name===i)return l[u];return null},getCamerasBelowPointer:function(i){for(var l=this.cameras,u=i.x,d=i.y,f=[],v=0;v<l.length;v++){var m=l[v];m.visible&&m.inputEnabled&&r(m,u,d)&&f.unshift(m)}return f},remove:function(i,l){l===void 0&&(l=!0),Array.isArray(i)||(i=[i]);for(var u=0,d=this.cameras,f=0;f<i.length;f++){var v=d.indexOf(i[f]);v!==-1&&(l?d[v].destroy():d[v].renderList=[],d.splice(v,1),u++)}return!this.main&&d[0]&&(this.main=d[0]),u},render:function(i,l){for(var u=this.scene,d=this.cameras,f=0;f<d.length;f++){var v=d[f];if(v.visible&&v.alpha>0){v.preRender();var m=this.getVisibleChildren(l.getChildren(),v);i.render(u,m,v)}}},getVisibleChildren:function(i,l){return i.filter(function(u){return u.willRender(l)})},resetAll:function(){for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(i,l){for(var u=0;u<this.cameras.length;u++)this.cameras[u].update(i,l)},onResize:function(i,l,u,d,f){for(var v=0;v<this.cameras.length;v++){var m=this.cameras[v];m._x===0&&m._y===0&&m._width===d&&m._height===f&&m.setSize(l.width,l.height)}},resize:function(i,l){for(var u=0;u<this.cameras.length;u++)this.cameras[u].setSize(i,l)},shutdown:function(){this.main=void 0;for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();this.cameras=[];var l=this.systems.events;l.off(s.UPDATE,this.update,this),l.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(s.START,this.start,this),this.systems.events.off(s.DESTROY,this.destroy,this),this.systems.game.scale.off(e.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});n.register("CameraManager",h,"cameras"),c.exports=h},5020:(c,x,t)=>{/**
323 * @author       Richard Davey <[email protected]>
324 * @copyright    2013-2025 Phaser Studio Inc.
325 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
326 */var o=t(45319),p=t(83419),a=t(19715),n=new p({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(r,e,s,h,i,l,u,d){if(r===void 0&&(r=!0),e===void 0&&(e=1e3),s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=!1),u===void 0&&(u=null),d===void 0&&(d=this.camera.scene),!l&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=r,this.progress=0,this.red=s,this.green=h,this.blue=i,this.alpha=r?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=u,this._onUpdateScope=d;var f=r?a.FADE_OUT_START:a.FADE_IN_START;
326return this.camera.emit(f,this.camera,this,e,s,h,i),this.camera},update:function(r,e){this.isRunning&&(this._elapsed+=e,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(r){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return r.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",r.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(r,e){if(!this.isRunning&&!this.isComplete)return!1;var s=this.camera,h=this.red/255,i=this.green/255,l=this.blue/255;return r.drawFillRect(s.x,s.y,s.width,s.height,e(l,i,h,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var r=this.direction?a.FADE_OUT_COMPLETE:a.FADE_IN_COMPLETE;this.camera.emit(r,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});c.exports=n},10662:(c,x,t)=>{/**
327 * @author       Richard Davey <[email protected]>
328 * @copyright    2013-2025 Phaser Studio Inc.
329 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
330 */var o=t(45319),p=t(83419),a=t(19715),n=new p({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(r,e,s,h,i,l,u){return r===void 0&&(r=250),e===void 0&&(e=255),s===void 0&&(s=255),h===void 0&&(h=255),i===void 0&&(i=!1),l===void 0&&(l=null),u===void 0&&(u=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=r,this.progress=0,this.red=e,this.green=s,this.blue=h,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=u,this.camera.emit
330(a.FLASH_START,this.camera,this,r,e,s,h),this.camera)},update:function(r,e){this.isRunning&&(this._elapsed+=e,this.progress=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this._alpha*(1-this.progress):this.effectComplete())},postRenderCanvas:function(r){if(!this.isRunning)return!1;var e=this.camera;return r.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",r.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(r,e){if(!this.isRunning)return!1;var s=this.camera,h=this.red/255,i=this.green/255,l=this.blue/255;return r.drawFillRect(s.x,s.y,s.width,s.height,e(l,i,h,1),this.alpha),!0},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});c.exports=n},20359:(c,x,t)=>{/**
331 * @author       Richard Davey <[email protected]>
332 * @copyright    2013-2025 Phaser Studio Inc.
333 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
334 */var o=t(45319),p=t(83419),a=t(62640),n=t(19715),r=t(26099),e=new p({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,h,i,l,u,d,f){i===void 0&&(i=1e3),l===void 0&&(l=a.Linear),u===void 0&&(u=!1),d===void 0&&(d=null),f===void 0&&(f=this.camera.scene);var v=this.camera;return!u&&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 l=="string"&&a.hasOwnProperty(l)?this.ease=a[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=d,this._onUpdateScope=f,this.camera.emit
334(n.PAN_START,this.camera,this,i,s,h)),v},update:function(s,h){if(this.isRunning){this._elapsed+=h;var i=o(this._elapsed/this.duration,0,1);this.progress=i;var l=this.camera;if(this._elapsed<this.duration){var u=this.ease(i);l.getScroll(this.destination.x,this.destination.y,this.current);var d=this.source.x+(this.current.x-this.source.x)*u,f=this.source.y+(this.current.y-this.source.y)*u;l.setScroll(d,f),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,l,i,d,f)}else l.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,l,i,l.scrollX,l.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(n.PAN_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}});c.exports=e},34208:(c,x,t)=>{/**
335 * @author       Jason Nicholls <[email protected]>
336 * @copyright    2018 Photon Storm Ltd.
337 * @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
338 */var o=t(45319),p=t(83419),a=t(19715),n=t(62640),r=new p({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,l,u,d){h===void 0&&(h=1e3),i===void 0&&(i=n.Linear),l===void 0&&(l=!1),u===void 0&&(u=null),d===void 0&&(d=this.camera.scene),s===void 0&&(s=!1),this.shortestPath=s;var f=e;e<0?(f=-1*e,this.clockwise=!1):this.clockwise=!0;var v=360*Math.PI/180;f=f-Math.floor(f/v)*v;var m=this.camera;if(!l&&this.isRunning)return m;if(this.isRunning=!0,this.duration=h,this.progress=0,this.source=m.rotation,this.destination=f,typeof i=="string"&&n.hasOwnProperty(i)?this.ease=n[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=d,this.shortestPath){var y=0,g=0;this.destination>this.source?y=Math.abs(this.destination-this.source):y=Math.abs(this.destination+v)-this.source,this.source>this.destination?g=Math.abs(this.source-this.destination):g=Math.abs(this.source+v)-this.destination,y<g?this.clockwise=!0:y>g&&(this.clockwise=!1)}
338return this.camera.emit(a.ROTATE_START,this.camera,this,h,f),m},update:function(e,s){if(this.isRunning){this._elapsed+=s;var h=o(this._elapsed/this.duration,0,1);this.progress=h;var i=this.camera;if(this._elapsed<this.duration){var l=this.ease(h);this.current=i.rotation;var u=0,d=360*Math.PI/180,f=this.destination,v=this.current;this.clockwise===!1&&(f=this.current,v=this.destination),f>=v?u=Math.abs(f-v):u=Math.abs(f+d)-v;var m=0;this.clockwise?m=i.rotation+u*l:m=i.rotation-u*l,i.rotation=m,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,h,m)}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}});c.exports=r},30330:(c,x,t)=>{/**
339 * @author       Richard Davey <[email protected]>
340 * @copyright    2013-2025 Phaser Studio Inc.
341 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
342 */var o=t(45319),p=t(83419),a=t(19715),n=t(26099),r=new p({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.intensity=new n,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,s,h,i,l){return e===void 0&&(e=100),s===void 0&&(s=.05),h===void 0&&(h=!1),i===void 0&&(i=null),l===void 0&&(l=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=l,this.camera.emit
342(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=o(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var h=this.intensity,i=this.camera.width,l=this.camera.height,u=this.camera.zoom;this._offsetX=(Math.random()*h.x*i*2-h.x*i)*u,this._offsetY=(Math.random()*h.y*l*2-h.y*l)*u,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});c.exports=r},45641:(c,x,t)=>{/**
343 * @author       Richard Davey <[email protected]>
344 * @copyright    2013-2025 Phaser Studio Inc.
345 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
346 */var o=t(45319),p=t(83419),a=t(62640),n=t(19715),r=new p({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,l,u){s===void 0&&(s=1e3),h===void 0&&(h=a.Linear),i===void 0&&(i=!1),l===void 0&&(l=null),u===void 0&&(u=this.camera.scene);var d=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source=d.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=l,this._onUpdateScope=u,this.camera.emit
vendor: 17,772 bytes, lines 346-458
346(n.ZOOM_START,this.camera,this,s,e)),d},update:function(e,s){this.isRunning&&(this._elapsed+=s,this.progress=o(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(n.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});c.exports=r},20052:(c,x,t)=>{/**
347 * @author       Richard Davey <[email protected]>
348 * @copyright    2013-2025 Phaser Studio Inc.
349 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
350 */c.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:c=>{/**
351 * @author       Richard Davey <[email protected]>
352 * @copyright    2013-2025 Phaser Studio Inc.
353 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
354 */c.exports="cameradestroy"},32726:c=>{/**
355 * @author       Richard Davey <[email protected]>
356 * @copyright    2013-2025 Phaser Studio Inc.
357 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
358 */c.exports="camerafadeincomplete"},87807:c=>{/**
359 * @author       Richard Davey <[email protected]>
360 * @copyright    2013-2025 Phaser Studio Inc.
361 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
362 */c.exports="camerafadeinstart"},45917:c=>{/**
363 * @author       Richard Davey <[email protected]>
364 * @copyright    2013-2025 Phaser Studio Inc.
365 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
366 */c.exports="camerafadeoutcomplete"},95666:c=>{/**
367 * @author       Richard Davey <[email protected]>
368 * @copyright    2013-2025 Phaser Studio Inc.
369 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
370 */c.exports="camerafadeoutstart"},47056:c=>{/**
371 * @author       Richard Davey <[email protected]>
372 * @copyright    2013-2025 Phaser Studio Inc.
373 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
374 */c.exports="cameraflashcomplete"},91261:c=>{/**
375 * @author       Richard Davey <[email protected]>
376 * @copyright    2013-2025 Phaser Studio Inc.
377 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
378 */c.exports="cameraflashstart"},45047:c=>{/**
379 * @author       Richard Davey <[email protected]>
380 * @copyright    2013-2025 Phaser Studio Inc.
381 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
382 */c.exports="followupdate"},81927:c=>{/**
383 * @author       Richard Davey <[email protected]>
384 * @copyright    2013-2025 Phaser Studio Inc.
385 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
386 */c.exports="camerapancomplete"},74264:c=>{/**
387 * @author       Richard Davey <[email protected]>
388 * @copyright    2013-2025 Phaser Studio Inc.
389 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
390 */c.exports="camerapanstart"},54419:c=>{/**
391 * @author       Richard Davey <[email protected]>
392 * @copyright    2013-2025 Phaser Studio Inc.
393 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
394 */c.exports="postrender"},79330:c=>{/**
395 * @author       Richard Davey <[email protected]>
396 * @copyright    2013-2025 Phaser Studio Inc.
397 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
398 */c.exports="prerender"},93183:c=>{/**
399 * @author       Richard Davey <[email protected]>
400 * @copyright    2013-2025 Phaser Studio Inc.
401 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
402 */c.exports="camerarotatecomplete"},80112:c=>{/**
403 * @author       Richard Davey <[email protected]>
404 * @copyright    2013-2025 Phaser Studio Inc.
405 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
406 */c.exports="camerarotatestart"},62252:c=>{/**
407 * @author       Richard Davey <[email protected]>
408 * @copyright    2013-2025 Phaser Studio Inc.
409 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
410 */c.exports="camerashakecomplete"},86017:c=>{/**
411 * @author       Richard Davey <[email protected]>
412 * @copyright    2013-2025 Phaser Studio Inc.
413 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
414 */c.exports="camerashakestart"},539:c=>{/**
415 * @author       Richard Davey <[email protected]>
416 * @copyright    2013-2025 Phaser Studio Inc.
417 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
418 */c.exports="camerazoomcomplete"},51892:c=>{/**
419 * @author       Richard Davey <[email protected]>
420 * @copyright    2013-2025 Phaser Studio Inc.
421 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
422 */c.exports="camerazoomstart"},19715:(c,x,t)=>{/**
423 * @author       Richard Davey <[email protected]>
424 * @copyright    2013-2025 Phaser Studio Inc.
425 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
426 */c.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:(c,x,t)=>{/**
427 * @author       Richard Davey <[email protected]>
428 * @copyright    2013-2025 Phaser Studio Inc.
429 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
430 */c.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(c,x,t)=>{/**
431 * @author       Richard Davey <[email protected]>
432 * @copyright    2013-2025 Phaser Studio Inc.
433 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
434 */var o=t(83419),p=t(35154),a=new o({initialize:function(r){this.camera=p(r,"camera",null),this.left=p(r,"left",null),this.right=p(r,"right",null),this.up=p(r,"up",null),this.down=p(r,"down",null),this.zoomIn=p(r,"zoomIn",null),this.zoomOut=p(r,"zoomOut",null),this.zoomSpeed=p(r,"zoomSpeed",.01),this.minZoom=p(r,"minZoom",.001),this.maxZoom=p(r,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=p(r,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=p(r,"speed.x",0),this.speedY=p(r,"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(n){return this.camera=n,this},update:function(n){if(this.active){n===void 0&&(n=1);var r=this.camera;this.up&&this.up.isDown?r.scrollY-=this.speedY*n|0:this.down&&this.down.isDown&&(r.scrollY+=this.speedY*n|0),this.left&&this.left.isDown?r.scrollX-=this.speedX*n|0:this.right&&this.right.isDown&&(r.scrollX+=this.speedX*n|0),this.zoomIn&&this.zoomIn.isDown?(r.zoom-=this.zoomSpeed,r.zoom<this.minZoom&&(r.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(r.zoom+=this.zoomSpeed,r.zoom>this.maxZoom&&(r.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}});c.exports=a},58818:(c,x,t)=>{/**
435 * @author       Richard Davey <[email protected]>
436 * @copyright    2013-2025 Phaser Studio Inc.
437 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
438 */var o=t(83419),p=t(35154),a=new o({initialize:function(r){this.camera=p(r,"camera",null),this.left=p(r,"left",null),this.right=p(r,"right",null),this.up=p(r,"up",null),this.down=p(r,"down",null),this.zoomIn=p(r,"zoomIn",null),this.zoomOut=p(r,"zoomOut",null),this.zoomSpeed=p(r,"zoomSpeed",.01),this.minZoom=p(r,"minZoom",.001),this.maxZoom=p(r,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=p(r,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=p(r,"acceleration.x",0),this.accelY=p(r,"acceleration.y",0)),this.dragX=0,this.dragY=0;var s=p(r,"drag",null);typeof s=="number"?(this.dragX=s,this.dragY=s):(this.dragX=p(r,"drag.x",0),this.dragY=p(r,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var h=p(r,"maxSpeed",null);typeof h=="number"?(this.maxSpeedX=h,this.maxSpeedY=h):(this.maxSpeedX=p(r,"maxSpeed.x",0),this.maxSpeedY=p(r,"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(n){return this.camera=n,this},update:function(n){if(this.active){n===void 0&&(n=1);var r=this.camera;this._speedX>0?(this._speedX-=this.dragX*n,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*n,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*n,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*n,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&&(r.scrollX-=this._speedX*n|0),this._speedY!==0&&(r.scrollY-=this._speedY*n|0),this._zoom!==0&&(r.zoom+=this._zoom,r.zoom<this.minZoom?r.zoom=this.minZoom:r.zoom>this.maxZoom&&(r.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}});c.exports=a},38865:(c,x,t)=>{/**
439 * @author       Richard Davey <[email protected]>
440 * @copyright    2013-2025 Phaser Studio Inc.
441 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
442 */c.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(c,x,t)=>{/**
443 * @author       Richard Davey <[email protected]>
444 * @copyright    2013-2025 Phaser Studio Inc.
445 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
446 */c.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(c,x,t)=>{/**
447 * @author       Richard Davey <[email protected]>
448 * @copyright    2013-2025 Phaser Studio Inc.
449 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
450 */var o={VERSION:"3.90.0",LOG_VERSION:"v390",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};c.exports=o},69547:(c,x,t)=>{/**
451 * @author       Richard Davey <[email protected]>
452 * @copyright    2013-2025 Phaser Studio Inc.
453 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
454 */var o=t(83419),p=t(8054),a=t(42363),n=t(82264),r=t(95540),e=t(35154),s=t(41212),h=t(29747),i=t(75508),l=t(36060),u=t(80333),d=new o({initialize:function(v){v===void 0&&(v={});var m=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],y="#ffffff",g=e(v,"scale",null);this.width=e(g,"width",1024,v),this.height=e(g,"height",768,v),this.zoom=e(g,"zoom",1,v),this.parent=e(g,"parent",void 0,v),this.scaleMode=e(g,g?"mode":"scaleMode",0,v),this.expandParent=e(g,"expandParent",!0,v),this.autoRound=e(g,"autoRound",!1,v),this.autoCenter=e(g,"autoCenter",0,v),this.resizeInterval=e(g,"resizeInterval",500,v),this.fullscreenTarget=e(g,"fullscreenTarget",null,v),this.minWidth=e(g,"min.width",0,v),this.maxWidth=e(g,"max.width",0,v),this.minHeight=e(g,"min.height",0,v),this.maxHeight=e(g,"max.height",0,v),this.snapWidth=e(g,"snap.width",0,v),this.snapHeight=e(g,"snap.height",0,v),this.renderType=e(v,"type",p.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/"+p.LOG_VERSION),this.gameVersion=e(v,"version",""),this.autoFocus=e(v,"autoFocus",!0),this.stableSort=e(v,"stableSort",-1),this.stableSort===-1&&(this.stableSort=n.browser.es2019?1:0),n.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",n.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",y),this.bannerBackgroundColor=e(v,"banner.background",m),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 T=e(v,"render",null);this.pipeline=e(T,"pipeline",null,v),this.autoMobilePipeline=e(T,"autoMobilePipeline",!0,v),this.defaultPipeline=e(T,"defaultPipeline",l.MULTI_PIPELINE,v),this.antialias=e(T,"antialias",!0,v),this.antialiasGL=e(T,"antialiasGL",!0,v),this.mipmapFilter=e(T,"mipmapFilter","",v),this.desynchronized=e(T,"desynchronized",!1,v),this.roundPixels=e(T,"roundPixels",!1,v),this.pixelArt=e(T,"pixelArt",this.zoom!==1,v),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(T,"transparent",!1,v),this.clearBeforeRender=e(T,"clearBeforeRender",!0,v),this.preserveDrawingBuffer=e(T,"preserveDrawingBuffer",!1,v),this.premultipliedAlpha=e(T,"premultipliedAlpha",!0,v),this.failIfMajorPerformanceCaveat=e(T,"failIfMajorPerformanceCaveat",!1,v),this.powerPreference=e(T,"powerPreference","default",v),this.batchSize=e(T,"batchSize",4096,v),this.maxTextures=e(T,"maxTextures",-1,v),this.maxLights=e(T,"maxLights",10,v);var S=e(v,"backgroundColor",0);this.backgroundColor=u(S),this.transparent&&(this.backgroundColor=u(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",n.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.loaderMaxRetries=e(v,"loader.maxRetries",2),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),M=a.DefaultScene;E&&(Array.isArray(E)?this.defaultPlugins=E:s(E)&&(this.installGlobalPlugins=r(E,"global",[]),this.installScenePlugins=r(E,"scene",[]),Array.isArray(E.default)?M=E.default:Array.isArray(E.defaultMerge)&&(M=M.concat(E.defaultMerge)))),this.defaultPlugins=M;var F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(v,"images.default",F+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(v,"images.missing",F+"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=p.WEBGL:window.FORCE_CANVAS&&(this.renderType=p.CANVAS))}});c.exports=d},86054:(c,x,t)=>{/**
455 * @author       Richard Davey <[email protected]>
456 * @copyright    2013-2025 Phaser Studio Inc.
457 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
458 */var o=t(20623),p=t(27919),a=t(8054),n=t(89357),r=function(e){var s=e.config;if((s.customEnvironment||s.canvas)&&s.renderType===a.AUTO)throw new Error("Mu
458st set explicit renderType in custom environment");if(!s.customEnvironment&&!s.canvas&&s.renderType!==a.HEADLESS)if(s.renderType===a.AUTO&&(s.renderType=n.webGL?a.WEBGL:a.CANVAS),s.renderType===a.WEBGL){if(!n.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(s.renderType===a.CANVAS){if(!n.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+s.renderType);s.antialias||p.disableSmoothing();var h=e.scale.baseSize,i=h.width,l=h.height;if(s.canvas?(e.canvas=s.canvas,e.canvas.width=i,e.canvas.height=l):e.canvas=p.create(e,i,l,s.renderType),s.canvasStyle&&(e.canvas.style=s.canvasStyle),s.antialias||o.setCrisp(e.canvas),s.renderType!==a.HEADLESS){var u,d;u=t(68627),d=t(74797),s.renderType===a.WEBGL?e.renderer=new d(e):(e.renderer=new u(e),e.context=e.renderer.gameContext)}};c.exports=r},96391:(c,x,t)=>{/**
459 * @author       Richard Davey <[email protected]>
460 * @copyright    2013-2025 Phaser Studio Inc.
461 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
462 */var o=t(8054),p=function(a){var n=a.config;if(!n.hideBanner){var r="WebGL";n.renderType===o.CANVAS?r="Canvas":n.renderType===o.HEADLESS&&(r="Headless");var e=n.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"+o.VERSION+" / https://phaser.io");else{var i="",l=[i];if(Array.isArray(n.bannerBackgroundColor)){var u;n.bannerBackgroundColor.forEach(function(f){i=i.concat("%c "),l.push("background: "+f),u=f}),l[l.length-1]="color: "+n.bannerTextColor+"; background: "+u}else i=i.concat("%c "),l.push("color: "+n.bannerTextColor+"; background: "+n.bannerBackgroundColor);l.push("background: transparent"),n.gameTitle&&(i=i.concat(n.gameTitle),n.gameVersion&&(i=i.concat(" v"+n.gameVersion)),n.hidePhaser||(i=i.concat(" / ")));var d="";n.hidePhaser||(i=i.concat("Phaser v"+o.VERSION+d+" ("+r+" | "+h+")")),i=i.concat(" %c "+n.gameURL),l[0]=i,console.log.apply(console,l)}}};c.exports=p},50127:(c,x,t)=>{/**
463 * @author       Richard Davey <[email protected]>
464 * @copyright    2013-2025 Phaser Studio Inc.
465 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
466 */var o=t(40366),p=t(60848),a=t(24047),n=t(27919),r=t(83419),e=t(69547),s=t(83719),h=t(86054),i=t(45893),l=t(96391),u=t(82264),d=t(57264),f=t(50792),v=t(8443),m=t(7003),y=t(37277),g=t(77332),T=t(76531),S=t(60903),E=t(69442),M=t(17130),F=t(65898),A=t(51085),P=t(14747),L=new r({initialize:function(G){this.config=new e(G),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new f,this.anims=new p(this),this.textures=new M(this),this.cache=new a(this),this.registry=new i(this,new f),this.input=new m(this,this.config),this.scene=new S(this,this.config.sceneConfig),this.device=u,this.scale=new T(this,this.config),this.sound=null,this.sound=P.create(this),this.loop=new F(this,this.config.fps),this.plugins=new g(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,d(this.boot.bind(this))},boot:function(){if(!y.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),h(this),s(this),l(this),o(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)),A(this);var O=this.events;O.on(v.HIDDEN,this.onHidden,this),O.on(v.VISIBLE,this.onVisible,this),O.on(v.BLUR,this.onBlur,this),O.on(v.FOCUS,this.onFocus,this)},step:function(O,G){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var z=this.events;z.emit(v.PRE_STEP,O,G),z.emit(v.STEP,O,G),this.scene.update(O,G),z.emit(v.POST_STEP,O,G);var Y=this.renderer;Y.preRender(),z.emit(v.PRE_RENDER,Y,O,G),this.scene.render(Y),Y.postRender(),z.emit(v.POST_RENDER,Y,O,G)}},headlessStep:function(O,G){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var z=this.events;z.emit(v.PRE_STEP,O,G),z.emit(v.STEP,O,G),this.scene.update(O,G),z.emit(v.POST_STEP,O,G),this.scene.isProcessing=!1,z.emit(v.PRE_RENDER,null,O,G),z.emit(v.POST_RENDER,null,O,G)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var O=this.isPaused;this.isPaused=!0,O||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME,this.loop.pauseDuration)},resume:function(){var O=this.isPaused;this.isPaused=!1,O&&this.events.emit(v.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(O,G){G===void 0&&(G=!1),this.pendingDestroy=!0,this.removeCanvas=O,this.noReturn=G},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(n.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}});c.exports=L},65898:(c,x,t)=>{/**
467 * @author       Richard Davey <[email protected]>
468 * @copyright    2013-2025 Phaser Studio Inc.
469 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
470 */var o=t(83419),p=t(35154),a=t(29747),n=t(43092),r=new o({initialize:function(s,h){this.game=s,this.raf=new n,this.started=!1,this.running=!1,this.minFps=p(h,"min",5),this.targetFps=p(h,"target",60),this.fpsLimit=p(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=p(h,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=p(h,"deltaHistory",10),this.panicMax=p(h,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=
470p(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.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var s=0;s<this.deltaSmoothingMax;s++)this.deltaHistory[s]=Math.min(this._target,this.deltaHistory[s]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(e){if(this.started)return this;this.started=!0,this.running=!0;for(var s=0;s<this.deltaSmoothingMax;s++)this.deltaHistory[s]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=e;var h=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(h,this.forceSetTimeOut,this._target)},smoothDelta:function(e){var s=this.deltaIndex,h=this.deltaHistory,i=this.deltaSmoothingMax;(this._coolDown>0||!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 l=0,u=0;u<i;u++)l+=h[u];return l/=i,l},updateFPS:function(e){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0},stepLimitFPS: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.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}});c.exports=r},51085:(c,x,t)=>{/**
471 * @author       Richard Davey <[email protected]>
472 * @copyright    2013-2025 Phaser Studio Inc.
473 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
474 */var o=t(8443),p=function(a){var n,r=a.events;if(document.hidden!==void 0)n="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(h){document[h+"Hidden"]!==void 0&&(document.hidden=function(){return document[h+"Hidden"]},n=h+"visibilitychange")})}var s=function(h){document.hidden||h.type==="pause"?r.emit(o.HIDDEN):r.emit(o.VISIBLE)};n&&document.addEventListener(n,s,!1),window.onblur=function(){r.emit(o.BLUR)},window.onfocus=function(){r.emit(o.FOCUS)},window.focus&&a.config.autoFocus&&window.focus()};c.exports=p},97217:c=>{/**
475 * @author       Richard Davey <[email protected]>
476 * @copyright    2013-2025 Phaser Studio Inc.
477 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
478 */c.exports="blur"},47548:c=>{/**
479 * @author       Richard Davey <[email protected]>
480 * @copyright    2013-2025 Phaser Studio Inc.
481 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
482 */c.exports="boot"},19814:c=>{/**
483 * @author       Richard Davey <[email protected]>
484 * @copyright    2013-2025 Phaser Studio Inc.
485 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
486 */c.exports="contextlost"},68446:c=>{/**
487 * @author       Richard Davey <[email protected]>
488 * @copyright    2013-2025 Phaser Studio Inc.
489 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
490 */c.exports="destroy"},41700:c=>{/**
491 * @author       Richard Davey <[email protected]>
492 * @copyright    2013-2025 Phaser Studio Inc.
493 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
494 */c.exports="focus"},25432:c=>{/**
495 * @author       Richard Davey <[email protected]>
496 * @copyright    2013-2025 Phaser Studio Inc.
497 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
498 */c.exports="hidden"},65942:c=>{/**
499 * @author       Richard Davey <[email protected]>
500 * @copyright    2013-2025 Phaser Studio Inc.
501 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
502 */c.exports="pause"},59211:c=>{/**
503 * @author       Richard Davey <[email protected]>
504 * @copyright    2013-2025 Phaser Studio Inc.
505 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
506 */c.exports="postrender"},47789:c=>{/**
507 * @author       Richard Davey <[email protected]>
508 * @copyright    2013-2025 Phaser Studio Inc.
509 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
510 */c.exports="poststep"},39066:c=>{/**
511 * @author       Richard Davey <[email protected]>
512 * @copyright    2013-2025 Phaser Studio Inc.
513 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
514 */c.exports="prerender"},460:c=>{/**
515 * @author       Richard Davey <[email protected]>
516 * @copyright    2013-2025 Phaser Studio Inc.
517 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
518 */c.exports="prestep"},16175:c=>{/**
519 * @author       Richard Davey <[email protected]>
520 * @copyright    2013-2025 Phaser Studio Inc.
521 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
522 */c.exports="ready"},42331:c=>{/**
523 * @author       Richard Davey <[email protected]>
524 * @copyright    2013-2025 Phaser Studio Inc.
525 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
526 */c.exports="resume"},11966:c=>{/**
527 * @author       Richard Davey <[email protected]>
528 * @copyright    2013-2025 Phaser Studio Inc.
529 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
530 */c.exports="step"},32969:c=>
530{/**
531 * @author       Richard Davey <[email protected]>
532 * @copyright    2013-2025 Phaser Studio Inc.
533 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
534 */c.exports="systemready"},94830:c=>{/**
535 * @author       Richard Davey <[email protected]>
536 * @copyright    2013-2025 Phaser Studio Inc.
537 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
538 */c.exports="visible"},8443:(c,x,t)=>{/**
539 * @author       Richard Davey <[email protected]>
540 * @copyright    2013-2025 Phaser Studio Inc.
541 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
542 */c.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:(c,x,t)=>{/**
543 * @author       Richard Davey <[email protected]>
544 * @copyright    2013-2025 Phaser Studio Inc.
545 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
546 */c.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(c,x,t)=>{/**
547 * @author       Richard Davey <[email protected]>
548 * @copyright    2013-2025 Phaser Studio Inc.
549 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
550 */var o=t(5290),p=t(27919),a=t(35154),n=function(r){var e=a(r,"data",[]),s=a(r,"canvas",null),h=a(r,"palette",o),i=a(r,"pixelWidth",1),l=a(r,"pixelHeight",i),u=a(r,"resizeCanvas",!0),d=a(r,"clearCanvas",!0),f=a(r,"preRender",null),v=a(r,"postRender",null),m=Math.floor(Math.abs(e[0].length*i)),y=Math.floor(Math.abs(e.length*l));s||(s=p.create2D(this,m,y),u=!1,d=!1),u&&(s.width=m,s.height=y);var g=s.getContext("2d",{willReadFrequently:!0});d&&g.clearRect(0,0,m,y),f&&f(s,g);for(var T=0;T<e.length;T++)for(var S=e[T],E=0;E<S.length;E++){var M=S[E];M!=="."&&M!==" "&&(g.fillStyle=h[M],g.fillRect(E*i,T*l,i,l))}return v&&v(s,g),s};c.exports=n},15822:(c,x,t)=>{/**
551 * @author       Richard Davey <[email protected]>
552 * @copyright    2013-2025 Phaser Studio Inc.
553 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
554 */c.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:c=>{/**
555 * @author       Richard Davey <[email protected]>
556 * @copyright    2013-2025 Phaser Studio Inc.
557 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
558 */c.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:c=>{/**
559 * @author       Richard Davey <[email protected]>
560 * @copyright    2013-2025 Phaser Studio Inc.
561 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
562 */c.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:c=>{/**
563 * @author       Richard Davey <[email protected]>
564 * @copyright    2013-2025 Phaser Studio Inc.
565 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
566 */c.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:c=>{/**
567 * @author       Richard Davey <[email protected]>
568 * @copyright    2013-2025 Phaser Studio Inc.
569 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
570 */c.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:c=>{/**
571 * @author       Richard Davey <[email protected]>
572 * @copyright    2013-2025 Phaser Studio Inc.
573 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
574 */c.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:(c,x,t)=>{/**
575 * @author       Richard Davey <[email protected]>
576 * @copyright    2013-2025 Phaser Studio Inc.
577 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
578 */c.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(c,x,t)=>{/**
579 * @author       Richard Davey <[email protected]>
580 * @copyright    2013-2025 Phaser Studio Inc.
581 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
582 */var o=t(83419),p=t(36316),a=t(80021),n=t(26099),r=new o({Extends:a,initialize:function(s,h,i,l){a.call(this,"CubicBezierCurve"),Array.isArray(s)&&(l=new n(s[6],s[7]),i=new n(s[4],s[5]),h=new n(s[2],s[3]),s=new n(s[0],s[1])),this.p0=s,this.p1=h,this.p2=i,this.p3=l}
582,getStartPoint:function(e){return e===void 0&&(e=new n),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new n);var h=this.p0,i=this.p1,l=this.p2,u=this.p3;return s.set(p(e,h.x,i.x,l.x,u.x),p(e,h.y,i.y,l.y,u.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<h.length;i++)e.lineTo(h[i].x,h[i].y);return e.strokePath(),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});r.fromJSON=function(e){var s=e.points,h=new n(s[0],s[1]),i=new n(s[2],s[3]),l=new n(s[4],s[5]),u=new n(s[6],s[7]);return new r(h,i,l,u)},c.exports=r},80021:(c,x,t)=>{/**
583 * @author       Richard Davey <[email protected]>
584 * @copyright    2013-2025 Phaser Studio Inc.
585 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
586 */var o=t(83419),p=t(19217),a=t(87841),n=t(26099),r=new o({initialize:function(s){this.type=s,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new n,this._tmpVec2B=new n},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 p(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 n),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),l=0;s.push(0);for(var u=1;u<=e;u++)h=this.getPoint(u/e,this._tmpVec2B),l+=h.distance(i),s.push(l),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 n),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 l=this.getUtoTmapping(i/e,null,e);h.push(this.getPoint(l))}return h},getStartPoint:function(e){return e===void 0&&(e=new n),this.getPointAt(0,e)},getTangent:function(e,s){s===void 0&&(s=new n);var h=1e-4,i=e-h,l=e+h;return i<0&&(i=0),l>1&&(l=1),this.getPoint(i,this._tmpVec2A),this.getPoint(l,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),l=0,u=i.length,d;s?d=Math.min(s,i[u-1]):d=e*i[u-1];for(var f=0,v=u-1,m;f<=v;)if(l=Math.floor(f+(v-f)/2),m=i[l]-d,m<0)f=l+1;else if(m>0)v=l-1;else{v=l;break}if(l=v,i[l]===d)return l/(u-1);var y=i[l],g=i[l+1],T=g-y,S=(d-y)/T;return(l+S)/(u-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});c.exports=r},73825:(c,x,t)=>{/**
587 * @author       Richard Davey <[email protected]>
588 * @copyright    2013-2025 Phaser Studio Inc.
589 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
590 */var o=t(83419),p=t(80021),a=t(39506),n=t(35154),r=t(43396),e=t(26099),s=new o({Extends:p,initialize:function(i,l,u,d,f,v,m,y){if(typeof i=="object"){var g=i;i=n(g,"x",0),l=n(g,"y",0),u=n(g,"xRadius",0),d=n(g,"yRadius",u),f=n(g,"startAngle",0),v=n(g,"endAngle",360),m=n(g,"clockwise",!1),y=n(g,"rotation",0)}else d===void 0&&(d=u),f===void 0&&(f=0),v===void 0&&(v=360),m===void 0&&(m=!1),y===void 0&&(y=0);p.call(this,"EllipseCurve"),this.p0=new e(i,l),this._xRadius=u,this._yRadius=d,this._startAngle=a(f),this._endAngle=a(v),this._clockwise=m,this._rotation=a(y)},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 l=Math.PI*2,u=this._endAngle-this._startAngle,d=Math.abs(u)<Number.EPSILON;u<0;)u+=l;for(;u>l;)u-=l;u<Number.EPSILON&&(d?u=0:u=l),this._clockwise&&!d&&(u===l?u=-l:u=u-l);var f=this._startAngle+h*u,v=this.p0.x+this._xRadius*Math.cos(f),m=this.p0.y+this._yRadius*Math.sin(f);if(this._rotation!==0){var y=Math.cos(this._rotation),g=Math.sin(this._rotation),T=v-this.p0.x,S=m-this.p0.y;v=T*y-S*g+this.p0.x,m=T*g+S*y+this.p0.y}return i.set(v,m)},setXRadius:function(h){return this.xRadius=h,this},setYRadius:function(h){return this.yRadius=h,this}
590,setWidth:function(h){return this.xRadius=h/2,this},setHeight:function(h){return this.yRadius=h/2,this},setStartAngle:function(h){return this.startAngle=h,this},setEndAngle:function(h){return this.endAngle=h,this},setClockwise:function(h){return this.clockwise=h,this},setRotation:function(h){return this.rotation=h,this},x:{get:function(){return this.p0.x},set:function(h){this.p0.x=h}},y:{get:function(){return this.p0.y},set:function(h){this.p0.y=h}},xRadius:{get:function(){return this._xRadius},set:function(h){this._xRadius=h}},yRadius:{get:function(){return this._yRadius},set:function(h){this._yRadius=h}},startAngle:{get:function(){return r(this._startAngle)},set:function(h){this._startAngle=a(h)}},endAngle:{get:function(){return r(this._endAngle)},set:function(h){this._endAngle=a(h)}},clockwise:{get:function(){return this._clockwise},set:function(h){this._clockwise=h}},angle:{get:function(){return r(this._rotation)},set:function(h){this._rotation=a(h)}},rotation:{get:function(){return this._rotation},set:function(h){this._rotation=h}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:r(this._startAngle),endAngle:r(this._endAngle),clockwise:this._clockwise,rotation:r(this._rotation)}}});s.fromJSON=function(h){return new s(h)},c.exports=s},33951:(c,x,t)=>{/**
591 * @author       Richard Davey <[email protected]>
592 * @copyright    2013-2025 Phaser Studio Inc.
593 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
594 */var o=t(83419),p=t(80021),a=t(19217),n=t(87841),r=t(26099),e=new o({Extends:p,initialize:function(h,i){p.call(this,"LineCurve"),Array.isArray(h)&&(i=new r(h[2],h[3]),h=new r(h[0],h[1])),this.p0=h,this.p1=i,this.arcLengthDivisions=1},getBounds:function(s){return s===void 0&&(s=new n),a([this.p0,this.p1],s)},getStartPoint:function(s){return s===void 0&&(s=new r),s.copy(this.p0)},getResolution:function(s){return s===void 0&&(s=1),s},getPoint:function(s,h){return h===void 0&&(h=new r),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 r),h.copy(this.p1).subtract(this.p0).normalize(),h},getUtoTmapping:function(s,h,i){var l;if(h){var u=this.getLengths(i),d=u[u.length-1],f=Math.min(h,d);l=f/d}else l=s;return l},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 r(h[0],h[1]),l=new r(h[2],h[3]);return new e(i,l)},c.exports=e},14744:(c,x,t)=>{/**
595 * @author       Richard Davey <[email protected]>
596 * @copyright    2013-2025 Phaser Studio Inc.
597 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
598 */var o=t(83419),p=t(80021),a=t(32112),n=t(26099),r=new o({Extends:p,initialize:function(s,h,i){p.call(this,"QuadraticBezierCurve"),Array.isArray(s)&&(i=new n(s[4],s[5]),h=new n(s[2],s[3]),s=new n(s[0],s[1])),this.p0=s,this.p1=h,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new n),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new n);var h=this.p0,i=this.p1,l=this.p2;return s.set(a(e,h.x,i.x,l.x),a(e,h.y,i.y,l.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<h.length;i++)e.lineTo(h[i].x,h[i].y);return e.strokePath(),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});r.fromJSON=function(e){var s=e.points,h=new n(s[0],s[1]),i=new n(s[2],s[3]),l=new n(s[4],s[5]);return new r(h,i,l)},c.exports=r},42534:(c,x,t)=>{/**
599 * @author       Richard Davey <[email protected]>
600 * @copyright    2013-2025 Phaser Studio Inc.
601 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
602 */var o=t(87842),p=t(83419),a=t(80021),n=t(26099),r=new p({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;s<e.length;s++){var h=new n;typeof e[s]=="number"?(h.x=e[s],h.y=e[s+1],s++):Array.isArray(e[s])?(h.x=e[s][0],h.y=e[s][1]):(h.x=e[s].x,h.y=e[s].y),this.points.push(h)}return this},addPoint:function(e,s){var h=new n(e,s);return this.points.push(h),h},getStartPoint:function(e){return e===void 0&&(e=new n),e.copy(this.points[0])},getResolution:function(e){return e*this.points.length},getPoint:function(e,s){s===void 0&&(s=new n);var h=this.points,i=(h.length-1)*e,l=Math.floor(i),u=i-l,d=h[l===0?l:l-1],f=h[l],v=h[l>h.length-2?h.length-1:l+1],m=h[l>h.length-3?h.length-1:l+2];return s.set(o(u,d.x,f.x,v.x,m.x),o(u,d.y,f.y,v.y,m.y))},toJSON:function(){for(var e=[],s=0;s<this.points.length;s++)e.push(this.points[s].x),e.push(this.points[s].y);
vendor: 8,387 bytes, lines 602-618
602return{type:this.type,points:e}}});r.fromJSON=function(e){return new r(e.points)},c.exports=r},25410:(c,x,t)=>{/**
603 * @author       Richard Davey <[email protected]>
604 * @copyright    2013-2025 Phaser Studio Inc.
605 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
606 */c.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:(c,x,t)=>{/**
607 * @author       Richard Davey <[email protected]>
608 * @copyright    2013-2025 Phaser Studio Inc.
609 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
610 */var o=t(83419),p=t(26099),a=new o({initialize:function(r,e){this.active=!1,this.p0=new p(r,e)},getPoint:function(n,r){return r===void 0&&(r=new p),r.copy(this.p0)},getPointAt:function(n,r){return this.getPoint(n,r)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});c.exports=a},46669:(c,x,t)=>{/**
611 * @author       Richard Davey <[email protected]>
612 * @copyright    2013-2025 Phaser Studio Inc.
613 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
614 */var o=t(83419),p=t(46728),a=t(73825),n=t(39429),r=t(33951),e=t(68618),s=t(14744),h=t(87841),i=t(42534),l=t(26099),u=t(36383),d=new o({initialize:function(v,m){v===void 0&&(v=0),m===void 0&&(m=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new l,this._tmpVec2A=new l,this._tmpVec2B=new l,typeof v=="object"?this.fromJSON(v):this.startPoint.set(v,m)},add:function(f){return this.curves.push(f),this},circleTo:function(f,v,m){return v===void 0&&(v=!1),this.ellipseTo(f,f,0,360,v,m)},closePath:function(){var f=this.curves[0].getPoint(0),v=this.curves[this.curves.length-1].getPoint(1);return f.equals(v)||this.curves.push(new r(v,f)),this},cubicBezierTo:function(f,v,m,y,g,T){var S=this.getEndPoint(),E,M,F;return f instanceof l?(E=f,M=v,F=m):(E=new l(m,y),M=new l(g,T),F=new l(f,v)),this.add(new p(S,E,M,F))},quadraticBezierTo:function(f,v,m,y){var g=this.getEndPoint(),T,S;return f instanceof l?(T=f,S=v):(T=new l(m,y),S=new l(f,v)),this.add(new s(g,T,S))},draw:function(f,v){for(var m=0;m<this.curves.length;m++){var y=this.curves[m];y.active&&y.draw(f,v)}return f},ellipseTo:function(f,v,m,y,g,T){var S=new a(0,0,f,v,m,y,g,T),E=this.getEndPoint(this._tmpVec2A),M=S.getStartPoint(this._tmpVec2B);return E.subtract(M),S.x=E.x,S.y=E.y,this.add(S)},fromJSON:function(f){this.curves=[],this.cacheLengths=[],this.startPoint.set(f.x,f.y),this.autoClose=f.autoClose;for(var v=0;v<f.curves.length;v++){var m=f.curves[v];switch(m.type){case"LineCurve":this.add(r.fromJSON(m));break;case"EllipseCurve":this.add(a.fromJSON(m));break;case"SplineCurve":this.add(i.fromJSON(m));break;case"CubicBezierCurve":this.add(p.fromJSON(m));break;case"QuadraticBezierCurve":this.add(s.fromJSON(m));break}}return this},getBounds:function(f,v){f===void 0&&(f=new h),v===void 0&&(v=16),f.x=Number.MAX_VALUE,f.y=Number.MAX_VALUE;for(var m=new h,y=u.MIN_SAFE_INTEGER,g=u.MIN_SAFE_INTEGER,T=0;T<this.curves.length;T++){var S=this.curves[T];S.active&&(S.getBounds(m,v),f.x=Math.min(f.x,m.x),f.y=Math.min(f.y,m.y),y=Math.max(y,m.right),g=Math.max(g,m.bottom))}return f.right=y,f.bottom=g,f},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var f=[],v=0,m=0;m<this.curves.length;m++)v+=this.curves[m].getLength(),f.push(v);return this.cacheLengths=f,f},getCurveAt:function(f){for(var v=f*this.getLength(),m=this.getCurveLengths(),y=0;y<m.length;){if(m[y]>=v)return this.curves[y];y++}return null},getEndPoint:function(f){return f===void 0&&(f=new l),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,f):f.copy(this.startPoint),f},getLength:function(){var f=this.getCurveLengths();return f[f.length-1]},getPoint:function(f,v){v===void 0&&(v=new l);for(var m=f*this.getLength(),y=this.getCurveLengths(),g=0;g<y.length;){if(y[g]>=m){var T=y[g]-m,S=this.curves[g],E=S.getLength(),M=E===0?0:1-T/E;return S.getPointAt(M,v)}g++}return null},getPoints:function(f,v){!f&&!v&&(f=this.defaultDivisions);for(var m=[],y,g=0;g<this.curves.length;g++){var T=this.curves[g];if(T.active)for(var S=T.getResolution(f),E=T.getPoints(S,v),M=0;M<E.length;M++){var F=E[M];y&&y.equals(F)||(m.push(F),y=F)}}return this.autoClose&&m.length>1&&!m[m.length-1].equals(m[0])&&m.push(m[0]),m},getRandomPoint:function(f){return f===void 0&&(f=new l),this.getPoint(Math.random(),f)},getSpacedPoints:function(f){f===void 0&&(f=40);for(var v=[],m=0;m<=f;m++)v.push(this.getPoint(m/f));return this.autoClose&&v.push(v[0]),v},getStartPoint:function(f){return f===void 0&&(f=new l),f.copy(this.startPoint)},getTangent:function(f,v){v===void 0&&(v=new l);for(var m=f*this.getLength(),y=this.getCurveLengths(),g=0;g<y.length;){if(y[g]>=m){var T=y[g]-m,S=this.curves[g],E=S.getLength(),M=E===0?0:1-T/E;return S.getTangentAt(M,v)}g++}return null},lineTo:function(f,v){f instanceof l?this._tmpVec2B.copy(f):typeof f=="object"?this._tmpVec2B.setFromObject(f):this._tmpVec2B.set(f,v);var m=this.getEndPoint(this._tmpVec2A);return this.add(new r([m.x,m.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(f){return f.unshift(this.getEndPoint()),this.add(new i(f))},moveTo:function(f,v){return f instanceof l?this.add(new e(f.x,f.y)):this.add(new e(f,v))},toJSON:function(){for(var f=[],v=0;v<this.curves.length;v++)f.push(this.curves[v].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:f}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});n.register("path",function(f,v){return new d(f,v)}),c.exports=d},45893:(c,x,t)=>{/**
615 * @author       Richard Davey <[email protected]>
616 * @copyright    2013-2025 Phaser Studio Inc.
617 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
618 */var o=t(83419),p=t(24882),a=new o({initialize:function(r,e){this.parent=r,this.events=e,e||(this.events=r.events?r.events:r),this.list={},this.values={},this._frozen=!1,!r.hasOwnProperty("sys")&&this.events&&this.events.once(p.DESTROY,this.destroy,this)},get:function(n){var r=this.list;if(Array.isArray(n)){for(var e=[],s=0;s<n.length;s++)e.push(r[n[s]]);return e}else return r[n]},getAll:function(){var n={};for(var r in this.list)this.list.hasOwnProperty(r)&&(n[r]=this.list[r]);return n},query:function(n){var r={};for(var e in this.list)this.list.hasOwnProperty(e)&&e.match(n)&&(r[e]=this.list[e]);return r},set:function(n,r){if(this._frozen)return this;if(typeof n=="string")return this.setValue(n,r);for(var e in n)this.setValue(e,n[e]);return this},inc:function(n,r){if(this._frozen)return this;r===void 0&&(r=1);var e=this.get(n);return e===void 0&&(e=0),this.set(n,e+r),this},toggle:function(n){return this._frozen?this:(this.set(n,!this.get(n)),this)},setValue:function(n,r){if(this._frozen)return this;if(this.has(n))this.values[n]=r;else{var e=this,s=this.list,h=this.events,i=this.parent;Object.defineProperty(this.values,n,{enumerable:!0,configurable:!0,get:function(){return s[n]},set:function(l){if(!e._frozen){var u=s[n];s[n]=l,h.emit(p.CHANGE_DATA,i,n,l,u),h.emit(p.CHANGE_DATA_KEY+n,i,l,u)}}}),s[n]=r,h.emit(p.SET_DATA,i,n,r)}return this},each:function(n,r){for(var e=[this.parent,null,void 0],s=1;s<arguments.length;s++)e.push(arguments[s]);for(var h in this.list)e[1]=h,e[2]=this.list[h],n.apply(r,e);return this},merge:function(n,r){r===void 0&&(r=!0);for(var e in n)n.hasOwnProperty(e)&&(r||!r&&!this.has(e))&&this.setValue(e,n[e]);return this},remove:function(n){if(this._frozen)return this;if(Array.isArray(n))for(var r=0;r<n.length;r++)this.removeValue(n[r]);else return this.removeValue(n);return this},removeValue:function(n){if(this.has(n)){var r=this.list[n];delete this.list[n],delete this.values[n],this.events.emit(p.REMOVE_DATA,this.parent,n,r)}return this},pop:function(n){var r=void 0;return!this._frozen&&this.has(n)&&(r=this.list[n],delete this.list[n],delete this.values[n],this.events.emit(p.REMOVE_DATA,this.parent,n,r)),r},has:function(n){return this.list.hasOwnProperty(n)},setFreeze:function(n){return this._frozen=n,this},reset:function(){for(var n in this.list)delete this.list[n],delete this.values[n];return this._frozen=!1,this}
618,destroy:function(){this.reset(),this.events.off(p.CHANGE_DATA),this.events.off(p.SET_DATA),this.events.off(p.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(n){this._frozen=!!n}},count:{get:function(){var n=0;for(var r in this.list)this.list[r]!==void 0&&n++;return n}}});c.exports=a},63646:(c,x,t)=>{/**
619 * @author       Richard Davey <[email protected]>
620 * @copyright    2013-2025 Phaser Studio Inc.
621 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
622 */var o=t(83419),p=t(45893),a=t(37277),n=t(44594),r=new o({Extends:p,initialize:function(s){p.call(this,s,s.sys.events),this.scene=s,this.systems=s.sys,s.sys.events.once(n.BOOT,this.boot,this),s.sys.events.on(n.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){p.prototype.destroy.call(this),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null}});a.register("DataManagerPlugin",r,"data"),c.exports=r},10700:c=>{/**
623 * @author       Richard Davey <[email protected]>
624 * @copyright    2013-2025 Phaser Studio Inc.
625 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
626 */c.exports="changedata"},93608:c=>{/**
627 * @author       Richard Davey <[email protected]>
628 * @copyright    2013-2025 Phaser Studio Inc.
629 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
630 */c.exports="changedata-"},60883:c=>{/**
631 * @author       Richard Davey <[email protected]>
632 * @copyright    2013-2025 Phaser Studio Inc.
633 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
634 */c.exports="destroy"},69780:c=>{/**
635 * @author       Richard Davey <[email protected]>
636 * @copyright    2013-2025 Phaser Studio Inc.
637 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
638 */c.exports="removedata"},22166:c=>{/**
639 * @author       Richard Davey <[email protected]>
640 * @copyright    2013-2025 Phaser Studio Inc.
641 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
642 */c.exports="setdata"},24882:(c,x,t)=>{/**
643 * @author       Richard Davey <[email protected]>
644 * @copyright    2013-2025 Phaser Studio Inc.
645 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
646 */c.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(c,x,t)=>{/**
647 * @author       Richard Davey <[email protected]>
648 * @copyright    2013-2025 Phaser Studio Inc.
649 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
650 */c.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(c,x,t)=>{/**
651 * @author       Richard Davey <[email protected]>
652 * @copyright    2013-2025 Phaser Studio Inc.
653 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
654 */var o=t(84148),p={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 p;p.audioData=!!window.Audio,p.webAudio=!!(window.AudioContext||window.webkitAudioContext);var n=document.createElement("audio"),r=!!n.canPlayType;try{if(r){var e=function(i,l){var u=n.canPlayType("audio/"+i).replace(/^no$/,"");return l?!!(u||n.canPlayType("audio/"+l).replace(/^no$/,"")):!!u};if(p.ogg=e('ogg; codecs="vorbis"'),p.opus=e('ogg; codecs="opus"',"opus"),p.mp3=e("mpeg"),p.wav=e("wav"),p.m4a=e("x-m4a"),p.aac=e("aac"),p.flac=e("flac","x-flac"),p.webm=e('webm; codecs="vorbis"'),n.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(o.edge)p.dolby=!0;else if(o.safari&&o.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)&&(p.dolby=!0)}}}}catch{}return p}c.exports=a()},84148:(c,x,t)=>{/**
655 * @author       Richard Davey <[email protected]>
656 * @copyright    2013-2025 Phaser Studio Inc.
657 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
658 */var o=t(25892),p={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 n=navigator.userAgent;return/Edg\/\d+/.test(n)?(p.edge=!0,p.es2019=!0):/OPR/.test(n)?(p.opera=!0,p.es2019=!0):/Chrome\/(\d+)/.test(n)&&!o.windowsPhone?(p.chrome=!0,p.chromeVersion=parseInt(RegExp.$1,10),p.es2019=p.chromeVersion>69):/Firefox\D+(\d+)/.test(n)?(p.firefox=!0,p.firefoxVersion=parseInt(RegExp.$1,10),p.es2019=p.firefoxVersion>
65810):/AppleWebKit\/(?!.*CriOS)/.test(n)&&o.iOS?(p.mobileSafari=!0,p.es2019=!0):/MSIE (\d+\.\d+);/.test(n)?(p.ie=!0,p.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(n)&&!o.windowsPhone?(p.safari=!0,p.safariVersion=parseInt(RegExp.$1,10),p.es2019=p.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(p.ie=!0,p.trident=!0,p.tridentVersion=parseInt(RegExp.$1,10),p.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(p.silk=!0),p}c.exports=a()},89289:(c,x,t)=>{/**
659 * @author       Richard Davey <[email protected]>
660 * @copyright    2013-2025 Phaser Studio Inc.
661 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
662 */var o=t(27919),p={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 l=o.create2D(i,6),u=l.getContext("2d",{willReadFrequently:!0});if(u.globalCompositeOperation="multiply",u.drawImage(h,0,0),u.drawImage(i,2,0),!u.getImageData(2,0,1,1))return!1;var d=u.getImageData(2,0,1,1).data;o.remove(i),p.supportNewBlendModes=d[0]===255&&d[1]===0&&d[2]===0},i.src=e+"/wCKxvRF"+s},h.src=e+"AP804Oa6"+s,!1}function n(){var e=o.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),l=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 o.remove(this),l}function r(){return typeof importScripts!="function"&&document!==void 0&&(p.supportNewBlendModes=a(),p.supportInverseAlpha=n()),p}c.exports=r()},89357:(c,x,t)=>{/**
663 * @author       Richard Davey <[email protected]>
664 * @copyright    2013-2025 Phaser Studio Inc.
665 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
666 */var o=t(25892),p=t(84148),a=t(27919),n={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 r(){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 n;n.canvas=!!window.CanvasRenderingContext2D;try{n.localStorage=!!localStorage.getItem}catch{n.localStorage=!1}n.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,n.fileSystem=!!window.requestFileSystem;var s=!1,h=function(){if(window.WebGLRenderingContext)try{var i=a.createWebGL(this),l=i.getContext("webgl")||i.getContext("experimental-webgl"),u=a.create2D(this),d=u.getContext("2d",{willReadFrequently:!0}),f=d.createImageData(1,1);return s=f.data instanceof Uint8ClampedArray,a.remove(i),a.remove(u),!!l}catch{return!1}return!1};return n.webGL=h(),n.worker=!!window.Worker,n.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,n.getUserMedia=n.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,p.firefox&&p.firefoxVersion<21&&(n.getUserMedia=!1),!o.iOS&&(p.ie||p.firefox||p.chrome)&&(n.canvasBitBltShift=!0),(p.safari||p.mobileSafari)&&(n.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(n.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(n.littleEndian=r()),n.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&n.littleEndian!==null&&s,n}c.exports=e()},91639:c=>{/**
667 * @author       Richard Davey <[email protected]>
668 * @copyright    2013-2025 Phaser Studio Inc.
669 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
670 */var x={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return x;var o,p="Fullscreen",a="FullScreen",n=["request"+p,"request"+a,"webkitRequest"+p,"webkitRequest"+a,"msRequest"+p,"msRequest"+a,"mozRequest"+a,"mozRequest"+p];for(o=0;o<n.length;o++)if(document.documentElement[n[o]]){x.available=!0,x.request=n[o];break}var r=["cancel"+a,"exit"+p,"webkitCancel"+a,"webkitExit"+p,"msCancel"+a,"msExit"+p,"mozCancel"+a,"mozExit"+p];if(x.available){for(o=0;o<r.length;o++)if(document[r[o]]){x.cancel=r[o];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(x.keyboard=!0),Object.defineProperty(x,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),x}c.exports=t()},31784:(c,x,t)=>{/**
671 * @author       Richard Davey <[email protected]>
672 * @copyright    2013-2025 Phaser Studio Inc.
673 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
674 */var o=t(84148),p={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function a(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(p.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(p.mspointer=!0),navigator.getGamepads&&(p.gamepads=!0),"onwheel"in window||o.ie&&"WheelEvent"in window?p.wheelEvent="wheel":"onmousewheel"in window?p.wheelEvent="mou
674sewheel":o.firefox&&"MouseScrollEvent"in window&&(p.wheelEvent="DOMMouseScroll")),p}c.exports=a()},25892:c=>{/**
675 * @author       Richard Davey <[email protected]>
676 * @copyright    2013-2025 Phaser Studio Inc.
677 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
678 */var x={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 x;var o=navigator.userAgent;/Windows/.test(o)?x.windows=!0:/Mac OS/.test(o)&&!/like Mac OS/.test(o)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(x.iOS=!0,x.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),x.iOSVersion=parseInt(RegExp.$1,10)):x.macOS=!0:/Android/.test(o)?x.android=!0:/Linux/.test(o)?x.linux=!0:/iP[ao]d|iPhone/i.test(o)?(x.iOS=!0,navigator.appVersion.match(/OS (\d+)/),x.iOSVersion=parseInt(RegExp.$1,10),x.iPhone=o.toLowerCase().indexOf("iphone")!==-1,x.iPad=o.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(o)||/\bKF[A-Z][A-Z]+/.test(o)||/Silk.*Mobile Safari/.test(o)?x.kindle=!0:/CrOS/.test(o)&&(x.chromeOS=!0),(/Windows Phone/i.test(o)||/IEMobile/i.test(o))&&(x.android=!1,x.iOS=!1,x.macOS=!1,x.windows=!0,x.windowsPhone=!0);var p=/Silk/.test(o);return(x.windows||x.macOS||x.linux&&!p||x.chromeOS)&&(x.desktop=!0),(x.windowsPhone||/Windows NT/i.test(o)&&/Touch/i.test(o))&&(x.desktop=!1),navigator.standalone&&(x.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(x.cordova=!0),window.ejecta!==void 0&&(x.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(x.node=!0),x.node&&typeof process.versions=="object"&&(x.nodeWebkit=!!process.versions["node-webkit"],x.electron=!!process.versions.electron),/Crosswalk/.test(o)&&(x.crosswalk=!0),x.pixelRatio=window.devicePixelRatio||1,x}c.exports=t()},43267:(c,x,t)=>{/**
679 * @author       Richard Davey <[email protected]>
680 * @copyright    2013-2025 Phaser Studio Inc.
681 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
682 */var o=t(95540),p={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function a(){if(typeof importScripts=="function")return p;var n=document.createElement("video"),r=!!n.canPlayType,e=/^no$/;try{r&&(n.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(p.ogg=!0),n.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(p.h264=!0,p.mp4=!0),n.canPlayType("video/x-m4v").replace(e,"")&&(p.m4v=!0),n.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(p.webm=!0),n.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(p.vp9=!0),n.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(p.hls=!0))}catch{}return n.parentNode&&n.parentNode.removeChild(n),p.getVideoURL=function(s){Array.isArray(s)||(s=[s]);for(var h=0;h<s.length;h++){var i=o(s[h],"url",s[h]);if(i.indexOf("blob:")===0)return{url:i,type:""};var l;if(i.indexOf("data:")===0?l=i.split(",")[0].match(/\/(.*?);/):l=i.match(/\.([a-zA-Z0-9]+)($|\?)/),l=o(s[h],"type",l?l[1]:"").toLowerCase(),p[l])return{url:i,type:l}}return null},p}c.exports=a()},82264:(c,x,t)=>{/**
683 * @author       Richard Davey <[email protected]>
684 * @copyright    2013-2025 Phaser Studio Inc.
685 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
686 */c.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:(c,x,t)=>{/**
687 * @author       Richard Davey <[email protected]>
688 * @copyright    2013-2025 Phaser Studio Inc.
689 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
690 */var o=t(83419),p=new Float32Array(20),a=new o({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(n){return this._matrix.set(n),this._dirty=!0,this},reset:function(){var n=this._matrix;return n.fill(0),n[0]=1,n[6]=1,n[12]=1,n[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var n=this._data;return this._dirty&&(n.set(this._matrix),n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,this._dirty=!1),n},brightness:function(n,r){n===void 0&&(n=0),r===void 0&&(r=!1);var e=n;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],r)},saturate:function(n,r){n===void 0&&(n=0),r===void 0&&(r=!1);var e=n*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],r)},desaturate:function(n){return n===void 0&&(n=!1),this.saturate(-1,n)},hue:function(n,r){n===void 0&&(n=0),r===void 0&&(r=!1),n=n/180*Math.PI;var e=Math.cos(n),s=Math.sin(n),h=.213,i=.715,l=.072;return this.multiply([h+e*(1-h)+s*-h,i+e*-i+s*-i,l+e*-l+s*(1-l),0,0,h+e*-h+s*.143,i+e*(1-i)+s*.14,l+e*-l+s*-.283,0,0,h+e*-h+s*-.787,i+e*-i+s*i,l+e*(1-l)+s*l,0,0,0,0,0,1,0],r)},grayscale:function(n,r){return n===void 0&&(n=1),r===void 0&&(r=!1),this.saturate(-n,r)},blackWhite:function(n){return n===void 0&&(n=!1),this.multiply(a.BLACK_WHITE,n)},contrast:function(n,r){n===void 0&&(n=0),r===void 0&&(r=!1);var e=n+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],r)},negative:function(n){return n===void 0&&(n=!1),this.multiply(a.NEGATIVE,n)},desaturateLuminance:function(n){return n===void 0&&(n=!1),this.multiply(a.DESATURATE_LUMINANCE,n)},sepia:function(n){return n===void 0&&(n=!1),this.multiply(a.SEPIA,n
690)},night:function(n,r){return n===void 0&&(n=.1),r===void 0&&(r=!1),this.multiply([n*-2,-n,0,0,0,-n,0,n,0,0,0,n,n*2,0,0,0,0,0,1,0],r)},lsd:function(n){return n===void 0&&(n=!1),this.multiply(a.LSD,n)},brown:function(n){return n===void 0&&(n=!1),this.multiply(a.BROWN,n)},vintagePinhole:function(n){return n===void 0&&(n=!1),this.multiply(a.VINTAGE,n)},kodachrome:function(n){return n===void 0&&(n=!1),this.multiply(a.KODACHROME,n)},technicolor:function(n){return n===void 0&&(n=!1),this.multiply(a.TECHNICOLOR,n)},polaroid:function(n){return n===void 0&&(n=!1),this.multiply(a.POLAROID,n)},shiftToBGR:function(n){return n===void 0&&(n=!1),this.multiply(a.SHIFT_BGR,n)},multiply:function(n,r){r===void 0&&(r=!1),r||this.reset();var e=this._matrix,s=p;return s.set(e),e.set([s[0]*n[0]+s[1]*n[5]+s[2]*n[10]+s[3]*n[15],s[0]*n[1]+s[1]*n[6]+s[2]*n[11]+s[3]*n[16],s[0]*n[2]+s[1]*n[7]+s[2]*n[12]+s[3]*n[17],s[0]*n[3]+s[1]*n[8]+s[2]*n[13]+s[3]*n[18],s[0]*n[4]+s[1]*n[9]+s[2]*n[14]+s[3]*n[19]+s[4],s[5]*n[0]+s[6]*n[5]+s[7]*n[10]+s[8]*n[15],s[5]*n[1]+s[6]*n[6]+s[7]*n[11]+s[8]*n[16],s[5]*n[2]+s[6]*n[7]+s[7]*n[12]+s[8]*n[17],s[5]*n[3]+s[6]*n[8]+s[7]*n[13]+s[8]*n[18],s[5]*n[4]+s[6]*n[9]+s[7]*n[14]+s[8]*n[19]+s[9],s[10]*n[0]+s[11]*n[5]+s[12]*n[10]+s[13]*n[15],s[10]*n[1]+s[11]*n[6]+s[12]*n[11]+s[13]*n[16],s[10]*n[2]+s[11]*n[7]+s[12]*n[12]+s[13]*n[17],s[10]*n[3]+s[11]*n[8]+s[12]*n[13]+s[13]*n[18],s[10]*n[4]+s[11]*n[9]+s[12]*n[14]+s[13]*n[19]+s[14],s[15]*n[0]+s[16]*n[5]+s[17]*n[10]+s[18]*n[15],s[15]*n[1]+s[16]*n[6]+s[17]*n[11]+s[18]*n[16],s[15]*n[2]+s[16]*n[7]+s[17]*n[12]+s[18]*n[17],s[15]*n[3]+s[16]*n[8]+s[17]*n[13]+s[18]*n[18],s[15]*n[4]+s[16]*n[9]+s[17]*n[14]+s[18]*n[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],c.exports=a},51767:(c,x,t)=>{/**
691 * @author       Richard Davey <[email protected]>
692 * @copyright    2013-2025 Phaser Studio Inc.
693 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
694 */var o=t(83419),p=t(29747),a=new o({initialize:function(r,e,s){this._rgb=[0,0,0],this.onChangeCallback=p,this.dirty=!1,this.set(r,e,s)},set:function(n,r,e){return n===void 0&&(n=0),r===void 0&&(r=0),e===void 0&&(e=0),this._rgb=[n,r,e],this.onChange(),this},equals:function(n,r,e){var s=this._rgb;return s[0]===n&&s[1]===r&&s[2]===e},onChange:function(){this.dirty=!0;var n=this._rgb;this.onChangeCallback.call(this,n[0],n[1],n[2])},r:{get:function(){return this._rgb[0]},set:function(n){this._rgb[0]=n,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(n){this._rgb[1]=n,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(n){this._rgb[2]=n,this.onChange()}},destroy:function(){this.onChangeCallback=null}});c.exports=a},60461:c=>{/**
695 * @author       Richard Davey <[email protected]>
696 * @copyright    2013-2025 Phaser Studio Inc.
697 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
698 */var x={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};c.exports=x},54312:(c,x,t)=>{/**
699 * @author       Richard Davey <[email protected]>
700 * @copyright    2013-2025 Phaser Studio Inc.
701 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
702 */var o=t(62235),p=t(35893),a=t(86327),n=t(88417),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)+h),a(e,o(s)+i),e};c.exports=r},46768:(c,x,t)=>{/**
703 * @author       Richard Davey <[email protected]>
704 * @copyright    2013-2025 Phaser Studio Inc.
705 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
706 */var o=t(62235),p=t(26541),a=t(86327),n=t(385),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)-h
706),a(e,o(s)+i),e};c.exports=r},35827:(c,x,t)=>{/**
707 * @author       Richard Davey <[email protected]>
708 * @copyright    2013-2025 Phaser Studio Inc.
709 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
710 */var o=t(62235),p=t(54380),a=t(86327),n=t(40136),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)+h),a(e,o(s)+i),e};c.exports=r},46871:(c,x,t)=>{/**
711 * @author       Richard Davey <[email protected]>
712 * @copyright    2013-2025 Phaser Studio Inc.
713 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
714 */var o=t(66786),p=t(35893),a=t(7702),n=function(r,e,s,h){return s===void 0&&(s=0),h===void 0&&(h=0),o(r,p(e)+s,a(e)+h),r};c.exports=n},5198:(c,x,t)=>{/**
715 * @author       Richard Davey <[email protected]>
716 * @copyright    2013-2025 Phaser Studio Inc.
717 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
718 */var o=t(7702),p=t(26541),a=t(20786),n=t(385),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)-h),a(e,o(s)+i),e};c.exports=r},11879:(c,x,t)=>{/**
719 * @author       Richard Davey <[email protected]>
720 * @copyright    2013-2025 Phaser Studio Inc.
721 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
722 */var o=t(60461),p=[];p[o.BOTTOM_CENTER]=t(54312),p[o.BOTTOM_LEFT]=t(46768),p[o.BOTTOM_RIGHT]=t(35827),p[o.CENTER]=t(46871),p[o.LEFT_CENTER]=t(5198),p[o.RIGHT_CENTER]=t(80503),p[o.TOP_CENTER]=t(89698),p[o.TOP_LEFT]=t(922),p[o.TOP_RIGHT]=t(21373),p[o.LEFT_BOTTOM]=p[o.BOTTOM_LEFT],p[o.LEFT_TOP]=p[o.TOP_LEFT],p[o.RIGHT_BOTTOM]=p[o.BOTTOM_RIGHT],p[o.RIGHT_TOP]=p[o.TOP_RIGHT];var a=function(n,r,e,s,h){return p[e](n,r,s,h)};c.exports=a},80503:(c,x,t)=>{/**
723 * @author       Richard Davey <[email protected]>
724 * @copyright    2013-2025 Phaser Studio Inc.
725 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
726 */var o=t(7702),p=t(54380),a=t(20786),n=t(40136),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)+h),a(e,o(s)+i),e};c.exports=r},89698:(c,x,t)=>{/**
727 * @author       Richard Davey <[email protected]>
728 * @copyright    2013-2025 Phaser Studio Inc.
729 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
730 */var o=t(35893),p=t(17717),a=t(88417),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,o(s)+h),n(e,p(s)-i),e};c.exports=r},922:(c,x,t)=>{/**
731 * @author       Richard Davey <[email protected]>
732 * @copyright    2013-2025 Phaser Studio Inc.
733 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
734 */var o=t(26541),p=t(17717),a=t(385),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,o(s)-h),n(e,p(s)-i),e};c.exports=r},21373:(c,x,t)=>{/**
735 * @author       Richard Davey <[email protected]>
736 * @copyright    2013-2025 Phaser Studio Inc.
737 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
738 */var o=t(54380),p=t(17717),a=t(40136),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,o(s)+h),n(e,p(s)-i),e};c.exports=r},91660:(c,x,t)=>{/**
739 * @author       Richard Davey <[email protected]>
740 * @copyright    2013-2025 Phaser Studio Inc.
741 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
742 */c.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:(c,x,t)=>{/**
743 * @author       Richard Davey <[email protected]>
744 * @copyright    2013-2025 Phaser Studio Inc.
745 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
746 */var o=t(60461),p=t(79291),a={In:t(91660),To:t(16694)};a=p(!1,a,o),c.exports=a},21578:(c,x,t)=>{/**
747 * @author       Richard Davey <[email protected]>
748 * @copyright    2013-2025 Phaser Studio Inc.
749 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
750 */var o=t(62235),p=t(35893),a=t(88417),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,p(s)+h),n(e,o(s)+i),e};c.exports=r},10210:(c,x,t)=>{/**
751 * @author       Richard Davey <[email protected]>
752 * @copyright    2013-2025 Phaser Studio Inc.
753 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
754 */var o=t(62235),p=t(26541),a=t(385),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,p(s)-h
754),n(e,o(s)+i),e};c.exports=r},82341:(c,x,t)=>{/**
755 * @author       Richard Davey <[email protected]>
756 * @copyright    2013-2025 Phaser Studio Inc.
757 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
758 */var o=t(62235),p=t(54380),a=t(40136),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,p(s)+h),n(e,o(s)+i),e};c.exports=r},87958:(c,x,t)=>{/**
759 * @author       Richard Davey <[email protected]>
760 * @copyright    2013-2025 Phaser Studio Inc.
761 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
762 */var o=t(62235),p=t(26541),a=t(86327),n=t(40136),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)-h),a(e,o(s)+i),e};c.exports=r},40080:(c,x,t)=>{/**
763 * @author       Richard Davey <[email protected]>
764 * @copyright    2013-2025 Phaser Studio Inc.
765 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
766 */var o=t(7702),p=t(26541),a=t(20786),n=t(40136),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)-h),a(e,o(s)+i),e};c.exports=r},88466:(c,x,t)=>{/**
767 * @author       Richard Davey <[email protected]>
768 * @copyright    2013-2025 Phaser Studio Inc.
769 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
770 */var o=t(26541),p=t(17717),a=t(40136),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,o(s)-h),n(e,p(s)-i),e};c.exports=r},38829:(c,x,t)=>{/**
771 * @author       samme
772 * @copyright    2013-2025 Phaser Studio Inc.
773 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
774 */var o=t(60461),p=[];p[o.BOTTOM_CENTER]=t(21578),p[o.BOTTOM_LEFT]=t(10210),p[o.BOTTOM_RIGHT]=t(82341),p[o.LEFT_BOTTOM]=t(87958),p[o.LEFT_CENTER]=t(40080),p[o.LEFT_TOP]=t(88466),p[o.RIGHT_BOTTOM]=t(19211),p[o.RIGHT_CENTER]=t(34609),p[o.RIGHT_TOP]=t(48741),p[o.TOP_CENTER]=t(49440),p[o.TOP_LEFT]=t(81288),p[o.TOP_RIGHT]=t(61323);var a=function(n,r,e,s,h){return p[e](n,r,s,h)};c.exports=a},19211:(c,x,t)=>{/**
775 * @author       Richard Davey <[email protected]>
776 * @copyright    2013-2025 Phaser Studio Inc.
777 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
778 */var o=t(62235),p=t(54380),a=t(86327),n=t(385),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)+h),a(e,o(s)+i),e};c.exports=r},34609:(c,x,t)=>{/**
779 * @author       Richard Davey <[email protected]>
780 * @copyright    2013-2025 Phaser Studio Inc.
781 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
782 */var o=t(7702),p=t(54380),a=t(20786),n=t(385),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,p(s)+h),a(e,o(s)+i),e};c.exports=r},48741:(c,x,t)=>{/**
783 * @author       Richard Davey <[email protected]>
784 * @copyright    2013-2025 Phaser Studio Inc.
785 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
786 */var o=t(54380),p=t(17717),a=t(385),n=t(66737),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),a(e,o(s)+h),n(e,p(s)-i),e};c.exports=r},49440:(c,x,t)=>{/**
787 * @author       Richard Davey <[email protected]>
788 * @copyright    2013-2025 Phaser Studio Inc.
789 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
790 */var o=t(35893),p=t(17717),a=t(86327),n=t(88417),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,o(s)+h),a(e,p(s)-i),e};c.exports=r},81288:(c,x,t)=>{/**
791 * @author       Richard Davey <[email protected]>
792 * @copyright    2013-2025 Phaser Studio Inc.
793 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
794 */var o=t(26541),p=t(17717),a=t(86327),n=t(385),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,o(s)-h),a(e,p(s)-i),e};c.exports=r},61323:(c,x,t)=>{/**
795 * @author       Richard Davey <[email protected]>
796 * @copyright    2013-2025 Phaser Studio Inc.
797 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
798 */var o=t(54380),p=t(17717),a=t(86327),n=t(40136),r=function(e,s,h,i){return h===void 0&&(h=0),i===void 0&&(i=0),n(e,o(s)+h),a(e,p(s)-i),e};c.exports=r},16694:(c,x,t)=>{/**
799 * @author       Richard Davey <[email protected]>
800 * @copyright    2013-2025 Phaser Studio Inc.
801 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
802 */c.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:(c,x,t)=>{/**
803 * @author       Richard Davey <[email protected]>
804 * @copyright    2013-2025 Phaser Studio Inc.
805 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
806 */var o=t(88417),p=t(20786),a=function(n,r,e){return o(n,r),p(n,e)};c.exports=a},62235:c=>{/**
807 * @author       Richard Davey <[email protected]>
808 * @copyright    2013-2025 Phaser Studio Inc.
809 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
810 */var x=function(t){return t.y+t.height-t.height*t.originY};c.exports=x},72873:(c,x,t)=>{/**
811 * @author       samme
812 * @copyright    2013-2025 Phaser Studio Inc.
813 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
814 */var o=t(62235),p=t(26541),a=t(54380),n=t(17717),r=t(87841),e=function(s,h){h===void 0&&(h=new r);var i=p(s),l=n(s);return h.x=i,h.y=l,h.width=a(s)-i,h.height=o(s)-l,h};c.exports=e},35893:c=>{/**
815 * @author       Richard Davey <[email protected]>
816 * @copyright    2013-2025 Phaser Studio Inc.
817 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
818 */var x=function(t){return t.x-t.width*t.originX+t.width*.5};c.exports=x}
818,7702:c=>{/**
819 * @author       Richard Davey <[email protected]>
820 * @copyright    2013-2025 Phaser Studio Inc.
821 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
822 */var x=function(t){return t.y-t.height*t.originY+t.height*.5};c.exports=x},26541:c=>{/**
823 * @author       Richard Davey <[email protected]>
824 * @copyright    2013-2025 Phaser Studio Inc.
825 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
826 */var x=function(t){return t.x-t.width*t.originX};c.exports=x},87431:c=>{/**
827 * @author       Richard Davey <[email protected]>
828 * @copyright    2013-2025 Phaser Studio Inc.
829 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
830 */var x=function(t){return t.width*t.originX};c.exports=x},46928:c=>{/**
831 * @author       Richard Davey <[email protected]>
832 * @copyright    2013-2025 Phaser Studio Inc.
833 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
834 */var x=function(t){return t.height*t.originY};c.exports=x},54380:c=>{/**
835 * @author       Richard Davey <[email protected]>
836 * @copyright    2013-2025 Phaser Studio Inc.
837 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
838 */var x=function(t){return t.x+t.width-t.width*t.originX};c.exports=x},17717:c=>{/**
839 * @author       Richard Davey <[email protected]>
840 * @copyright    2013-2025 Phaser Studio Inc.
841 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
842 */var x=function(t){return t.y-t.height*t.originY};c.exports=x},86327:c=>{/**
843 * @author       Richard Davey <[email protected]>
844 * @copyright    2013-2025 Phaser Studio Inc.
845 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
846 */var x=function(t,o){return t.y=o-t.height+t.height*t.originY,t};c.exports=x},88417:c=>{/**
847 * @author       Richard Davey <[email protected]>
848 * @copyright    2013-2025 Phaser Studio Inc.
849 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
850 */var x=function(t,o){var p=t.width*t.originX;return t.x=o+p-t.width*.5,t};c.exports=x},20786:c=>{/**
851 * @author       Richard Davey <[email protected]>
852 * @copyright    2013-2025 Phaser Studio Inc.
853 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
854 */var x=function(t,o){var p=t.height*t.originY;return t.y=o+p-t.height*.5,t};c.exports=x},385:c=>{/**
855 * @author       Richard Davey <[email protected]>
856 * @copyright    2013-2025 Phaser Studio Inc.
857 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
858 */var x=function(t,o){return t.x=o+t.width*t.originX,t};c.exports=x},40136:c=>{/**
859 * @author       Richard Davey <[email protected]>
860 * @copyright    2013-2025 Phaser Studio Inc.
861 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
862 */var x=function(t,o){return t.x=o-t.width+t.width*t.originX,t};c.exports=x},66737:c=>{/**
863 * @author       Richard Davey <[email protected]>
864 * @copyright    2013-2025 Phaser Studio Inc.
865 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
866 */var x=function(t,o){return t.y=o+t.height*t.originY,t};c.exports=x},58724:(c,x,t)=>{/**
867 * @author       Richard Davey <[email protected]>
868 * @copyright    2013-2025 Phaser Studio Inc.
869 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
870 */c.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:c=>{/**
871 * @author       Richard Davey <[email protected]>
872 * @copyright    2013-2025 Phaser Studio Inc.
873 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
874 */var x={setCrisp:function(t){var o=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return o.forEach(function(p){t.style["image-rendering"]=p}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};c.exports=x},27919:(c,x,t)=>{/**
875 * @author       Richard Davey <[email protected]>
876 * @copyright    2013-2025 Phaser Studio Inc.
877 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
878 */var o=t(8054),p=t(68703),a=[],n=!1,r=function(){var e=function(m,y,g,T,S){y===void 0&&(y=1),g===void 0&&(g=1),T===void 0&&(T=o.CANVAS),S===void 0&&(S=!1);var E,M=i(T);return M===null?(M={parent:m,canvas:document.createElement("canvas"),type:T}
878,T===o.CANVAS&&a.push(M),E=M.canvas):(M.parent=m,E=M.canvas),S&&(M.parent=E),E.width=y,E.height=g,n&&T===o.CANVAS&&p.disable(E.getContext("2d",{willReadFrequently:!1})),E},s=function(m,y,g){return e(m,y,g,o.CANVAS)},h=function(m,y,g){return e(m,y,g,o.WEBGL)},i=function(m){if(m===void 0&&(m=o.CANVAS),m===o.WEBGL)return null;for(var y=0;y<a.length;y++){var g=a[y];if(!g.parent&&g.type===m)return g}return null},l=function(m){var y=m instanceof HTMLCanvasElement;a.forEach(function(g){(y&&g.canvas===m||!y&&g.parent===m)&&(g.parent=null,g.canvas.width=1,g.canvas.height=1)})},u=function(){var m=0;return a.forEach(function(y){y.parent&&m++}),m},d=function(){return a.length-u()},f=function(){n=!0},v=function(){n=!1};return{create2D:s,create:e,createWebGL:h,disableSmoothing:f,enableSmoothing:v,first:i,free:d,pool:a,remove:l,total:u}};c.exports=r()},68703:c=>{/**
879 * @author       Richard Davey <[email protected]>
880 * @copyright    2013-2025 Phaser Studio Inc.
881 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
882 */var x="",t=function(){var o=function(r){for(var e=["i","webkitI","msI","mozI","oI"],s=0;s<e.length;s++){var h=e[s]+"mageSmoothingEnabled";if(h in r)return h}return null},p=function(r){return x===""&&(x=o(r)),x&&(r[x]=!0),r},a=function(r){return x===""&&(x=o(r)),x&&(r[x]=!1),r},n=function(r){return x!==null?r[x]:null};return{disable:a,enable:p,getPrefix:o,isEnabled:n}};c.exports=t()},65208:c=>{/**
883 * @author       Richard Davey <[email protected]>
884 * @copyright    2013-2025 Phaser Studio Inc.
885 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
886 */var x=function(t,o){return o===void 0&&(o="none"),t.style.msTouchAction=o,t.style["ms-touch-action"]=o,t.style["touch-action"]=o,t};c.exports=x},91610:c=>{/**
887 * @author       Richard Davey <[email protected]>
888 * @copyright    2013-2025 Phaser Studio Inc.
889 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
890 */var x=function(t,o){o===void 0&&(o="none");var p=["-webkit-","-khtml-","-moz-","-ms-",""];return p.forEach(function(a){t.style[a+"user-select"]=o}),t.style["-webkit-touch-callout"]=o,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};c.exports=x},26253:(c,x,t)=>{/**
891 * @author       Richard Davey <[email protected]>
892 * @copyright    2013-2025 Phaser Studio Inc.
893 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
894 */c.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(c,x,t)=>{/**
895 * @author       Richard Davey <[email protected]>
896 * @copyright    2013-2025 Phaser Studio Inc.
897 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
898 */var o=t(83419),p=t(37589),a=t(1e3),n=t(7537),r=t(87837),e=new o({initialize:function(h,i,l,u){h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=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,l,u)},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,l,u){return l===void 0&&(l=255),u===void 0&&(u=!0),this._locked=!0,this.red=s,this.green=h,this.blue=i,this.alpha=l,this._locked=!1,this.update(u)},setGLTo:function(s,h,i,l){return l===void 0&&(l=1),this._locked=!0,this.redGL=s,this.greenGL=h,this.blueGL=i,this.alphaGL=l,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 n(s,h,i,this)},update:function(s){if(s===void 0&&(s=!1),this._locked)return this;var h=this.r,i=this.g,l=this.b,u=this.a;return this._color=p(h,i,l),this._color32=a(h,i,l,u),this._rgba="rgba("+h+","+i+","+l+","+u/255+")",s&&r(h,i,l,this),this},updateHSV:function(){var s=this.r,h=this.g,i=this.b;return r(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)),l=Math.floor(s+Math.random()*(h-s)),u=Math.floor(s+Math.random()*(h-s));return this.setTo(i,l,u)},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,l=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)))),l=Math.max(0,Math.min(255,l-Math.round(255*-(s/100)))),this.setTo(h,i,l)},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]}
898,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,n(s,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(s){this._s=s,n(this._h,s,this._v,this)}},v:{get:function(){return this._v},set:function(s){this._v=s,n(this._h,this._s,s,this)}}});c.exports=e},92728:(c,x,t)=>{/**
899 * @author       Richard Davey <[email protected]>
900 * @copyright    2013-2025 Phaser Studio Inc.
901 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
902 */var o=t(37589),p=function(a){a===void 0&&(a=1024);var n=[],r=255,e,s=255,h=0,i=0;for(e=0;e<=r;e++)n.push({r:s,g:e,b:i,color:o(s,e,i)});for(h=255,e=r;e>=0;e--)n.push({r:e,g:h,b:i,color:o(e,h,i)});for(s=0,e=0;e<=r;e++,h--)n.push({r:s,g:h,b:e,color:o(s,h,e)});for(h=0,i=255,e=0;e<=r;e++,i--,s++)n.push({r:s,g:h,b:i,color:o(s,h,i)});if(a===1024)return n;var l=[],u=0,d=1024/a;for(e=0;e<a;e++)l.push(n[Math.floor(u)]),u+=d;return l};c.exports=p},91588:c=>{/**
903 * @author       Richard Davey <[email protected]>
904 * @copyright    2013-2025 Phaser Studio Inc.
905 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
906 */var x=function(t){var o={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(o.a=t>>>24),o};c.exports=x},62957:c=>{/**
907 * @author       Richard Davey <[email protected]>
908 * @copyright    2013-2025 Phaser Studio Inc.
909 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
910 */var x=function(t){var o=t.toString(16);return o.length===1?"0"+o:o};c.exports=x},37589:c=>{/**
911 * @author       Richard Davey <[email protected]>
912 * @copyright    2013-2025 Phaser Studio Inc.
913 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
914 */var x=function(t,o,p){return t<<16|o<<8|p};c.exports=x},1e3:c=>{/**
915 * @author       Richard Davey <[email protected]>
916 * @copyright    2013-2025 Phaser Studio Inc.
917 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
918 */var x=function(t,o,p,a){return a<<24|t<<16|o<<8|p};c.exports=x},62183:(c,x,t)=>{/**
919 * @author       Richard Davey <[email protected]>
920 * @copyright    2013-2025 Phaser Studio Inc.
921 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
922 */var o=t(40987),p=t(89528),a=function(n,r,e){var s=e,h=e,i=e;if(r!==0){var l=e<.5?e*(1+r):e+r-e*r,u=2*e-l;s=p(u,l,n+1/3),h=p(u,l,n),i=p(u,l,n-1/3)}var d=new o;return d.setGLTo(s,h,i,1)};c.exports=a},27939:(c,x,t)=>{/**
923 * @author       Richard Davey <[email protected]>
924 * @copyright    2013-2025 Phaser Studio Inc.
925 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
926 */var o=t(7537),p=function(a,n){a===void 0&&(a=1),n===void 0&&(n=1);for(var r=[],e=0;e<=359;e++)r.push(o(e/359,a,n));return r};c.exports=p},7537:(c,x,t)=>{/**
927 * @author       Richard Davey <[email protected]>
928 * @copyright    2013-2025 Phaser Studio Inc.
929 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
930 */var o=t(37589);function p(n,r,e,s){var h=(n+r*6)%6,i=Math.min(h,4-h,1);return Math.round(255*(s-s*e*Math.max(0,i)))}var a=function(n,r,e,s){r===void 0&&(r=1),e===void 0&&(e=1);var h=p(5,n,r,e),i=p(3,n,r,e),l=p(1,n,r,e);return s?s.setTo?s.setTo(h,i,l,s.alpha,!0):(s.r=h,s.g=i,s.b=l,s.color=o(h,i,l),s):{r:h,g:i,b:l,color:o(h,i,l)}};c.exports=a},70238:(c,x,t)=>{/**
931 * @author       Richard Davey <[email protected]>
932 * @copyright    2013-2025 Phaser Studio Inc.
933 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
934 */var o=t(40987),p=function(a){var n=new o;a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,l,u,d){return l+l+u+u+d+d});var r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(r){var e=parseInt(r[1],16),s=parseInt(r[2],16),h=parseInt(r[3],16);n.setTo(e,s,h)}return n};c.exports=p},89528:c=>{/**
935 * @author       Richard Davey <[email protected]>
936 * @copyright    2013-2025 Phaser Studio Inc.
937 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
938 */var x=function(t,o,p){return p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?t+(o-t)*6*p:p<.5?o:p<.6666666666666666?t+(o-t)*(.6666666666666666-p)*6:t};c.exports=x},30100:(c,x,t)=>{/**
939 * @author       Richard Davey <[email protected]>
940 * @copyright    2013-2025 Phaser Studio Inc.
941 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
942 */var o=t(40987),p=t(90664),a=function(n){var r=p(n);return new o(r.r,r.g,r.b,r.a)};c.exports=a},90664:c=>{/**
943 * @author       Richard Davey <[email protected]>
944 * @copyright    2013-2025 Phaser Studio Inc.
945 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
946 */var x=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}};c.exports=x},13699:(c,x,t)=>{/**
947 * @author       Richard Davey <[email protected]>
948 * @copyright    2013-2025 Phaser Studio Inc.
949 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
950 */var o=t(28915),p=t(37589),a=function(e,s,h,i,l,u,d,f){d===void 0&&(d=100),f===void 0&&(f=0);var v=f/d,m=o(e,i,v),y=o(s,l,v),g=o(h,u,v);return{r:m,g:y,b:g,a:255,color:p(m,y,g)}},n=function(e,s,h,i){return h===void 0&&(h=100),i===void 0&&(i=0),a(e.r,e.g,e.b,s.r,s.g,s.b,h,i)},r=function(e,s,h,i,l,u){return l===void 0&&(l=100),u===void 0&&(u=0),a(e.r,e.g,e.b,s,h,i,l,u)};c.exports={RGBWithRGB:a,ColorWithRGB:r,ColorWithColor:n}},68957:(c,x,t)=>{/**
951 * @author       Richard Davey <[email protected]>
952 * @copyright    2013-2025 Phaser Studio Inc.
953 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
954 */var o=t(40987),p=function(a){return new o(a.r,a.g,a.b,a.a)};c.exports=p},87388:(c,x,t)=>{/**
955 * @author       Richard Davey <[email protected]>
956 * @copyright    2013-2025 Phaser Studio Inc.
957 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
958 */var o=t(40987),p=function(a){var n=new o,r=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a.toLowerCase());
958if(r){var e=parseInt(r[1],10),s=parseInt(r[2],10),h=parseInt(r[3],10),i=r[4]!==void 0?parseFloat(r[4]):1;n.setTo(e,s,h,i*255)}return n};c.exports=p},87837:c=>{/**
959 * @author       Richard Davey <[email protected]>
960 * @copyright    2013-2025 Phaser Studio Inc.
961 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
962 */var x=function(t,o,p,a){a===void 0&&(a={h:0,s:0,v:0}),t/=255,o/=255,p/=255;var n=Math.min(t,o,p),r=Math.max(t,o,p),e=r-n,s=0,h=r===0?0:e/r,i=r;return r!==n&&(r===t?s=(o-p)/e+(o<p?6:0):r===o?s=(p-t)/e+2:r===p&&(s=(t-o)/e+4),s/=6),a.hasOwnProperty("_h")?(a._h=s,a._s=h,a._v=i):(a.h=s,a.s=h,a.v=i),a};c.exports=x},75723:(c,x,t)=>{/**
963 * @author       Richard Davey <[email protected]>
964 * @copyright    2013-2025 Phaser Studio Inc.
965 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
966 */var o=t(62957),p=function(a,n,r,e,s){return e===void 0&&(e=255),s===void 0&&(s="#"),s==="#"?"#"+((1<<24)+(a<<16)+(n<<8)+r).toString(16).slice(1,7):"0x"+o(e)+o(a)+o(n)+o(r)};c.exports=p},85386:(c,x,t)=>{/**
967 * @author       Richard Davey <[email protected]>
968 * @copyright    2013-2025 Phaser Studio Inc.
969 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
970 */var o=t(30976),p=t(40987),a=function(n,r){return n===void 0&&(n=0),r===void 0&&(r=255),new p(o(n,r),o(n,r),o(n,r))};c.exports=a},80333:(c,x,t)=>{/**
971 * @author       Richard Davey <[email protected]>
972 * @copyright    2013-2025 Phaser Studio Inc.
973 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
974 */var o=t(70238),p=t(30100),a=t(68957),n=t(87388),r=function(e){var s=typeof e;switch(s){case"string":return e.substr(0,3).toLowerCase()==="rgb"?n(e):o(e);case"number":return p(e);case"object":return a(e)}};c.exports=r},3956:(c,x,t)=>{/**
975 * @author       Richard Davey <[email protected]>
976 * @copyright    2013-2025 Phaser Studio Inc.
977 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
978 */var o=t(40987);o.ColorSpectrum=t(92728),o.ColorToRGBA=t(91588),o.ComponentToHex=t(62957),o.GetColor=t(37589),o.GetColor32=t(1e3),o.HexStringToColor=t(70238),o.HSLToColor=t(62183),o.HSVColorWheel=t(27939),o.HSVToRGB=t(7537),o.HueToComponent=t(89528),o.IntegerToColor=t(30100),o.IntegerToRGB=t(90664),o.Interpolate=t(13699),o.ObjectToColor=t(68957),o.RandomRGB=t(85386),o.RGBStringToColor=t(87388),o.RGBToHSV=t(87837),o.RGBToString=t(75723),o.ValueToColor=t(80333),c.exports=o},27460:(c,x,t)=>{/**
979 * @author       Richard Davey <[email protected]>
980 * @copyright    2013-2025 Phaser Studio Inc.
981 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
982 */c.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:(c,x,t)=>{/**
983 * @author       Richard Davey <[email protected]>
984 * @copyright    2013-2025 Phaser Studio Inc.
985 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
986 */var o=t(83419),p=t(39429),a=new o({initialize:function(r,e,s,h,i,l){e||(e=r.sys.make.image({x:s,y:h,key:i,frame:l,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(n){this.bitmapMask=n},preRenderWebGL:function(n,r,e){n.pipelines.BITMAPMASK_PIPELINE.beginMask(this,r,e)},postRenderWebGL:function(n,r,e){n.pipelines.BITMAPMASK_PIPELINE.endMask(this,r,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});p.register("bitmapMask",function(n,r,e,s,h){return new a(this.scene,n,r,e,s,h)}),c.exports=a},80661:(c,x,t)=>{/**
987 * @author       Richard Davey <[email protected]>
988 * @copyright    2013-2025 Phaser Studio Inc.
989 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
990 */var o=t(83419),p=new o({initialize:function(n,r){this.geometryMask=r,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,n,r){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:r}),this.applyStencil(a,r,!0),a.maskCount++},applyStencil:function(a,n,r){var e=a.gl,s=this.geometryMask,h=a.maskCount,i=255;e.colorMask(!1,!1,!1,!1),r?(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,n),a.flush(),e.colorMask(!0,!0,
990!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 n=a.gl;a.maskStack.pop(),a.maskCount--,a.flush();var r=a.currentMask;if(a.maskStack.length===0)r.mask=null,n.disable(n.STENCIL_TEST);else{var e=a.maskStack[a.maskStack.length-1];e.mask.applyStencil(a,e.camera,!1),a.currentCameraMask.mask!==e.mask?(r.mask=e.mask,r.camera=e.camera):r.mask=null}},preRenderCanvas:function(a,n,r){var e=this.geometryMask;a.currentContext.save(),e.renderCanvas(a,e,r,null,null,!0),a.currentContext.clip()},postRenderCanvas:function(a){a.currentContext.restore()},destroy:function(){this.geometryMask=null}});c.exports=p},69781:(c,x,t)=>{/**
991 * @author       Richard Davey <[email protected]>
992 * @copyright    2013-2025 Phaser Studio Inc.
993 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
994 */c.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(c,x,t)=>{/**
995 * @author       Richard Davey <[email protected]>
996 * @copyright    2013-2025 Phaser Studio Inc.
997 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
998 */var o=t(83419),p=new o({initialize:function(n,r,e,s){(!r||r==="")&&(r=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {","    vec2 uv = fragCoord / resolution.xy;","    gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(`
999`)),(!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(`
1000`)),s===void 0&&(s=null),this.key=n,this.fragmentSrc=r,this.vertexSrc=e,this.uniforms=s}});c.exports=p},40366:c=>{/**
1001 * @author       Richard Davey <[email protected]>
1002 * @copyright    2013-2025 Phaser Studio Inc.
1003 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1004 */var x=function(t,o){var p;if(o)typeof o=="string"?p=document.getElementById(o):typeof o=="object"&&o.nodeType===1&&(p=o);else if(t.parentElement||o===null)return t;return p||(p=document.body),p.appendChild(t),t};c.exports=x},83719:(c,x,t)=>{/**
1005 * @author       Richard Davey <[email protected]>
1006 * @copyright    2013-2025 Phaser Studio Inc.
1007 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1008 */var o=t(40366),p=function(a){var n=a.config;if(!(!n.parent||!n.domCreateContainer)){var r=document.createElement("div");r.style.cssText=["display: block;","width: "+a.scale.width+"px;","height: "+a.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+n.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),a.domContainer=r,o(r,n.parent)}};c.exports=p},57264:(c,x,t)=>{/**
1009 * @author       Richard Davey <[email protected]>
1010 * @copyright    2013-2025 Phaser Studio Inc.
1011 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1012 */var o=t(25892),p=function(a){if(document.readyState==="complete"||document.readyState==="interactive"){a();return}var n=function(){document.removeEventListener("deviceready",n,!0),document.removeEventListener("DOMContentLoaded",n,!0),window.removeEventListener("load",n,!0),a()};document.body?o.cordova?document.addEventListener("deviceready",n,!1):(document.addEventListener("DOMContentLoaded",n,!0),window.addEventListener("load",n,!0)):window.setTimeout(n,20)};c.exports=p},57811:c=>{/**
1013 * @author       Richard Davey <[email protected]>
1014 * @copyright    2013-2025 Phaser Studio Inc.
1015 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1016 */var x=function(t){if(!t)return window.innerHeight;var o=Math.abs(window.orientation),p={w:0,h:0},a=document.createElement("div");return a.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(a),p.w=o===90?a.offsetHeight:window.innerWidth,p.h=o===90?window.innerWidth:a.offsetHeight,document.documentElement.removeChild(a),a=null,Math.abs(window.orientation)!==90?p.h:p.w};c.exports=x},45818:(c,x,t)=>{/**
1017 * @author       Richard Davey <[email protected]>
1018 * @copyright    2013-2025 Phaser Studio Inc.
1019 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1020 */var o=t(13560),p=function(a,n){var r=window.screen,e=r?r.orientation||r.mozOrientation||r.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?o.ORIENTATION.PORTRAIT:o.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return o.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return o.ORIENTATION.LANDSCAPE}else return n>a?o.ORIENTATION.PORTRAIT:o.ORIENTATION.LANDSCAPE};c.exports=p},74403:c=>{/**
1021 * @author       Richard Davey <[email protected]>
1022 * @copyright    2013-2025 Phaser Studio Inc.
1023 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1024 */var x=function(t){var o;return t!==""&&(typeof t=="string"?o=document.getElementById(t):t&&t.nodeType===1&&(o=t)),o||(o=document.body),o};c.exports=x},56836:c=>{/**
1025 * @author       Richard Davey <[email protected]>
1026 * @copyright    2013-2025 Phaser Studio Inc.
1027 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1028 */var x=function(t){var o="";try{if(window.DOMParser){var p=new DOMParser;o=p.parseFromString(t,"text/xml")}else o=new ActiveXObject("Microsoft.XMLDOM"),o.loadXML(t)}catch{o=null}return!o||!o.documentElement||o.getElementsByTagName("parsererror").length?null:o};c.exports=x},35846:c=>{/**
1029 * @author       Richard Davey <[email protected]>
1030 * @copyright    2013-2025 Phaser Studio Inc.
1031 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1032 */var x=function(t){t.parentNode&&t.parentNode.removeChild(t)};c.exports=x},43092:(c,x,t)=>{/**
1033 * @author       Richard Davey <[email protected]>
1034 * @copyright    2013-2025 Phaser Studio Inc.
1035 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1036 */var o=t(83419),p=t(29747),a=new o({initialize:function(){this.isRunning=!1,this.callback=p,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var r=this;this.step=function e(s){r.callback(s),r.isRunning&&(r.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){r.isRunning&&(r.timeOutID=window.setTimeout(e,r.delay)),r.callback(window.performance.now())}},start:function(n,r,e){this.isRunning||(this.callback=n,this.isSetTimeOut=r,this.delay=e,this.isRunning=!0,this.timeOutID=r?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=p}});c.exports=a},84902:(c,x,t)=>{/**
1037 * @author       Richard Davey <[email protected]>
1038 * @copyright    2013-2025 Phaser Studio Inc.
1039 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1040 */var o={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};c.exports=o},47565:(c,x,t)=>{/**
1041 * @author       Richard Davey <[email protected]>
1042 * @copyright    2013-2025 Phaser Studio Inc.
1043 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1044 */var o=t(83419),p=t(50792),a=t(37277),n=new o({Extends:p,initialize:function(){p.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});a.register("EventEmitter",n,"events"),c.exports=n},93055:(c,x,t)=>{/**
1045 * @author       Richard Davey <[email protected]>
1046 * @copyright    2013-2025 Phaser Studio Inc.
1047 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1048 */c.exports={EventEmitter:t(47565)}},20122:(c,x,t)=>{/**
1049 * @author       Richard Davey <[email protected]>
1050 * @copyright    2013-2025 Phaser Studio Inc.
1051 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1052 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s){s===void 0&&(s=1),p.call(this,a.BARREL,e),this.amount=s}});c.exports=n},32251:(c,x,t)=>{/**
1053 * @author       Richard Davey <[email protected]>
1054 * @copyright    2013-2025 Phaser Studio Inc.
1055 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1056 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l,u,d){h===void 0&&(h=1),i===void 0&&(i=1),l===void 0&&(l=1),u===void 0&&(u=1),d===void 0&&(d=4),p.call(this,a.BLOOM,e),this.steps=d,this.offsetX=h,this.offsetY=i,this.blurStrength=l,this.strength=u,this.glcolor=[1,1,1],s!=null&&(this.color=s)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});c.exports=n},9047:(c,x,t)=>{/**
1057 * @author       Richard Davey <[email protected]>
1058 * @copyright    2013-2025 Phaser Studio Inc.
1059 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1060 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l,u,d){s===void 0&&(s=0),h===void 0&&(h=2),i===void 0&&(i=2),l===void 0&&(l=1),d===void 0&&(d=4),p.call(this,a.BLUR,e),this.quality=s,this.x=h,this.y=i,this.steps=d,this.strength=l,this.glcolor=[1,1,1],u!=null&&(this.color=u)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});c.exports=n},27885:(c,x,t)=>{/**
1061 * @author       Richard Davey <[email protected]>
1062 * @copyright    2013-2025 Phaser Studio Inc.
1063 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1064 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l,u,d,f){s===void 0&&(s=.5),h===void 0&&(h=1),i===void 0&&(i=.2),l===void 0&&(l=!1),u===void 0&&(u=1),d===void 0&&(d=1),f===void 0&&(f=1),p.call(this,a.BOKEH,e),this.radius=s,this.amount=h,this.contrast=i,this.isTiltShift=l,this.strength=f,this.blurX=u,this.blurY=d}});c.exports=n},12578:(c,x,t)=>{/**
1065 * @author       Richard Davey <[email protected]>
1066 * @copyright    2013-2025 Phaser Studio Inc.
1067 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1068 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l,u){s===void 0&&(s=8),l===void 0&&(l=1),u===void 0&&(u=.005),p.call(this,a.CIRCLE,e),this.scale=l,this.feather=u,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 r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}},backgroundColor:{get:function(){var r=this.glcolor2;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor2;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(r){this.glcolor2[3]=r}}});c.exports=n},15802:(c,x,t)=>{/**
1069 * @author       Richard Davey <[email protected]>
1070 * @copyright    2013-2025 Phaser Studio Inc.
1071 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1072 */var o=t(83419),p=t(89422),a=t(14811),n=new o({Extends:p,initialize:function(e){p.call(this),this.type=a.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});c.exports=n},72898:(c,x,t)=>{/**
1073 * @author       Richard Davey <[email protected]>
1074 * @copyright    2013-2025 Phaser Studio Inc.
1075 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1076 */var o=t(83419),p=new o({initialize:function(n,r){this.type=n,this.gameObject=r,this.active=!0},setActive:function(a){return this.active=a,this},destroy:function(){this.gameObject=null,this.active=!1}});c.exports=p},44553:(c,x,t)=>{/**
1077 * @author       Richard Davey <[email protected]>
1078 * @copyright    2013-2025 Phaser Studio Inc.
1079 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1080 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i){s===void 0&&(s="__WHITE"),h===void 0&&(h=.005),i===void 0&&(i=.005),p.call(this,a.DISPLACEMENT,e),this.x=h,this.y=i,this.glTexture,this.setTexture(s)},setTexture:function(r){var e=this.gameObject.scene.sys.textures.getFrame(r);return e&&(this.glTexture=e.glTexture),this}});c.exports=n},68531:(c,x,t)=>{/**
1081 * @author       Richard Davey <[email protected]>
1082 * @copyright    2013-2025 Phaser Studio Inc.
1083 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1084 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l){h===void 0&&(h=4),i===void 0&&(i=0),l===void 0&&(l=!1),p.call(this,a.GLOW,e),this.outerStrength=h,this.innerStrength=i,this.knockout=l,this.glcolor=[1,1,1,1],s!==void 0&&(this.color=s)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});c.exports=n},37102:(c,x,t)=>{/**
1085 * @author       Richard Davey <[email protected]>
1086 * @copyright    2013-2025 Phaser Studio Inc.
1087 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1088 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l,u,d,f,v){i===void 0&&(i=.2),l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=1),v===void 0&&(v=0),p.call(this,a.GRADIENT,e),this.alpha=i,this.size=v,this.fromX=l,this.fromY=u,this.toX=d,this.toY=f,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],s!=null&&(this.color1=s),h!=null&&(this.color2=h)},color1:{get:function(){var r=this.glcolor1;return(r[0]<<16)+(r[1]<<8)+(r[2]|0)},set:function(r){var e=this.glcolor1;e[0]=r>>16&255,e[1]=r>>8&255,e[2]=r&255}},color2:{get:function(){var r=this.glcolor2;return(r[0]<<16)+(r[1]<<8)+(r[2]|0)},set:function(r){var e=this.glcolor2;e[0]=r>>16&255,e[1]=r>>8&255,e[2]=r&255}}});c.exports=n},86886:(c,x,t)=>{/**
1089 * @author       Richard Davey <[email protected]>
1090 * @copyright    2013-2025 Phaser Studio Inc.
1091 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1092 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s){s===void 0&&(s=1),p.call(this,a.PIXELATE,e),this.amount=s}});c.exports=n},92322:(c,x,t)=>{/**
1093 * @author       Richard Davey <[email protected]>
1094 * @copyright    2013-2025 Phaser Studio Inc.
1095 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1096 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l,u,d,f){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=.1),l===void 0&&(l=1),d===void 0&&(d=6),f===void 0&&(f=1),p.call(this,a.SHADOW,e),this.x=s,this.y=h,this.decay=i,this.power=l,this.glcolor=[0,0,0,1],this.samples=d,this.intensity=f,u!==void 0&&(this.color=u)}
1096,color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});c.exports=n},39563:(c,x,t)=>{/**
1097 * @author       Richard Davey <[email protected]>
1098 * @copyright    2013-2025 Phaser Studio Inc.
1099 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1100 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l){s===void 0&&(s=.5),h===void 0&&(h=.5),i===void 0&&(i=3),l===void 0&&(l=!1),p.call(this,a.SHINE,e),this.speed=s,this.lineWidth=h,this.gradient=i,this.reveal=l}});c.exports=n},56448:(c,x,t)=>{/**
1101 * @author       Richard Davey <[email protected]>
1102 * @copyright    2013-2025 Phaser Studio Inc.
1103 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1104 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l){s===void 0&&(s=.5),h===void 0&&(h=.5),i===void 0&&(i=.5),l===void 0&&(l=.5),p.call(this,a.VIGNETTE,e),this.x=s,this.y=h,this.radius=i,this.strength=l}});c.exports=n},38433:(c,x,t)=>{/**
1105 * @author       Richard Davey <[email protected]>
1106 * @copyright    2013-2025 Phaser Studio Inc.
1107 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1108 */var o=t(83419),p=t(72898),a=t(14811),n=new o({Extends:p,initialize:function(e,s,h,i,l){s===void 0&&(s=.1),h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=!1),p.call(this,a.WIPE,e),this.progress=0,this.wipeWidth=s,this.direction=h,this.axis=i,this.reveal=l}});c.exports=n},14811:c=>{/**
1109 * @author       Richard Davey <[email protected]>
1110 * @copyright    2013-2025 Phaser Studio Inc.
1111 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1112 */var x={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};c.exports=x},66064:(c,x,t)=>{/**
1113 * @author       Richard Davey <[email protected]>
1114 * @copyright    2013-2025 Phaser Studio Inc.
1115 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1116 */var o=t(79291),p=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=o(!1,a,p),c.exports=a},25305:(c,x,t)=>{/**
1117 * @author       Richard Davey <[email protected]>
1118 * @copyright    2013-2025 Phaser Studio Inc.
1119 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1120 */var o=t(10312),p=t(23568),a=function(n,r,e){r.x=p(e,"x",0),r.y=p(e,"y",0),r.depth=p(e,"depth",0),r.flipX=p(e,"flipX",!1),r.flipY=p(e,"flipY",!1);var s=p(e,"scale",null);typeof s=="number"?r.setScale(s):s!==null&&(r.scaleX=p(s,"x",1),r.scaleY=p(s,"y",1));var h=p(e,"scrollFactor",null);typeof h=="number"?r.setScrollFactor(h):h!==null&&(r.scrollFactorX=p(h,"x",1),r.scrollFactorY=p(h,"y",1)),r.rotation=p(e,"rotation",0);var i=p(e,"angle",null);i!==null&&(r.angle=i),r.alpha=p(e,"alpha",1);var l=p(e,"origin",null);if(typeof l=="number")r.setOrigin(l);else if(l!==null){var u=p(l,"x",.5),d=p(l,"y",.5);r.setOrigin(u,d)}r.blendMode=p(e,"blendMode",o.NORMAL),r.visible=p(e,"visible",!0);var f=p(e,"add",!0);return f&&n.sys.displayList.add(r),r.preUpdate&&n.sys.updateList.add(r),r};c.exports=a},13059:(c,x,t)=>{/**
1121 * @author       Richard Davey <[email protected]>
1122 * @copyright    2013-2025 Phaser Studio Inc.
1123 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1124 */var o=t(23568),p=function(a,n){var r=o(n,"anims",null);if(r===null)return a;
vendor: 4,477 bytes, lines 1124-1132
1124if(typeof r=="string")a.anims.play(r);else if(typeof r=="object"){var e=a.anims,s=o(r,"key",void 0);if(s){var h=o(r,"startFrame",void 0),i=o(r,"delay",0),l=o(r,"repeat",0),u=o(r,"repeatDelay",0),d=o(r,"yoyo",!1),f=o(r,"play",!1),v=o(r,"delayedPlay",0),m={key:s,delay:i,repeat:l,repeatDelay:u,yoyo:d,startFrame:h};f?e.play(m):v>0?e.playAfterDelay(m,v):e.load(m)}}return a};c.exports=p},8050:(c,x,t)=>{/**
1125 * @author       Richard Davey <[email protected]>
1126 * @copyright    2013-2025 Phaser Studio Inc.
1127 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1128 */var o=t(83419),p=t(73162),a=t(37277),n=t(51708),r=t(44594),e=t(19186),s=new o({Extends:p,initialize:function(i){p.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(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.events.once(r.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(n.ADDED_TO_SCENE,h,this.scene),this.events.emit(r.ADDED_TO_SCENE,h,this.scene))},removeChildCallback:function(h){this.queueDepthSort(),h.displayList=null,h.emit(n.REMOVED_FROM_SCENE,h,this.scene),this.events.emit(r.REMOVED_FROM_SCENE,h,this.scene)},start:function(){this.events.once(r.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,i=h.length;i--;)h[i]&&h[i].destroy(!0);h.length=0,this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});a.register("DisplayList",s,"displayList"),c.exports=s},95643:(c,x,t)=>{/**
1129 * @author       Richard Davey <[email protected]>
1130 * @copyright    2013-2025 Phaser Studio Inc.
1131 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1132 */var o=t(83419),p=t(53774),a=t(45893),n=t(50792),r=t(51708),e=t(44594),s=new o({Extends:n,initialize:function(i,l){n.call(this),this.scene=i,this.displayList=null,this.type=l,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(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.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,l){return this.scene.sys.input.enable(this,h,i,l),this},disableInteractive:function(h){return h===void 0&&(h=!1),this.scene.sys.input.disable(this,h),this},removeInteractive:function(h){return h===void 0&&(h=!1),this.scene.sys.input.clear(this),h&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return p(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,l=[];i&&(l.unshift(i.getIndex(h)),h=i,i.parentContainer);)i=i.parentContainer;return this.displayList?l.unshift(this.displayList.getIndex(h)):l.unshift(this.scene.sys.displayList.getIndex(h)),l},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
1132(r.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(r.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},getDisplayList:function(){var h=null;return this.parentContainer?h=this.parentContainer.list:this.displayList&&(h=this.displayList.list),h},destroy:function(h){!this.scene||this.ignoreDestroy||(h===void 0&&(h=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(r.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,c.exports=s},44603:(c,x,t)=>{/**
1133 * @author       Richard Davey <[email protected]>
1134 * @copyright    2013-2025 Phaser Studio Inc.
1135 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1136 */var o=t(83419),p=t(37277),a=t(44594),n=new o({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}});n.register=function(r,e){n.prototype.hasOwnProperty(r)||(n.prototype[r]=e)},n.remove=function(r){n.prototype.hasOwnProperty(r)&&delete n.prototype[r]},p.register("GameObjectCreator",n,"make"),c.exports=n},39429:(c,x,t)=>{/**
1137 * @author       Richard Davey <[email protected]>
1138 * @copyright    2013-2025 Phaser Studio Inc.
1139 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1140 */var o=t(83419),p=t(37277),a=t(44594),n=new o({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(r){return(r.renderCanvas||r.renderWebGL)&&this.displayList.add(r),r.preUpdate&&this.updateList.add(r),r},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}});n.register=function(r,e){n.prototype.hasOwnProperty(r)||(n.prototype[r]=e)},n.remove=function(r){n.prototype.hasOwnProperty(r)&&delete n.prototype[r]},p.register("GameObjectFactory",n,"add"),c.exports=n},91296:(c,x,t)=>{/**
1141 * @author       Richard Davey <[email protected]>
1142 * @copyright    2013-2025 Phaser Studio Inc.
1143 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1144 */var o=t(61340),p=new o,a=new o,n=new o,r={camera:p,sprite:a,calc:n},e=function(s,h,i){var l=p,u=a,d=n;return u.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),l.copyFrom(h.matrix),i?(l.multiplyWithOffset(i,-h.scrollX*s.scrollFactorX,-h.scrollY*s.scrollFactorY),u.e=s.x,u.f=s.y):(u.e-=h.scrollX*s.scrollFactorX,u.f-=h.scrollY*s.scrollFactorY),l.multiply(u,d),r};c.exports=e},45027:(c,x,t)=>{/**
1145 * @author       Richard Davey <[email protected]>
1146 * @copyright    2013-2025 Phaser Studio Inc.
1147 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1148 */var o=t(83419),p=t(25774),a=t(37277),n=t(44594),r=new o({Extends:p,initialize:function(s){p.call(this),this.checkQueue=!0,this.scene=s,this.systems=s.sys,s.sys.events.once(n.BOOT,this.boot,this),s.sys.events.on(n.START,this.start,this)},boot:function(){this.systems.events.once(n.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(n.PRE_UPDATE,this.update,this),e.on(n.UPDATE,this.sceneUpdate,this),e.once(n.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,s){for(var h=this._active,i=h.length,l=0;l<i;l++){var u=h[l];u.active&&u.preUpdate.call(u,e,s)}},shutdown:function(){for(var e=this._active.length;e--;)this._active[e].destroy(!0);
1148for(e=this._pending.length;e--;)this._pending[e].destroy(!0);for(e=this._destroy.length;e--;)this._destroy[e].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var s=this.systems.events;s.off(n.PRE_UPDATE,this.update,this),s.off(n.UPDATE,this.sceneUpdate,this),s.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(n.START,this.start,this),this.scene=null,this.systems=null}});a.register("UpdateList",r,"updateList"),c.exports=r},3217:c=>{/**
1149 * @author       Richard Davey <[email protected]>
1150 * @copyright    2013-2025 Phaser Studio Inc.
1151 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1152 */var x=function(t,o,p,a,n,r,e,s,h,i,l,u,d,f,v){var m=p.x-o.displayOriginX+n,y=p.y-o.displayOriginY+r,g=m+p.w,T=y+p.h,S=e.a,E=e.b,M=e.c,F=e.d,A=e.e,P=e.f,L=m*S+y*M+A,O=m*E+y*F+P,G=m*S+T*M+A,z=m*E+T*F+P,Y=g*S+T*M+A,X=g*E+T*F+P,I=g*S+y*M+A,U=g*E+y*F+P;s&&(L=Math.round(L),O=Math.round(O),G=Math.round(G),z=Math.round(z),Y=Math.round(Y),X=Math.round(X),I=Math.round(I),U=Math.round(U)),t.batchQuad(o,L,O,G,z,Y,X,I,U,a.u0,a.v0,a.u1,a.v1,h,i,l,u,d,f,v)};c.exports=x},53048:c=>{/**
1153 * @author       Richard Davey <[email protected]>
1154 * @copyright    2013-2025 Phaser Studio Inc.
1155 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1156 */var x=function(t,o,p,a){if(p===void 0&&(p=!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 n=t.text,r=n.length,e=t.maxWidth,s=t.wordWrapCharCode,h=Number.MAX_VALUE,i=Number.MAX_VALUE,l=0,u=0,d=t.fontData.chars,f=t.fontData.lineHeight,v=t.letterSpacing,m=t.lineSpacing,y=0,g=0,T=0,S=null,E=t._align,M=0,F=0,A=t.fontSize/t.fontData.size,P=A*t.scaleX,L=A*t.scaleY,O=null,G=0,z=[],Y=Number.MAX_VALUE,X=0,I=0,U=0,D,V,B,W=[],K=[],J=null,Z=function(Rt,Bt){for(var Ct=0,wt=0;wt<Rt.length;wt++){var Lt=Rt.charCodeAt(wt),Ut=Bt.chars[Lt];Ut&&(Ct+=Ut.xAdvance)}return Ct*P};if(e>0){B=n.split(`
1157`);var j=[];for(D=0;D<B.length;D++){var k=B[D],_="",q="",et="",nt="";for(V=0;V<k.length;V++)if(T=k.charCodeAt(V),_+=k[V],T===s||V===k.length-1){nt=et+_;var tt=Z(nt,t.fontData);tt<=e?et=nt:(q=q.slice(0,-1),q+=(q?`
1158`:"")+et,et=_),_=""}q=q.slice(0,-1),q+=(q?`
1159`:"")+et,j.push(q)}n=j.join(`
1160`),a.wrappedText=n,r=n.length}var ot=0;for(D=0;D<r;D++){if(T=n.charCodeAt(D),T===10){J!==null&&(W.push({word:J.word,i:J.i,x:J.x*P,y:J.y*L,w:J.w*P,h:J.h*L}),J=null),O=null,z[I]=U,U>X&&(X=U),U<Y&&(Y=U),I++,U=0,y=0,g=(f+m)*I;continue}if(S=d[T],!!S){if(M=y,F=g,O!==null){var ht=S.kerning[G];M+=ht!==void 0?ht:0}h>M&&(h=M),i>F&&(i=F);var lt=M+S.xAdvance,it=F+f;l<lt&&(l=lt),u<it&&(u=it);var rt=S.xOffset+S.xAdvance+(ht!==void 0?ht:0);T===s?J!==null&&(W.push({word:J.word,i:J.i,x:J.x*P,y:J.y*L,w:J.w*P,h:J.h*L}),J=null):(J===null&&(J={word:"",i:ot,x:y,y:g,w:0,h:f}),J.word=J.word.concat(n[D]),J.w+=rt),K.push({i:ot,idx:D,char:n[D],code:T,x:(S.xOffset+M)*A,y:(S.yOffset+g)*A,w:S.width*A,h:S.height*A,t:g*A,r:lt*A,b:f*A,line:I,glyph:S}),y+=S.xAdvance+v+(ht!==void 0?ht:0),O=S,G=T,U=lt*A,ot++}}if(J!==null&&W.push({word:J.word,i:J.i,x:J.x*P,y:J.y*L,w:J.w*P,h:J.h*L}),z[I]=U,U>X&&(X=U),U<Y&&(Y=U),E>0)for(var at=0;at<K.length;at++){var ct=K[at];if(E===1){var Tt=(X-z[ct.line])/2;ct.x+=Tt,ct.r+=Tt}else if(E===2){var Mt=X-z[ct.line];ct.x+=Mt,ct.r+=Mt}}var mt=a.local,gt=a.global;return B=a.lines,mt.x=h*A,mt.y=i*A,mt.width=l*A,mt.height=u*A,gt.x=t.x-t._displayOriginX+h*P,gt.y=t.y-t._displayOriginY+i*L,gt.width=l*P,gt.height=u*L,B.shortest=Y,B.longest=X,B.lengths=z,o&&(mt.x=Math.ceil(mt.x),mt.y=Math.ceil(mt.y),mt.width=Math.ceil(mt.width),mt.height=Math.ceil(mt.height),gt.x=Math.ceil(gt.x),gt.y=Math.ceil(gt.y),gt.width=Math.ceil(gt.width),gt.height=Math.ceil(gt.height),B.shortest=Math.ceil(Y),B.longest=Math.ceil(X)),p&&(t._displayOriginX=t.originX*mt.width,t._displayOriginY=t.originY*mt.height,gt.x=t.x-t._displayOriginX*t.scaleX,gt.y=t.y-t._displayOriginY*t.scaleY,o&&(gt.x=Math.ceil(gt.x),gt.y=Math.ceil(gt.y))),a.words=W,a.characters=K,a.lines.height=f,a.scale=A,a.scaleX=t.scaleX,a.scaleY=t.
1160scaleY,a};c.exports=x},61327:(c,x,t)=>{/**
1161 * @author       Richard Davey <[email protected]>
1162 * @copyright    2013-2025 Phaser Studio Inc.
1163 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1164 */var o=t(21859),p=function(a,n,r,e,s,h,i){var l=a.sys.textures.get(r),u=l.get(e),d=a.sys.cache.xml.get(s);if(u&&d){var f=o(d,u,h,i,l);return a.sys.cache.bitmapFont.add(n,{data:f,texture:r,frame:e,fromAtlas:!0}),!0}else return!1};c.exports=p},6925:(c,x,t)=>{/**
1165 * @author       Richard Davey <[email protected]>
1166 * @copyright    2013-2025 Phaser Studio Inc.
1167 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1168 */var o=t(35154),p=function(a,n){var r=n.width,e=n.height,s=Math.floor(r/2),h=Math.floor(e/2),i=o(n,"chars","");if(i!==""){var l=o(n,"image",""),u=a.sys.textures.getFrame(l),d=u.cutX,f=u.cutY,v=u.source.width,m=u.source.height,y=o(n,"offset.x",0),g=o(n,"offset.y",0),T=o(n,"spacing.x",0),S=o(n,"spacing.y",0),E=o(n,"lineSpacing",0),M=o(n,"charsPerRow",null);M===null&&(M=v/r,M>i.length&&(M=i.length));for(var F=y,A=g,P={retroFont:!0,font:l,size:r,lineHeight:e+E,chars:{}},L=0,O=0;O<i.length;O++){var G=i.charCodeAt(O),z=(d+F)/v,Y=(f+A)/m,X=(d+F+r)/v,I=(f+A+e)/m;P.chars[G]={x:F,y:A,width:r,height:e,centerX:s,centerY:h,xOffset:0,yOffset:0,xAdvance:r,data:{},kerning:{},u0:z,v0:Y,u1:X,v1:I},L++,L===M?(L=0,F=y,A+=e+S):F+=r+T}var U={data:P,frame:null,texture:l};return U}};c.exports=p},21859:c=>{/**
1169 * @author       Richard Davey <[email protected]>
1170 * @copyright    2013-2025 Phaser Studio Inc.
1171 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1172 */function x(o,p){return parseInt(o.getAttribute(p),10)}var t=function(o,p,a,n,r){a===void 0&&(a=0),n===void 0&&(n=0);var e=p.cutX,s=p.cutY,h=p.source.width,i=p.source.height,l=p.sourceIndex,u={},d=o.getElementsByTagName("info")[0],f=o.getElementsByTagName("common")[0];u.font=d.getAttribute("face"),u.size=x(d,"size"),u.lineHeight=x(f,"lineHeight")+n,u.chars={};var v=o.getElementsByTagName("char"),m=p!==void 0&&p.trimmed;if(m)var y=p.height,g=p.width;for(var T=0;T<v.length;T++){var S=v[T],E=x(S,"id"),M=String.fromCharCode(E),F=x(S,"x"),A=x(S,"y"),P=x(S,"width"),L=x(S,"height");m&&(F<g&&(g=F),A<y&&(y=A)),m&&y!==0&&g!==0&&(F-=p.x,A-=p.y);var O=(e+F)/h,G=(s+A)/i,z=(e+F+P)/h,Y=(s+A+L)/i;if(u.chars[E]={x:F,y:A,width:P,height:L,centerX:Math.floor(P/2),centerY:Math.floor(L/2),xOffset:x(S,"xoffset"),yOffset:x(S,"yoffset"),xAdvance:x(S,"xadvance")+a,data:{},kerning:{},u0:O,v0:G,u1:z,v1:Y},r&&P!==0&&L!==0){var X=r.add(M,l,F,A,P,L);X&&X.setUVs(P,L,O,G,z,Y)}}var I=o.getElementsByTagName("kerning");for(T=0;T<I.length;T++){var U=I[T],D=x(U,"first"),V=x(U,"second"),B=x(U,"amount");u.chars[V].kerning[D]=B}return u};c.exports=t},196:(c,x,t)=>{/**
1173 * @author       Richard Davey <[email protected]>
1174 * @copyright    2013-2025 Phaser Studio Inc.
1175 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1176 */var o=t(87662),p=t(79291),a={Parse:t(6925)};a=p(!1,a,o),c.exports=a},87662:c=>{/**
1177 * @author       Richard Davey <[email protected]>
1178 * @copyright    2013-2025 Phaser Studio Inc.
1179 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1180 */var x={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`};c.exports=x},2638:(c,x,t)=>{/**
1181 * @author       Richard Davey <[email protected]>
1182 * @copyright    2013-2025 Phaser Studio Inc.
1183 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1184 */var o=t(22186),p=t(83419),a=t(12310),n=new p({Extends:o,Mixins:[a],initialize:function(e,s,h,i,l,u,d){o.call(this,e,s,h,i,l,u,d),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(r,e){return this.cropWidth=r,this.cropHeight=e,this},setDisplayCallback:function(r){return this.displayCallback=r,this},setScrollX:function(r){return this.scrollX=r,this},setScrollY:function(r){return this.scrollY=r,this}});c.exports=n},86741:(c,x,t)=>{/**
1185 * @author       Richard Davey <[email protected]>
1186 * @copyright    2013-2025 Phaser Studio Inc.
1187 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1188 */var o=t(20926),p=function(a,n,r,e){var s=n._text,h=s.length,i=a.currentContext;if(!(h===0||!o(a,i,n,r,e))){r.addToRenderList(n);var l=n.fromAtlas?n.frame:n.texture.frames.__BASE,u=n.displayCallback,d=n.callbackData,f=n.fontData.chars,v=n.fontData.lineHeight,m=n._letterSpacing,y=0,g=0,T=0,S=null,E=0,M=0,F=0,A=0,P=0,L=0,O=null,G=0,z=n.frame.source.image,Y=l.cutX,X=l.cutY,I=0,U=0,D=n._fontSize/n.fontData.size,V=n._align,B=0,W=0;n.getTextBounds(!1);var K=n._bounds.lines;V===1?W=(K.longest-K.lengths[0])/2:V===2&&(W=K.longest-K.lengths[0]),i.translate(-n.displayOriginX,-n.displayOriginY);var J=r.roundPixels;n.cropWidth>0&&n.cropHeight>0&&(i.beginPath(),i.rect(0,0,n.cropWidth,n.cropHeight),i.clip());for(var Z=0;Z<h;Z++){if(U=D,I=0,T=s.charCodeAt(Z),T===10){B++,V===1?W=(K.longest-K.lengths[B])/2:V===2&&(W=K.longest-K.lengths[B]),y=0,g+=v,O=null;continue}if(S=f[T],!!S){if(E=Y+S.x,M=X+S.y,F=S.width,A=S.height,P=S.xOffset+y-n.scrollX,L=S.yOffset+g-n.scrollY,O!==null){var j=S.kerning[G];P+=j!==void 0?j:0}if(u){d.index=Z,d.charCode=T,d.x=P,d.y=L,d.scale=U,d.rotation=I,d.data=S.data;var k=u(d);P=k.x,L=k.y,U=k.scale,I=k.rotation}
1188P*=U,L*=U,P+=W,y+=S.xAdvance+m+(j!==void 0?j:0),O=S,G=T,!(F===0||A===0||T===32)&&(J&&(P=Math.round(P),L=Math.round(L)),i.save(),i.translate(P,L),i.rotate(I),i.scale(U,U),i.drawImage(z,E,M,F,A,0,0,F,A),i.restore())}}i.restore()}};c.exports=p},11164:(c,x,t)=>{/**
1189 * @author       Richard Davey <[email protected]>
1190 * @copyright    2013-2025 Phaser Studio Inc.
1191 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1192 */var o=t(2638),p=t(25305),a=t(44603),n=t(23568);a.register("dynamicBitmapText",function(r,e){r===void 0&&(r={});var s=n(r,"font",""),h=n(r,"text",""),i=n(r,"size",!1),l=new o(this.scene,0,0,s,h,i);return e!==void 0&&(r.add=e),p(this.scene,l,r),l})},72566:(c,x,t)=>{/**
1193 * @author       Richard Davey <[email protected]>
1194 * @copyright    2013-2025 Phaser Studio Inc.
1195 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1196 */var o=t(2638),p=t(39429);p.register("dynamicBitmapText",function(a,n,r,e,s){return this.displayList.add(new o(this.scene,a,n,r,e,s))})},12310:(c,x,t)=>{/**
1197 * @author       Richard Davey <[email protected]>
1198 * @copyright    2013-2025 Phaser Studio Inc.
1199 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1200 */var o=t(29747),p=o,a=o;p=t(73482),a=t(86741),c.exports={renderWebGL:p,renderCanvas:a}},73482:(c,x,t)=>{/**
1201 * @author       Richard Davey <[email protected]>
1202 * @copyright    2013-2025 Phaser Studio Inc.
1203 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1204 */var o=t(91296),p=t(61340),a=t(70554),n=new p,r=function(e,s,h,i){var l=s.text,u=l.length;if(u!==0){h.addToRenderList(s);var d=e.pipelines.set(s.pipeline,s),f=o(s,h,i);e.pipelines.preBatch(s);var v=f.sprite,m=f.calc,y=n,g=s.cropWidth>0||s.cropHeight>0;g&&(d.flush(),e.pushScissor(m.tx,m.ty,s.cropWidth*m.scaleX,s.cropHeight*m.scaleY));var T=s.frame,S=T.glTexture,E=s.tintFill,M=a.getTintAppendFloatAlpha(s.tintTopLeft,h.alpha*s._alphaTL),F=a.getTintAppendFloatAlpha(s.tintTopRight,h.alpha*s._alphaTR),A=a.getTintAppendFloatAlpha(s.tintBottomLeft,h.alpha*s._alphaBL),P=a.getTintAppendFloatAlpha(s.tintBottomRight,h.alpha*s._alphaBR),L=d.setGameObject(s),O=0,G=0,z=0,Y=0,X=s.letterSpacing,I,U=0,D=0,V,B=s.scrollX,W=s.scrollY,K=s.fontData,J=K.chars,Z=K.lineHeight,j=s.fontSize/K.size,k=0,_=s._align,q=0,et=0,nt=s.getTextBounds(!1);s.maxWidth>0&&(l=nt.wrappedText,u=l.length);var tt=s._bounds.lines;_===1?et=(tt.longest-tt.lengths[0])/2:_===2&&(et=tt.longest-tt.lengths[0]);for(var ot=h.roundPixels,ht=s.displayCallback,lt=s.callbackData,it=0;it<u;it++){if(z=l.charCodeAt(it),z===10){q++,_===1?et=(tt.longest-tt.lengths[q])/2:_===2&&(et=tt.longest-tt.lengths[q]),O=0,G+=Z,V=null;continue}if(I=J[z],!!I){U=I.width,D=I.height;var rt=I.xOffset+O-B,at=I.yOffset+G-W;if(V!==null){var ct=I.kerning[Y]||0;rt+=ct,O+=ct}if(O+=I.xAdvance+X,V=I,Y=z,!(U===0||D===0||z===32)){if(j=s.fontSize/s.fontData.size,k=0,ht){lt.color=0,lt.tint.topLeft=M,lt.tint.topRight=F,lt.tint.bottomLeft=A,lt.tint.bottomRight=P,lt.index=it,lt.charCode=z,lt.x=rt,lt.y=at,lt.scale=j,lt.rotation=k,lt.data=I.data;var Tt=ht(lt);rt=Tt.x,at=Tt.y,j=Tt.scale,k=Tt.rotation,Tt.color?(M=Tt.color,F=Tt.color,A=Tt.color,P=Tt.color):(M=Tt.tint.topLeft,F=Tt.tint.topRight,A=Tt.tint.bottomLeft,P=Tt.tint.bottomRight),M=a.getTintAppendFloatAlpha(M,h.alpha*s._alphaTL),F=a.getTintAppendFloatAlpha(F,h.alpha*s._alphaTR),A=a.getTintAppendFloatAlpha(A,h.alpha*s._alphaBL),P=a.getTintAppendFloatAlpha(P,h.alpha*s._alphaBR)}rt*=j,at*=j,rt-=s.displayOriginX,at-=s.displayOriginY,rt+=et,y.applyITRS(rt,at,k,j,j),m.multiply(y,v);var Mt=I.u0,mt=I.v0,gt=I.u1,Rt=I.v1,Bt=U,Ct=D,wt=v.e,Lt=v.f,Ut=Ct*v.c+v.e,ge=Ct*v.d+v.f,xe=Bt*v.a+Ct*v.c+v.e,ye=Bt*v.b+Ct*v.d+v.f,Te=Bt*v.a+v.e,Se=Bt*v.b+v.f;ot&&(wt=Math.round(wt),Lt=Math.round(Lt),Ut=Math.round(Ut),ge=Math.round(ge),xe=Math.round(xe),ye=Math.round(ye),Te=Math.round(Te),Se=Math.round(Se)),d.shouldFlush(6)&&(d.flush(),L=d.setGameObject(s)),d.batchQuad(s,wt,Lt,Ut,ge,xe,ye,Te,Se,Mt,mt,gt,Rt,M,F,A,P,E,S,L)}}}g&&(d.flush(),e.popScissor()),e.pipelines.postBatch(s)}};c.exports=r},22186:(c,x,t)=>{/**
1205 * @author       Richard Davey <[email protected]>
1206 * @copyright    2013-2025 Phaser Studio Inc.
1207 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1208 */var o=t(83419),p=t(45319),a=t(31401),n=t(95643),r=t(53048),e=t(61327),s=t(21859),h=t(87841),i=t(18658),l=new o({Extends:n,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(d,f,v,m,y,g,T){y===void 0&&(y=""),T===void 0&&(T=0),n.call(this,d,"BitmapText"),this.font=m;var S=this.scene.sys.cache.bitmapFont.get(m);
1208if(!S)throw new Error("Invalid BitmapText key: "+m);this.fontData=S.data,this._text="",this._fontSize=g||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=T,this._bounds=r(),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=S.fromAtlas,this.setTexture(S.texture,S.frame),this.setPosition(f,v),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(y)},setLeftAlign:function(){return this._align=l.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=l.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=l.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(u){return this._fontSize=u,this._dirty=!0,this},setLetterSpacing:function(u){return u===void 0&&(u=0),this._letterSpacing=u,this._dirty=!0,this},setLineSpacing:function(u){return u===void 0&&(u=0),this.lineSpacing=u,this},setText:function(u){return!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
1209`)),u!==this.text&&(this._text=u.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(u,d,f,v){return u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=0),v===void 0&&(v=.5),this.dropShadowX=u,this.dropShadowY=d,this.dropShadowColor=f,this.dropShadowAlpha=v,this},setCharacterTint:function(u,d,f,v,m,y,g){u===void 0&&(u=0),d===void 0&&(d=1),f===void 0&&(f=!1),v===void 0&&(v=-1),m===void 0&&(m=v,y=v,g=v);var T=this.text.length;d===-1&&(d=T),u<0&&(u=T+u),u=p(u,0,T-1);for(var S=p(u+d,u,T),E=this.charColors,M=u;M<S;M++){var F=E[M];if(v===-1)E[M]=null;else{var A=f?1:0;F?(F.tintEffect=A,F.tintTL=v,F.tintTR=m,F.tintBL=y,F.tintBR=g):E[M]={tintEffect:A,tintTL:v,tintTR:m,tintBL:y,tintBR:g}}}return this},setWordTint:function(u,d,f,v,m,y,g){d===void 0&&(d=1);for(var T=this.getTextBounds(),S=T.words,E=typeof u=="number",M=0,F=0;F<S.length;F++){var A=S[F];
1209if((E&&F===u||!E&&A.word===u)&&(this.setCharacterTint(A.i,A.word.length,f,v,m,y,g),M++,M===d))return this}return this},getTextBounds:function(u){var d=this._bounds;return(this._dirty||u||this.scaleX!==d.scaleX||this.scaleY!==d.scaleY)&&(r(this,u,!0,d),this._dirty=!1),d},getCharacterAt:function(u,d,f){for(var v=this.getLocalPoint(u,d,null,f),m=this.getTextBounds(),y=m.characters,g=new h,T=0;T<y.length;T++){var S=y[T];if(g.setTo(S.x,S.t,S.r-S.x,S.b),g.contains(v.x,v.y))return S}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(u,d,f){d===void 0&&(d=this._fontSize),f===void 0&&(f=this._align);var v=this.scene.sys.cache.bitmapFont.get(u);return v&&(this.font=u,this.fontData=v.data,this._fontSize=d,this._align=f,this.fromAtlas=v.fromAtlas===!0,this.setTexture(v.texture,v.frame),r(this,!1,!0,this._bounds)),this},setMaxWidth:function(u,d){return this._maxWidth=u,this._dirty=!0,d!==void 0&&(this.wordWrapCharCode=d),this},setDisplaySize:function(u,d){this.setScale(1,1),this.getTextBounds(!1);var f=u/this.width,v=d/this.height;return this.setScale(f,v),this},align:{set:function(u){this._align=u,this._dirty=!0},get:function(){return this._align}},text:{set:function(u){this.setText(u)},get:function(){return this._text}},fontSize:{set:function(u){this._fontSize=u,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(u){this._letterSpacing=u,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(u){this._lineSpacing=u,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(u){this._maxWidth=u,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},displayWidth:{set:function(u){this.setScaleX(1),this.getTextBounds(!1);var d=u/this.width;this.setScaleX(d)},get:function(){return this.width}},displayHeight:{set:function(u){this.setScaleY(1),this.getTextBounds(!1);var d=u/this.height;this.setScaleY(d)},get:function(){return this.height}},toJSON:function(){var u=a.ToJSON(this),d={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return u.data=d,u},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});l.ALIGN_LEFT=0,l.ALIGN_CENTER=1,l.ALIGN_RIGHT=2,l.ParseFromAtlas=e,l.ParseXMLBitmapFont=s,c.exports=l},37289:(c,x,t)=>{/**
1210 * @author       Richard Davey <[email protected]>
1211 * @copyright    2013-2025 Phaser Studio Inc.
1212 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1213 */var o=t(20926),p=function(a,n,r,e){var s=n._text,h=s.length,i=a.currentContext;if(!(h===0||!o(a,i,n,r,e))){r.addToRenderList(n);var l=n.fromAtlas?n.frame:n.texture.frames.__BASE,u=n.fontData.chars,d=n.fontData.lineHeight,f=n._letterSpacing,v=n._lineSpacing,m=0,y=0,g=0,T=null,S=0,E=0,M=0,F=0,A=0,P=0,L=null,O=0,G=l.source.image,z=l.cutX,Y=l.cutY,X=n._fontSize/n.fontData.size,I=n._align,U=0,D=0,V=n.getTextBounds(!1);n.maxWidth>0&&(s=V.wrappedText,h=s.length);var B=n._bounds.lines;I===1?D=(B.longest-B.lengths[0])/2:I===2&&(D=B.longest-B.lengths[0]),i.translate(-n.displayOriginX,-n.displayOriginY);for(var W=r.roundPixels,K=0;K<h;K++){if(g=s.charCodeAt(K),g===10){U++,I===1?D=(B.longest-B.lengths[U])/2:I===2&&(D=B.longest-B.lengths[U]),m=0,y+=d+v,L=null;continue}if(T=u[g],!!T){if(S=z+T.x,E=Y+T.y,M=T.width,F=T.height,A=T.xOffset+m,P=T.yOffset+y,L!==null){var J=T.kerning[O];A+=J!==void 0?J:0}A*=X,P*=X,A+=D,m+=T.xAdvance+f+(J!==void 0?J:0),L=T,O=g,!(M===0||F===0||g===32)&&(W&&(A=Math.round(A),P=Math.round(P)),i.save(),i.translate(A,P),i.scale(X,X),i.drawImage(G,S,E,M,F,0,0,M,F),i.restore())}}i.restore()}};c.exports=p},57336:(c,x,t)=>{/**
1214 * @author       Richard Davey <[email protected]>
1215 * @copyright    2013-2025 Phaser Studio Inc.
1216 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1217 */var o=t(22186),p=t(25305),a=t(44603),n=t(23568),r=t(35154);a.register("bitmapText",function(e,s){e===void 0&&(e={});var h=r(e,"font",""),i=n(e,"text",""),l=n(e,"size",!1),u=r(e,"align",0),d=new o(this.scene,0,0,h,i,l,u);return s!==void 0&&(e.add=s),p(this.scene,d,e),d})},34914:(c,x,t)=>{/**
1218 * @author       Richard Davey <[email protected]>
1219 * @copyright    2013-2025 Phaser Studio Inc.
1220 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1221 */var o=t(22186),p=t(39429);p.register("bitmapText",function(a,n,r,e,s,h){return this.displayList.add(new o(this.scene,a,n,r,e,s,h))})},18658:(c,x,t)=>{/**
1222 * @author       Richard Davey <[email protected]>
1223 * @copyright    2013-2025 Phaser Studio Inc.
1224 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1225 */var o=t(29747),p=o,a=o;p=t(33590),a=t(37289),c.exports={renderWebGL:p,renderCanvas:a}},33590:(c,x,t)=>{/**
1226 * @author       Richard Davey <[email protected]>
1227 * @copyright    2013-2025 Phaser Studio Inc.
1228 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1229 */var o=t(3217),p=t(91296),a=t(70554),n=function(r,e,s,h){var i=e._text,l=i.length;if(l!==0){s.addToRenderList(e);var u=r.pipelines.set(e.pipeline,e),d=p(e,s,h).calc;r.pipelines.preBatch(e);var f=s.roundPixels,v=s.alpha,m=e.charColors,y=e.tintFill,g=a.getTintAppendFloatAlpha,T=g(e.tintTopLeft,v*e._alphaTL),S=g(e.tintTopRight,v*e._alphaTR),E=g(e.tintBottomLeft,v*e._alphaBL),M=g(e.tintBottomRight,v*e._alphaBR),F=e.frame.glTexture,A=u.setGameObject(e),P=e.getTextBounds(!1),L,O,G,z=P.characters,Y=e.dropShadowX,X=e.dropShadowY,I=Y!==0||X!==0;if(I){var U=e.dropShadowColor,D=e.dropShadowAlpha,V=g(U,v*D*e._alphaTL),B=g(U,v*D*e._alphaTR),W=g(U,v*D*e._alphaBL),K=g(U,v*D*e._alphaBR);for(L=0;L<z.length;L++)O=z[L],G=O.glyph,!(O.code===32||G.width===0||G.height===0)&&o(u,e,O,G,Y,X,d,f,V,B,W,K,1,F,A)}for(L=0;L<z.length;L++)if(O=z[L],G=O.glyph,!(O.code===32||G.width===0||G.height===0))if(u.shouldFlush(6)&&(u.flush(),A=u.setGameObject(e)),m[O.i]){var J=m[O.i],Z=J.tintEffect,j=g(J.tintTL,v*e._alphaTL),k=g(J.tintTR,v*e._alphaTR),_=g(J.tintBL,v*e._alphaBL),q=g(J.tintBR,v*e._alphaBR);o(u,e,O,G,0,0,d,f,j,k,_,q,Z,F,A)}else o(u,e,O,G,0,0,d,f,T,S,E,M,y,F,A);r.pipelines.postBatch(e)}};c.exports=n},6107:(c,x,t)=>{/**
1230 * @author       Richard Davey <[email protected]>
1231 * @copyright    2013-2025 Phaser Studio Inc.
1232 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1233 */var o=t(48011),p=t(46590),a=t(83419),n=t(31401),r=t(4327),e=t(95643),s=t(73162),h=new a({Extends:e,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Size,n.Texture,n.Transform,n.Visible,o],initialize:function(l,u,d,f,v){e.call(this,l,"Blitter"),this.setTexture(f,v),this.setPosition(u,d),this.initPipeline(),this.initPostPipeline(),this.children=new s,this.renderList=[],this.dirty=!1},create:function(i,l,u,d,f){d===void 0&&(d=!0),f===void 0&&(f=this.children.length),u===void 0?u=this.frame:u instanceof r||(u=this.texture.get(u));var v=new p(this,i,l,u,d);return this.children.addAt(v,f,!1),this.dirty=!0,v},createFromCallback:function(i,l,u,d){for(var f=this.createMultiple(l,u,d),v=0;v<f.length;v++){var m=f[v];i.call(this,m,v)}return f},createMultiple:function(i,l,u){l===void 0&&(l=this.frame.name),u===void 0&&(u=!0),Array.isArray(l)||(l=[l]);var d=[],f=this;return l.forEach(function(v){for(var m=0;m<i;m++)d.push(f.create(0,0,v,u))}),d},childCanRender:function(i){return i.visible&&i.alpha>0},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=[]}});c.exports=h},72396:c=>{/**
1234 * @author       Richard Davey <[email protected]>
1235 * @copyright    2013-2025 Phaser Studio Inc.
1236 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1237 */var x=function(t,o,p,a){var n=o.getRenderList();if(n.length!==0){var r=t.currentContext,e=p.alpha*o.alpha;if(e!==0){p.addToRenderList(o),r.globalCompositeOperation=t.blendModes[o.blendMode],r.imageSmoothingEnabled=!o.frame.source.scaleMode;var s=o.x-p.scrollX*o.scrollFactorX,h=o.y-p.scrollY*o.scrollFactorY;r.save(),a&&a.copyToContext(r);for(var i=p.roundPixels,l=0;l<n.length;l++){var u=n[l],d=u.flipX||u.flipY,f=u.frame,v=f.canvasData,m=f.x,y=f.y,g=1,T=1,S=u.alpha*e;S!==0&&(r.globalAlpha=S,d?(u.flipX&&(g=-1,m-=v.width),u.flipY&&(T=-1,y-=v.height),v.width>0&&v.height>0&&(r.save(),r.translate(u.x+s,u.y+h),r.scale(g,T),r.drawImage(f.source.image,v.x,v.y,v.width,v.height,m,y,v.width,v.height),r.restore(
1237))):(i&&(m=Math.round(m),y=Math.round(y)),v.width>0&&v.height>0&&r.drawImage(f.source.image,v.x,v.y,v.width,v.height,m+u.x+s,y+u.y+h,v.width,v.height)))}r.restore()}}};c.exports=x},9403:(c,x,t)=>{/**
1238 * @author       Richard Davey <[email protected]>
1239 * @copyright    2013-2025 Phaser Studio Inc.
1240 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1241 */var o=t(6107),p=t(25305),a=t(44603),n=t(23568);a.register("blitter",function(r,e){r===void 0&&(r={});var s=n(r,"key",null),h=n(r,"frame",null),i=new o(this.scene,0,0,s,h);return e!==void 0&&(r.add=e),p(this.scene,i,r),i})},12709:(c,x,t)=>{/**
1242 * @author       Richard Davey <[email protected]>
1243 * @copyright    2013-2025 Phaser Studio Inc.
1244 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1245 */var o=t(6107),p=t(39429);p.register("blitter",function(a,n,r,e){return this.displayList.add(new o(this.scene,a,n,r,e))})},48011:(c,x,t)=>{/**
1246 * @author       Richard Davey <[email protected]>
1247 * @copyright    2013-2025 Phaser Studio Inc.
1248 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1249 */var o=t(29747),p=o,a=o;p=t(99485),a=t(72396),c.exports={renderWebGL:p,renderCanvas:a}},99485:(c,x,t)=>{/**
1250 * @author       Richard Davey <[email protected]>
1251 * @copyright    2013-2025 Phaser Studio Inc.
1252 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1253 */var o=t(61340),p=t(70554),a=new o,n=function(r,e,s,h){var i=e.getRenderList(),l=s.alpha*e.alpha;if(!(i.length===0||l===0)){s.addToRenderList(e);var u=r.pipelines.set(this.pipeline,e),d=s.scrollX*e.scrollFactorX,f=s.scrollY*e.scrollFactorY,v=a.copyFrom(s.matrix
1253);h&&(v.multiplyWithOffset(h,-d,-f),d=0,f=0);var m=e.x-d,y=e.y-f,g=-1,T=!1,S=s.roundPixels;r.pipelines.preBatch(e);for(var E=0;E<i.length;E++){var M=i[E],F=M.frame,A=M.alpha*l;if(A!==0){var P=F.width,L=F.height,O=m+M.x+F.x,G=y+M.y+F.y;M.flipX&&(P*=-1,O+=F.width),M.flipY&&(L*=-1,G+=F.height);var z=v.setQuad(O,G,O+P,G+L,S),Y=p.getTintAppendFloatAlpha(M.tint,A);if(F.sourceIndex!==g){var X=u.setGameObject(e,F);g=F.sourceIndex}u.batchQuad(e,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7],F.u0,F.v0,F.u1,F.v1,Y,Y,Y,Y,T,F.glTexture,X)&&(g=-1)}}r.pipelines.postBatch(e)}};c.exports=n},46590:(c,x,t)=>{/**
1254 * @author       Richard Davey <[email protected]>
1255 * @copyright    2013-2025 Phaser Studio Inc.
1256 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1257 */var o=t(83419),p=t(4327),a=new o({initialize:function(r,e,s,h,i){this.parent=r,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(n){return n===void 0?this.frame=this.parent.frame:n instanceof p&&n.texture===this.parent.texture?this.frame=n:this.frame=this.parent.texture.get(n),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(n,r,e){return this.x=n,this.y=r,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame
1257(e),this},setPosition:function(n,r){return this.x=n,this.y=r,this},setFlipX:function(n){return this.flipX=n,this},setFlipY:function(n){return this.flipY=n,this},setFlip:function(n,r){return this.flipX=n,this.flipY=r,this},setVisible:function(n){return this.visible=n,this},setAlpha:function(n){return this.alpha=n,this},setTint:function(n){return this.tint=n,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(n){this.parent.dirty|=this._visible!==n,this._visible=n}},alpha:{get:function(){return this._alpha},set:function(n){this.parent.dirty|=this._alpha>0!=n>0,this._alpha=n}}});c.exports=a},16005:(c,x,t)=>{/**
1258 * @author       Richard Davey <[email protected]>
1259 * @copyright    2013-2025 Phaser Studio Inc.
1260 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1261 */var o=t(45319),p=2,a={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(n,r,e,s){return n===void 0&&(n=1),r===void 0?this.alpha=n:(this._alphaTL=o(n,0,1),this._alphaTR=o(r,0,1),this._alphaBL=o(e,0,1),this._alphaBR=o(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(n){var r=o(n,0,1);this._alpha=r,this._alphaTL=r,this._alphaTR=r,this._alphaBL=r,this._alphaBR=r,r===0?this.renderFlags&=~p:this.renderFlags|=p}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(n){var r=o(n,0,1);this._alphaTL=r,r!==0&&(this.renderFlags|=p)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(n){var r=o(n,0,1);this._alphaTR=r,r!==0&&(this.renderFlags|=p)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(n){var r=o(n,0,1);this._alphaBL=r,r!==0&&(this.renderFlags|=p)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(n){var r=o(n,0,1);this._alphaBR=r,r!==0&&(this.renderFlags|=p)}}};c.exports=a},88509:(c,x,t)=>{/**
1262 * @author       Richard Davey <[email protected]>
1263 * @copyright    2013-2025 Phaser Studio Inc.
1264 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1265 */var o=t(45319),p=2,a={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(n){return n===void 0&&(n=1),this.alpha=n,this},alpha:{get:function(){return this._alpha},set:function(n){var r=o(n,0,1);this._alpha=r,r===0?this.renderFlags&=~p:this.renderFlags|=p}}};c.exports=a},90065:(c,x,t)=>{/**
1266 * @author       Richard Davey <[email protected]>
1267 * @copyright    2013-2025 Phaser Studio Inc.
1268 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1269 */var o=t(10312),p={_blendMode:o.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(a){typeof a=="string"&&(a=o[a]),a|=0,a>=-1&&(this._blendMode=a)}},setBlendMode:function(a){return this.blendMode=a,this}};c.exports=p},94215:c=>{/**
1270 * @author       Richard Davey <[email protected]>
1271 * @copyright    2013-2025 Phaser Studio Inc.
1272 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1273 */var x={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,o){return this.width=t,this.height=o,this},setDisplaySize:function(t,o){return this.displayWidth=t,this.displayHeight=o,this}};c.exports=x},61683:c=>{/**
1274 * @author       Richard Davey <[email protected]>
1275 * @copyright    2013-2025 Phaser Studio Inc.
1276 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1277 */var x={texture:null,frame:null,isCropped:!1,setCrop:function(t,o,p,a){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,o,p,a,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.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,
1277ch:0}}};c.exports=x},89272:(c,x,t)=>{/**
1278 * @author       Richard Davey <[email protected]>
1279 * @copyright    2013-2025 Phaser Studio Inc.
1280 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1281 */var o=t(37105),p={_depth:0,depth:{get:function(){return this._depth},set:function(a){this.displayList&&this.displayList.queueDepthSort(),this._depth=a}},setDepth:function(a){return a===void 0&&(a=0),this.depth=a,this},setToTop:function(){var a=this.getDisplayList();return a&&o.BringToTop(a,this),this},setToBack:function(){var a=this.getDisplayList();return a&&o.SendToBack(a,this),this},setAbove:function(a){var n=this.getDisplayList();return n&&a&&o.MoveAbove(n,this,a),this},setBelow:function(a){var n=this.getDisplayList();return n&&a&&o.MoveBelow(n,this,a),this}};c.exports=p},47059:(c,x,t)=>{/**
1282 * @author       Richard Davey <[email protected]>
1283 * @copyright    2013-2025 Phaser Studio Inc.
1284 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1285 */var o=t(83419),p=t(66064),a=t(19133),n=new o({initialize:function(e,s){this.gameObject=e,this.isPost=s,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(r){return r===void 0&&(r=0),this.padding=r,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(r){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,r!==void 0&&(this.padding=r),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var r=this.list,e=0;e<r.length;e++)r[e].destroy();this.list=[]}return this.enabled=!1,this.gameObject},remove:function(r){var e;if(this.isPost){var s=this.gameObject.getPostPipeline(String(r.type));for(Array.isArray(s)||(s=[s]),e=0;e<s.length;e++){var h=s[e];if(h.controller===r){this.gameObject.removePostPipeline(h),r.destroy();break}}}else{var i=this.list;for(e=0;e<i.length;e++)i[e]===r&&(a(i,e),r.destroy())}return this.gameObject},disable:function(r){return r===void 0&&(r=!1),this.isPost||this.gameObject.resetPipeline(),this.enabled=!1,r&&this.clear(),this.gameObject},add:function(r,e){if(this.isPost){var s=String(r.type);this.gameObject.setPostPipeline(s,e);var h=this.gameObject.getPostPipeline(s);if(h)return Array.isArray(h)&&(h=h.pop()),h&&(h.controller=r),r}else return this.enabled||this.enable(),this.list.push(r),r},addGlow:function(r,e,s,h,i,l){return this.add(new p.Glow(this.gameObject,r,e,s,h),{quality:i,distance:l})},addShadow:function(r,e,s,h,i,l,u){return this.add(new p.Shadow(this.gameObject,r,e,s,h,i,l,u))},addPixelate:function(r){return this.add(new p.Pixelate(this.gameObject,r))},addVignette:function(r,e,s,h){return this.add(new p.Vignette(this.gameObject,r,e,s,h))},addShine:function(r,e,s,h){return this.add(new p.Shine(this.gameObject,r,e,s,h))},addBlur:function(r,e,s,h,i,l){return this.add(new p.Blur(this.gameObject,r,e,s,h,i,l))},addGradient:function(r,e,s,h,i,l,u,d){return this.add(new p.Gradient(this.gameObject,r,e,s,h,i,l,u,d))},addBloom:function(r,e,s,h,i,l){return this.add(new p.Bloom(this.gameObject,r,e,s,h,i,l))},addColorMatrix:function(){return this.add(new p.ColorMatrix(this.gameObject))},addCircle:function(r,e,s,h,i){return this.add(new p.Circle(this.gameObject,r,e,s,h,i))},addBarrel:function(r){return this.add(new p.Barrel(this.gameObject,r))},addDisplacement:function(r,e,s){return this.add(new p.Displacement(this.gameObject,r,e,s))},addWipe:function(r,e,s){return this.add(new p.Wipe(this.gameObject,r,e,s))},addReveal:function(r,e,s){return this.add(new p.Wipe(this.gameObject,r,e,s,!0))},addBokeh:function(r,e,s){return this.add(new p.Bokeh(this.gameObject,r,e,s))},addTiltShift:function(r,e,s,h,i,l){return this.add(new p.Bokeh(this.gameObject,r,e,s,!0,h,i,l))},destroy:function(){this.clear(),this.gameObject=null}});c.exports=n},54434:c=>{/**
1286 * @author       Richard Davey <[email protected]>
1287 * @copyright    2013-2025 Phaser Studio Inc.
1288 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1289 */var x={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,o){return this.flipX=t,this.flipY=o,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};c.exports=x},8004:(c,x,t)=>{/**
1290 * @author       Richard Davey <[email protected]>
1291 * @copyright    2013-2025 Phaser Studio Inc.
1292 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1293 */var o=t(87841),p=t(11520),a=t(26099),n={prepareBoundsOutput:function(r,e){if(e===void 0&&(e=!1),this.rotation!==0&&p(r,this.x,this.y,this.rotation),e&&this.parentContainer){var s=this.parentContainer.getBoundsTransformMatrix();s.transformPoint(r.x,r.y,r)}return r},getCenter:function(r,e){return r===void 0&&(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getTopLeft:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getTopCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getTopRight:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getLeftCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getRightCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getBottomLeft:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBottomCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBottomRight:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBounds:function(r){r===void 0&&(r=new o);var e,s,h,i,l,u,d,f;if(this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(r),v.transformPoint(r.x,r.y,r),e=r.x,s=r.y,this.getTopRight(r),v.transformPoint(r.x,r.y,r),h=r.x,i=r.y,this.getBottomLeft(r),v.transformPoint(r.x,r.y,r),l=r.x,u=r.y,this.getBottomRight(r),v.transformPoint(r.x,r.y,r),d=r.x,f=r.y}else this.getTopLeft(r),e=r.x,s=r.y,this.getTopRight(r),h=r.x,i=r.y,this.getBottomLeft(r),l=r.x,u=r.y,this.getBottomRight(r),d=r.x,f=r.y;
1293return r.x=Math.min(e,h,l,d),r.y=Math.min(s,i,u,f),r.width=Math.max(e,h,l,d)-r.x,r.height=Math.max(s,i,u,f)-r.y,r}};c.exports=n},8573:(c,x,t)=>{/**
1294 * @author       Richard Davey <[email protected]>
1295 * @copyright    2013-2025 Phaser Studio Inc.
1296 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1297 */var o=t(6858),p=t(80661),a={mask:null,setMask:function(n){return this.mask=n,this},clearMask:function(n){return n===void 0&&(n=!1),n&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(n,r,e,s,h){return n===void 0&&(this.texture||this.shader||this.geom)&&(n=this),new o(this.scene,n,r,e,s,h)},createGeometryMask:function(n){return n===void 0&&(this.type==="Graphics"||this.geom)&&(n=this),new p(this.scene,n)}};c.exports=a},27387:c=>{/**
1298 * @author       Richard Davey <[email protected]>
1299 * @copyright    2013-2025 Phaser Studio Inc.
1300 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1301 */var x={_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,o){return t===void 0&&(t=.5),o===void 0&&(o=t),this.originX=t,this.originY=o,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,o){return t===void 0&&(t=0),o===void 0&&(o=t),this.displayOriginX=t,this.displayOriginY=o,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};c.exports=x},37640:(c,x,t)=>{/**
1302 * @author       Richard Davey <[email protected]>
1303 * @copyright    2013-2025 Phaser Studio Inc.
1304 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1305 */var o=t(39506),p=t(57355),a=t(35154),n=t(86353),r=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:n.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 l=p(s,"positionOnPath",!1);this.rotateToPath=p(s,"rotateToPath",!1),this.pathRotationOffset=a(s,"rotationOffset",0);var u=a(s,"startAt",h);if(u&&(s.onStart=function(f){var v=f.data[0];v.progress=u,v.elapsed=v.duration*u;var m=v.ease(v.progress);v.current=v.start+(v.end-v.start)*m,v.setTargetValue()}),this.pathOffset||(this.pathOffset=new r(this.x,this.y)),this.pathVector||(this.pathVector=new r),this.pathDelta||(this.pathDelta=new r),this.pathDelta.reset(),s.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(s),this.path.getStartPoint(this.pathOffset),l&&(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=n.PLAYING_FORWARD,this.rotateToPath){var d=this.path.getPoint(.1);this.rotation=Math.atan2(d.y-this.y,d.x-this.x)+o(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,l=this.pathVector;if(i.copy(l).negate(),h.state===n.COMPLETE){this.path.getPoint(h.end,l),i.add(l),l.add(this.pathOffset),this.setPosition(l.x,l.y);return}else if(h.state!==n.PLAYING_FORWARD&&h.state!==n.PLAYING_BACKWARD)return;this.path.getPoint(s.getValue(),l),i.add(l),l.add(this.pathOffset);var u=this.x,d=this.y;this.setPosition(l.x,l.y);var f=this.x-u,v=this.y-d;if(f===0&&v===0)return;if(h.state!==this._prevDirection){this._prevDirection=h.state;return}this.rotateToPath&&(this.rotation=Math.atan2(v,f)+o(this.pathRotationOffset))}}};c.exports=e},72699:(c,x,t)=>{/**
1306 * @author       Richard Davey <[email protected]>
1307 * @copyright    2013-2025 Phaser Studio Inc.
1308 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1309 */var o=t(62644),p={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(a){this.pipelineData={};var n=this.scene.sys.renderer;if(!n)return!1;var r=n.pipelines;if(r){a===void 0&&(a=r.default);var e=r.get(a);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(a,n,r){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),n&&(this.pipelineData=r?o(n):n)}return this},setPipelineData:function(a,n){var r=this.pipelineData;return n===void 0?delete r[a]:r[a]=n,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===null?null:this.pipeline.name}};c.exports=p},17581:(c,x,t)=>{/**
1310 * @author       Richard Davey <[email protected]>
1311 * @copyright    2013-2025 Phaser Studio Inc.
1312 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1313 */var o=t(62644),p=t(47059),a=t(19133),n={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(r){this.postPipelines=[],this.postPipelineData={},this.postFX=new p(this,!0),r&&(this.preFX=new p(this,!1))},setPostPipeline:function(r,e,s){var h=this.scene.sys.renderer;if(!h)return this;var i=h.pipelines;if(i){Array.isArray(r)||(r=[r]);for(var l=0;l<r.length;l++){var u=i.getPostPipeline(r[l],this,e);u&&this.postPipelines.push(u)}e&&(this.postPipelineData=s?o(e):e)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPostPipelineData:function(r,e){var s=this.postPipelineData;return e===void 0?delete s[r]:s[r]=e,this},getPostPipeline:function(r){for(var e=typeof r=="string",s=this.postPipelines,h=[],i=0;i<s.length;i++){var l=s[i];(e&&l.name===r||!e&&l instanceof r)&&h.push(l)}return h.length===1?h[0]:h},resetPostPipeline:function(r){r===void 0&&(r=!1);for(var e=this.postPipelines,s=0;s<e.length;s++)e[s].destroy();this.postPipelines=[],this.hasPostPipeline=!1,r&&(this.postPipelineData={})},removePostPipeline:function(r){for(var e=typeof r=="string",s=this.postPipelines,h=s.length-1;h>=0;h--){var i=s[h];(e&&i.name===r||!e&&i===r)&&(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}};c.exports=n},80227:c=>{/**
1314 * @author       Richard Davey <[email protected]>
1315 * @copyright    2013-2025 Phaser Studio Inc.
1316 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1317 */var x={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,o){return o===void 0&&(o=t),this.scrollFactorX=t,this.scrollFactorY=o,this}};c.exports=x},16736:c=>{/**
1318 * @author       Richard Davey <[email protected]>
1319 * @copyright    2013-2025 Phaser Studio Inc.
1320 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1321 */var x={_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 o=this.input;return o&&!o.customHitArea&&(o.hitArea.width=this.width,o.hitArea.height=this.height),this},setSize:function(t,o){return this.width=t,this.height=o,this},setDisplaySize:function(t,o){return this.displayWidth=t,this.displayHeight=o,this}};c.exports=x},37726:(c,x,t)=>{/**
1322 * @author       Richard Davey <[email protected]>
1323 * @copyright    2013-2025 Phaser Studio Inc.
1324 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1325 */var o=t(4327),p=8,a={texture:null,frame:null,isCropped:!1,setTexture:function(n,r,e,s){return this.texture=this.scene.sys.textures.get(n),this.setFrame
1325(r,e,s)},setFrame:function(n,r,e){return r===void 0&&(r=!0),e===void 0&&(e=!0),n instanceof o?(this.texture=this.scene.sys.textures.get(n.texture.key),this.frame=n):this.frame=this.texture.get(n),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~p:this.renderFlags|=p,this._sizeComponent&&r&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};c.exports=a},79812:(c,x,t)=>{/**
1326 * @author       Richard Davey <[email protected]>
1327 * @copyright    2013-2025 Phaser Studio Inc.
1328 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1329 */var o=t(4327),p=8,a={texture:null,frame:null,isCropped:!1,setCrop:function(n,r,e,s){if(n===void 0)this.isCropped=!1;else if(this.frame){if(typeof n=="number")this.frame.setCropUVs(this._crop,n,r,e,s,this.flipX,this.flipY);else{var h=n;this.frame.setCropUVs(this._crop,h.x,h.y,h.width,h.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(n,r){return this.texture=this.scene.sys.textures.get(n),this.setFrame
1329(r)},setFrame:function(n,r,e){return r===void 0&&(r=!0),e===void 0&&(e=!0),n instanceof o?(this.texture=this.scene.sys.textures.get(n.texture.key),this.frame=n):this.frame=this.texture.get(n),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~p:this.renderFlags|=p,this._sizeComponent&&r&&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}}};c.exports=a},27472:c=>{/**
1330 * @author       Richard Davey <[email protected]>
1331 * @copyright    2013-2025 Phaser Studio Inc.
1332 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1333 */var x={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,o,p,a){return t===void 0&&(t=16777215),o===void 0&&(o=t,p=t,a=t),this.tintTopLeft=t,this.tintTopRight=o,this.tintBottomLeft=p,this.tintBottomRight=a,this.tintFill=!1,this},setTintFill:function(t,o,p,a){return this.setTint(t,o,p,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}}};c.exports=x},53774:c=>{/**
1334 * @author       Richard Davey <[email protected]>
1335 * @copyright    2013-2025 Phaser Studio Inc.
1336 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1337 */var x=function(t){var o={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&&(o.textureKey=t.texture.key,o.frameKey=t.frame.name),o};c.exports=x},16901:(c,x,t)=>{/**
1338 * @author       Richard Davey <[email protected]>
1339 * @copyright    2013-2025 Phaser Studio Inc.
1340 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1341 */var o=t(36383),p=t(61340),a=t(85955),n=t(86554),r=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 r(this._rotation*o.RAD_TO_DEG)},set:function(i){this.rotation=r(i)*o.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=n(i)}},setPosition:function(i,l,u,d){return i===void 0&&(i=0),l===void 0&&(l=i),u===void 0&&(u=0),d===void 0&&(d=0),this.x=i,this.y=l,this.z=u,this.w=d,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,l,u,d){return i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=this.scene.sys.scale.width),d===void 0&&(d=this.scene.sys.scale.height),this.x=i+Math.random()*u,this.y=l+Math.random()*d,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,l){return i===void 0&&(i=1),l===void 0&&(l=i),this.scaleX=i,this.scaleY=l,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 p),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,l){i===void 0&&(i=new p);var u=this.parentContainer;if(!u)return this.getLocalTransformMatrix(i);var d=!1;for(l||(l=new p,d=!0),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);u;)l.applyITRS(u.x,u.y,u._rotation,u._scaleX,u._scaleY),l.multiply(i,i),u=u.parentContainer;return d&&l.destroy(),i},getLocalPoint:function(i,l,u,d){u||(u=new e),d||(d=this.scene.sys.cameras.main);var f=d.scrollX,v=d.scrollY,m=i+f*this.scrollFactorX-f,y=l+v*this.scrollFactorY-v;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(m,y,u):a(m,y,this.x,this.y,this.rotation,this.scaleX,this.scaleY,u),this._originComponent&&(u.x+=this._displayOriginX,u.y+=this._displayOriginY),u},getWorldPoint:function(i,l,u){i===void 0&&(i=new e);var d=this.parentContainer;if(!d)return i.x=this.x,i.y=this.y,i;var f=this.getWorldTransformMatrix(l,u);return i.x=f.tx,i.y=f.ty,i},getParentRotation:function(){for(var i=0,l=this.parentContainer;l;)i+=l.rotation,l=l.parentContainer;return i}};c.exports=h},61340:(c,x,t)=>{/**
1342 * @author       Richard Davey <[email protected]>
1343 * @copyright    2013-2025 Phaser Studio Inc.
1344 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1345 */var o=t(83419),p=t(36383),a=t(26099),n=new o({initialize:function(e,s,h,i,l,u){e===void 0&&(e=1),s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=1),l===void 0&&(l=0),u===void 0&&(u=0),this.matrix=new Float32Array([e,s,h,i,l,u,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(r){this.matrix[0]=r}}
vendor: 7,896 bytes, lines 1345-1358
1345,b:{get:function(){return this.matrix[1]},set:function(r){this.matrix[1]=r}},c:{get:function(){return this.matrix[2]},set:function(r){this.matrix[2]=r}},d:{get:function(){return this.matrix[3]},set:function(r){this.matrix[3]=r}},e:{get:function(){return this.matrix[4]},set:function(r){this.matrix[4]=r}},f:{get:function(){return this.matrix[5]},set:function(r){this.matrix[5]=r}},tx:{get:function(){return this.matrix[4]},set:function(r){this.matrix[4]=r}},ty:{get:function(){return this.matrix[5]},set:function(r){this.matrix[5]=r}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var r=this.matrix,e=r[0],s=r[1],h=r[2],i=r[3];return e||s?s>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):h||i?p.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 r=this.matrix;return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,this},translate:function(r,e){var s=this.matrix;return s[4]=s[0]*r+s[2]*e+s[4],s[5]=s[1]*r+s[3]*e+s[5],this},scale:function(r,e){var s=this.matrix;return s[0]*=r,s[1]*=r,s[2]*=e,s[3]*=e,this},rotate:function(r){var e=Math.sin(r),s=Math.cos(r),h=this.matrix,i=h[0],l=h[1],u=h[2],d=h[3];return h[0]=i*s+u*e,h[1]=l*s+d*e,h[2]=i*-e+u*s,h[3]=l*-e+d*s,this},multiply:function(r,e){var s=this.matrix,h=r.matrix,i=s[0],l=s[1],u=s[2],d=s[3],f=s[4],v=s[5],m=h[0],y=h[1],g=h[2],T=h[3],S=h[4],E=h[5],M=e===void 0?s:e.matrix;return M[0]=m*i+y*u,M[1]=m*l+y*d,M[2]=g*i+T*u,M[3]=g*l+T*d,M[4]=S*i+E*u+f,M[5]=S*l+E*d+v,M},multiplyWithOffset:function(r,e,s){var h=this.matrix,i=r.matrix,l=h[0],u=h[1],d=h[2],f=h[3],v=h[4],m=h[5],y=e*l+s*d+v,g=e*u+s*f+m,T=i[0],S=i[1],E=i[2],M=i[3],F=i[4],A=i[5];return h[0]=T*l+S*d,h[1]=T*u+S*f,h[2]=E*l+M*d,h[3]=E*u+M*f,h[4]=F*l+A*d+y,h[5]=F*u+A*f+g,this},transform:function(r,e,s,h,i,l){var u=this.matrix,d=u[0],f=u[1],v=u[2],m=u[3],y=u[4],g=u[5];return u[0]=r*d+e*v,u[1]=r*f+e*m,u[2]=s*d+h*v,u[3]=s*f+h*m,u[4]=i*d+l*v+y,u[5]=i*f+l*m+g,this},transformPoint:function(r,e,s){s===void 0&&(s={x:0,y:0});var h=this.matrix,i=h[0],l=h[1],u=h[2],d=h[3],f=h[4],v=h[5];return s.x=r*i+e*u+f,s.y=r*l+e*d+v,s},invert:function(){var r=this.matrix,e=r[0],s=r[1],h=r[2],i=r[3],l=r[4],u=r[5],d=e*i-s*h;return r[0]=i/d,r[1]=-s/d,r[2]=-h/d,r[3]=e/d,r[4]=(h*u-i*l)/d,r[5]=-(e*u-s*l)/d,this},copyFrom:function(r){var e=this.matrix;return e[0]=r.a,e[1]=r.b,e[2]=r.c,e[3]=r.d,e[4]=r.e,e[5]=r.f,this},copyFromArray:function(r){var e=this.matrix;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],this},copyToContext:function(r){var e=this.matrix;return r.transform(e[0],e[1],e[2],e[3],e[4],e[5]),r},setToContext:function(r){return r.setTransform(this.a,this.b,this.c,this.d,this.e,this.f),r},copyToArray:function(r){var e=this.matrix;return r===void 0?r=[e[0],e[1],e[2],e[3],e[4],e[5]]:(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5]),r},setTransform:function(r,e,s,h,i,l){var u=this.matrix;return u[0]=r,u[1]=e,u[2]=s,u[3]=h,u[4]=i,u[5]=l,this},decomposeMatrix:function(){var r=this.decomposedMatrix,e=this.matrix,s=e[0],h=e[1],i=e[2],l=e[3],u=s*l-h*i;if(r.translateX=e[4],r.translateY=e[5],s||h){var d=Math.sqrt(s*s+h*h);r.rotation=h>0?Math.acos(s/d):-Math.acos(s/d),r.scaleX=d,r.scaleY=u/d}else if(i||l){var f=Math.sqrt(i*i+l*l);r.rotation=Math.PI*.5-(l>0?Math.acos(-i/f):-Math.acos(i/f)),r.scaleX=u/f,r.scaleY=f}else r.rotation=0,r.scaleX=0,r.scaleY=0;return r},applyITRS:function(r,e,s,h,i){var l=this.matrix,u=Math.sin(s),d=Math.cos(s);return l[4]=r,l[5]=e,l[0]=d*h,l[1]=u*h,l[2]=-u*i,l[3]=d*i,this},applyInverse:function(r,e,s){s===void 0&&(s=new a);var h=this.matrix,i=h[0],l=h[1],u=h[2],d=h[3],f=h[4],v=h[5],m=1/(i*d+u*-l);return s.x=d*m*r+-u*m*e+(v*u-f*d)*m,s.y=i*m*e+-l*m*r+(-v*i+f*l)*m,s},setQuad:function(r,e,s,h,i,l){i===void 0&&(i=!1),l===void 0&&(l=this.quad);var u=this.matrix,d=u[0],f=u[1],v=u[2],m=u[3],y=u[4],g=u[5],T=r*d+e*v+y,S=r*f+e*m+g,E=r*d+h*v+y,M=r*f+h*m+g,F=s*d+h*v+y,A=s*f+h*m+g,P=s*d+e*v+y,L=s*f+e*m+g;if(i){var O=Math.floor(T+.5),G=Math.floor(S+.5),z=O-T,Y=G-S;l[0]=O,l[1]=G,l[2]=E+z,l[3]=M+Y,l[4]=F+z,l[5]=A+Y,l[6]=P+z,l[7]=L+Y}else l[0]=T,l[1]=S,l[2]=E,l[3]=M,l[4]=F,l[5]=A,l[6]=P,l[7]=L;return l},getX:function(r,e){return r*this.a+e*this.c+this.e},getY:function(r,e){return r*this.b+e*this.d+this.f},getXRound:function(r,e,s){var h=this.getX(r,e);return s&&(h=Math.floor(h+.5)),h},getYRound:function(r,e,s){var h=this.getY(r,e);return s&&(h=Math.floor(h+.5)),h},getCSSMatrix:function(){var r=this.matrix;return"matrix("+r[0]+","+r[1]+","+r[2]+","+r[3]+","+r[4]+","+r[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});c.exports=n},59715:c=>{/**
1346 * @author       Richard Davey <[email protected]>
1347 * @copyright    2013-2025 Phaser Studio Inc.
1348 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1349 */var x=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(o){o?(this._visible=!0,this.renderFlags|=x):(this._visible=!1,this.renderFlags&=~x)}},setVisible:function(o){return this.visible=o,this}};c.exports=t},31401:(c,x,t)=>{/**
1350 * @author       Richard Davey <[email protected]>
1351 * @copyright    2013-2025 Phaser Studio Inc.
1352 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1353 */c.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:(c,x,t)=>{/**
1354 * @author       Richard Davey <[email protected]>
1355 * @author       Felipe Alfonso <@bitnenfer>
1356 * @copyright    2013-2025 Phaser Studio Inc.
1357 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1358 */var o=t(37105),p=t(10312),a=t(83419),n=t(31401),r=t(51708),e=t(95643),s=t(87841),h=t(29959),i=t(36899),l=t(26099),u=new n.TransformMatrix,d=new a({Extends:e,Mixins:[n.AlphaSingle,n.BlendMode,n.ComputedSize,n.Depth,n.Mask,n.PostPipeline,n.Transform,n.Visible,h],initialize:function(v,m,y,g){e.call(this,v,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new n.TransformMatrix,this._sortKey="",this._sysEvents=v.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(m,y),this.setBlendMode(p.SKIP_CHECK),g&&this.add(g)},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(f){return f===void 0&&(f=!0),this.exclusive=f,this},getBounds:function(f){if(f===void 0&&(f=new s),f.setTo(this.x,this.y,0,0),this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix(),m=v.transformPoint(this.x,this.y);f.setTo(m.x,m.y,0,0)}if(this.list.length>0){var y=this.list,g=new s,T=!1;f.setEmpty();for(var S=0;S<y.length;S++){var E=y[S];E.getBounds&&(E.getBounds(g),T?i(g,f,f):(f.setTo(g.x,g.y,g.width,g.height),T=!0))}}return f},addHandler:function(f){f.once(r.DESTROY,this.onChildDestroyed,this),this.exclusive&&(f.parentContainer&&f.parentContainer.remove(f),f.parentContainer=this,f.removeFromDisplayList(),f.addedToScene())},removeHandler:function(f){f.off(r.DESTROY,this.remove,this),this.exclusive&&(f.parentContainer=null,f.removedFromScene(),f.addToDisplayList())},pointToContainer:function(f,v){v===void 0&&(v=new l),this.parentContainer?this.parentContainer.pointToContainer(f,v):(v.x=f.x,v.y=f.y);var m=u;return m.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),m.
vendor: 4,481 bytes, lines 1358-1363
1358invert(),m.transformPoint(f.x,f.y,v),v},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(u,this.localTransform)},add:function(f){return o.Add(this.list,f,this.maxSize,this.addHandler,this),this},addAt:function(f,v){return o.AddAt(this.list,f,v,this.maxSize,this.addHandler,this),this},getAt:function(f){return this.list[f]},getIndex:function(f){return this.list.indexOf(f)},sort:function(f,v){return f?(v===void 0&&(v=function(m,y){return m[f]-y[f]}),o.StableSort(this.list,v),this):this},getByName:function(f){return o.GetFirst(this.list,"name",f)},getRandom:function(f,v){return o.GetRandom(this.list,f,v)},getFirst:function(f,v,m,y){return o.GetFirst(this.list,f,v,m,y)},getAll:function(f,v,m,y){return o.GetAll(this.list,f,v,m,y)},count:function(f,v,m,y){return o.CountAllMatching(this.list,f,v,m,y)},swap:function(f,v){return o.Swap(this.list,f,v),this},moveTo:function(f,v){return o.MoveTo(this.list,f,v),this},moveAbove:function(f,v){return o.MoveAbove(this.list,f,v),this},moveBelow:function(f,v){return o.MoveBelow(this.list,f,v),this},remove:function(f,v){var m=o.Remove(this.list,f,this.removeHandler,this);if(v&&m){Array.isArray(m)||(m=[m]);for(var y=0;y<m.length;y++)m[y].destroy()}return this},removeAt:function(f,v){var m=o.RemoveAt(this.list,f,this.removeHandler,this);return v&&m&&m.destroy(),this},removeBetween:function(f,v,m){var y=o.RemoveBetween(this.list,f,v,this.removeHandler,this);if(m)for(var g=0;g<y.length;g++)y[g].destroy();return this},removeAll:function(f){var v=this.list;if(f){for(var m=0;m<v.length;m++)v[m]&&v[m].scene&&(v[m].off(r.DESTROY,this.onChildDestroyed,this),v[m].destroy());this.list=[]}else o.RemoveBetween(v,0,v.length,this.removeHandler,this);return this},bringToTop:function(f){return o.BringToTop(this.list,f),this},sendToBack:function(f){return o.SendToBack(this.list,f),this},moveUp:function(f){return o.MoveUp(this.list,f),this},moveDown:function(f){return o.MoveDown(this.list,f),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return o.Shuffle(this.list),this},replace:function(f,v,m){var y=o.Replace(this.list,f,v);return y&&(this.addHandler(v),this.removeHandler(f),m&&f.destroy()),this},exists:function(f){return this.list.indexOf(f)>-1},setAll:function(f,v,m,y){return o.SetAll(this.list,f,v,m,y),this},each:function(f,v){var m=[null],y,g=this.list.slice(),T=g.length;for(y=2;y<arguments.length;y++)m.push(arguments[y]);for(y=0;y<T;y++)m[0]=g[y],f.apply(v,m);return this},iterate:function(f,v){var m=[null],y;for(y=2;y<arguments.length;y++)m.push(arguments[y]);for(y=0;y<this.list.length;y++)m[0]=this.list[y],f.apply(v,m);return this},setScrollFactor:function(f,v,m){return v===void 0&&(v=f),m===void 0&&(m=!1),this.scrollFactorX=f,this.scrollFactorY=v,m&&(o.SetAll(this.list,"scrollFactorX",f),o.SetAll(this.list,"scrollFactorY",v)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?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.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(f){o.Remove(this.list,f),this.exclusive&&(f.parentContainer=null,f.removedFromScene())}});c.exports=d},53584:c=>{/**
1359 * @author       Richard Davey <[email protected]>
1360 * @author       Felipe Alfonso <@bitnenfer>
1361 * @copyright    2013-2025 Phaser Studio Inc.
1362 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1363 */var x=function(t,o,p,a){p.addToRenderList(o);var n=o.list;if(n.length!==0){var r=o.localTransform;a?(r.loadIdentity(),r.multiply(a),r.translate(o.x,o.y),r.rotate(o.rotation),r.scale(o.scaleX,o.scaleY)):r.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY);var e=o.blendMode!==-1;e||t.setBlendMode(0);var s=o._alpha,h=o.scrollFactorX,i=o.scrollFactorY;o.mask&&o.mask.preRenderCanvas(t,null,p);for(var l=0;l<n.length;l++){var u=n[l];if(u.willRender(p)){var d=u.alpha,f=u.scrollFactorX,v=u.scrollFactorY;!e&&u.blendMode!==t.currentBlendMode&&t.setBlendMode(u.blendMode),u.setScrollFactor(f*h,v*i),u.setAlpha(d*s),u.renderCanvas(t,u,p,r),u.setAlpha(d),u.setScrollFactor(f,v)}}o.mask&&o.mask.postRenderCanvas(t)}};c.exports=x}
1363,77143:(c,x,t)=>{/**
1364 * @author       Richard Davey <[email protected]>
1365 * @author       Felipe Alfonso <@bitnenfer>
1366 * @copyright    2013-2025 Phaser Studio Inc.
1367 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1368 */var o=t(25305),p=t(31559),a=t(44603),n=t(23568),r=t(95540);a.register("container",function(e,s){e===void 0&&(e={});var h=n(e,"x",0),i=n(e,"y",0),l=r(e,"children",null),u=new p(this.scene,h,i,l);return s!==void 0&&(e.add=s),o(this.scene,u,e),u})},24961:(c,x,t)=>{/**
1369 * @author       Richard Davey <[email protected]>
1370 * @author       Felipe Alfonso <@bitnenfer>
1371 * @copyright    2013-2025 Phaser Studio Inc.
1372 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1373 */var o=t(31559),p=t(39429);p.register("container",function(a,n,r){return this.displayList.add(new o(this.scene,a,n,r))})},29959:(c,x,t)=>{/**
1374 * @author       Richard Davey <[email protected]>
1375 * @author       Felipe Alfonso <@bitnenfer>
1376 * @copyright    2013-2025 Phaser Studio Inc.
1377 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1378 */var o=t(29747),p=o,a=o;p=t(72249),a=t(53584),c.exports={renderWebGL:p,renderCanvas:a}},72249:c=>{/**
1379 * @author       Richard Davey <[email protected]>
1380 * @author       Felipe Alfonso <@bitnenfer>
1381 * @copyright    2013-2025 Phaser Studio Inc.
1382 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1383 */var x=function(t,o,p,a){p.addToRenderList(o);var n=o.list,r=n.length;if(r!==0){var e=o.localTransform;a?(e.loadIdentity(),e.multiply(a),e.translate(o.x,o.y),e.rotate(o.rotation),e.scale(o.scaleX,o.scaleY)):e.applyITRS(o.x,o.y,o.rotation,o.scaleX,o.scaleY),t.pipelines.preBatch(o);var s=o.blendMode!==-1;s||t.setBlendMode(0);for(var h=o.alpha,i=o.scrollFactorX,l=o.scrollFactorY,u=0;u<r;u++){var d=n[u];if(d.willRender(p)){var f,v,m,y;if(d.alphaTopLeft!==void 0)f=d.alphaTopLeft,v=d.alphaTopRight,m=d.alphaBottomLeft,y=d.alphaBottomRight;else{var g=d.alpha;f=g,v=g,m=g,y=g}var T=d.scrollFactorX,S=d.scrollFactorY;!s&&d.blendMode!==t.currentBlendMode&&t.setBlendMode(d.blendMode);var E=d.mask;E&&E.preRenderWebGL(t,d,p);var M=d.type;M!==t.currentType&&(t.newType=!0,t.currentType=M),t.nextTypeMatch=u<r-1?n[u+1].type===t.currentType:!1,d.setScrollFactor(T*i,S*l),d.setAlpha(f*h,v*h,m*h,y*h),d.renderWebGL(t,d,p,e,o),d.setAlpha(f,v,m,y),d.setScrollFactor(T,S),E&&E.postRenderWebGL(t,p),t.newType=!1}}t.pipelines.postBatch(o)}};c.exports=x},47407:c=>{/**
1384 * @author       Richard Davey <[email protected]>
1385 * @copyright    2013-2025 Phaser Studio Inc.
1386 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1387 */c.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(c,x,t)=>{/**
1388 * @author       Richard Davey <[email protected]>
1389 * @copyright    2013-2025 Phaser Studio Inc.
1390 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1391 */var o=t(83419),p=t(31401),a=t(441),n=t(95643),r=t(41212),e=t(35846),s=t(44594),h=t(61369),i=new o({Extends:n,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Origin,p.ScrollFactor,p.Transform,p.Visible,a],initialize:function(u,d,f,v,m,y){if(n.call(this,u,"DOMElement"),this.parent=u.sys.game.domContainer,!this.parent)throw new Error("No DOM Container set in game config");this.cache=u.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(d,f),typeof v=="string"?v[0]==="#"?this.setElement(v.substr(1),m,y):this.createElement(v,m,y):v&&this.setElement(v,m,y),u.sys.events.on(s.SLEEP,this.handleSceneEvent,this),u.sys.events.on(s.WAKE,this.handleSceneEvent,this),u.sys.events.on(s.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(l){var u=this.node,d=u.style;u&&(d.display=l.settings.visible?"block":"none")},setSkew:function(l,u){return l===void 0&&(l=0),u===void 0&&(u=l),this.skewX=l,this.skewY=u,this},setPerspective:function(l){return this.parent.style.perspective=l+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(l){this.parent.style.perspective=l+"px"}},addListener:function(l){if(this.node){l=l.split(" ");for(var u=0;u<l.length;u++)this.node.addEventListener(l[u],this.handler,!1)}return this},removeListener:function(l){if(this.node){l=l.split(" ");for(var u=0;u<l.length;u++)this.node.removeEventListener(l[u],this.handler)}return this}
1391,dispatchNativeEvent:function(l){this.emit(l.type,l)},createElement:function(l,u,d){return this.setElement(document.createElement(l),u,d)},setElement:function(l,u,d){this.removeElement();var f;if(typeof l=="string"?(l[0]==="#"&&(l=l.substr(1)),f=document.getElementById(l)):typeof l=="object"&&l.nodeType===1&&(f=l),!f)return this;if(this.node=f,u&&r(u))for(var v in u)f.style[v]=u[v];else typeof u=="string"&&(f.style=u);return f.style.zIndex="0",f.style.display="inline",f.style.position="absolute",f.phaser=this,this.parent.appendChild(f),d&&(f.innerText=d),this.updateSize()},createFromCache:function(l,u){var d=this.cache.get(l);return d&&this.createFromHTML(d,u),this},createFromHTML:function(l,u){u===void 0&&(u="div"),this.removeElement();var d=document.createElement(u);return this.node=d,d.style.zIndex="0",d.style.display="inline",d.style.position="absolute",d.phaser=this,this.parent.appendChild(d),d.innerHTML=l,this.updateSize()},removeElement:function(){return this.node&&(e(this.node),this.node=null),this},updateSize:function(){var l=this.node;return this.width=l.clientWidth,this.height=l.clientHeight,this.displayWidth=this.width*this.scaleX,this.displayHeight=this.height*this.scaleY,this},getChildByProperty:function(l,u){if(this.node){for(var d=this.node.querySelectorAll("*"),f=0;f<d.length;f++)if(d[f][l]===u)return d[f]}return null},getChildByID:function(l){return this.getChildByProperty("id",l)},getChildByName:function(l){return this.getChildByProperty("name",l)},setClassName:function(l){return this.node&&(this.node.className=l,this.updateSize()),this},setText:function(l){return this.node&&(this.node.innerText=l,this.updateSize()),this},setHTML:function(l){return this.node&&(this.node.innerHTML=l,this.updateSize()),this},preRender:function(){var l=this.parentContainer,u=this.node;u&&l&&!l.willRender()&&(u.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(s.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(s.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(s.PRE_RENDER,this.preRender,this)}});c.exports=i},49381:(c,x,t)=>{/**
1392 * @author       Richard Davey <[email protected]>
1393 * @copyright    2013-2025 Phaser Studio Inc.
1394 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1395 */var o=t(47407),p=t(95643),a=t(61340),n=new a,r=new a,e=new a,s=function(h,i,l,u){if(i.node){var d=i.node.style,f=i.scene.sys.settings;if(!d||!f.visible||p.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&l.id||i.parentContainer&&!i.parentContainer.willRender()){d.display="none";return}var v=i.parentContainer,m=l.alpha*i.alpha;v&&(m*=v.alpha);var y=n,g=r,T=e,S=0,E=0,M="0%",F="0%";u?(S=i.width*i.scaleX*i.originX,E=i.height*i.scaleY*i.originY,g.applyITRS(i.x-S,i.y-E,i.rotation,i.scaleX,i.scaleY),y.copyFrom(l.matrix),y.multiplyWithOffset(u,-l.scrollX*i.scrollFactorX,-l.scrollY*i.scrollFactorY),g.e=i.x-S,g.f=i.y-E,y.multiply(g,T)):(S=i.width*i.originX,E=i.height*i.originY,g.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),y.copyFrom(l.matrix),M=100*i.originX+"%",F=100*i.originY+"%",g.e-=l.scrollX*i.scrollFactorX,g.f-=l.scrollY*i.scrollFactorY,y.multiply(g,T),T.e-=S,T.f-=E),i.transformOnly||(d.display="block",d.opacity=m,d.zIndex=i._depth,d.pointerEvents=i.pointerEvents,d.mixBlendMode=o[i._blendMode]),d.transform=T.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",d.transformOrigin=M+" "+F}};c.exports=s},2611:(c,x,t)=>{/**
1396 * @author       Richard Davey <[email protected]>
1397 * @copyright    2013-2025 Phaser Studio Inc.
1398 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1399 */var o=t(3069),p=t(39429);p.register("dom",function(a,n,r,e,s){var h=new o(this.scene,a,n,r,e,s);return this.displayList.add(h),h})},441:(c,x,t)=>{/**
1400 * @author       Richard Davey <[email protected]>
1401 * @copyright    2013-2025 Phaser Studio Inc.
1402 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1403 */var o=t(29747),p=o,a=o;p=t(49381),a=t(49381),c.exports={renderWebGL:p,renderCanvas:a}},62980:c=>{/**
1404 * @author       Richard Davey <[email protected]>
1405 * @copyright    2013-2025 Phaser Studio Inc.
1406 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1407 */c.exports="addedtoscene"},41337:c=>{/**
1408 * @author       Richard Davey <[email protected]>
1409 * @copyright    2013-2025 Phaser Studio Inc.
1410 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1411 */c.exports="destroy"},44947:c=>{/**
1412 * @author       Richard Davey <[email protected]>
1413 * @copyright    2013-2025 Phaser Studio Inc.
1414 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1415 */c.exports="removedfromscene"},49358:c=>{/**
1416 * @author       Richard Davey <[email protected]>
1417 * @copyright    2013-2025 Phaser Studio Inc.
1418 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1419 */c.exports="complete"},35163:c=>{/**
1420 * @author       Richard Davey <[email protected]>
1421 * @copyright    2013-2025 Phaser Studio Inc.
1422 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1423 */c.exports="created"},97249:c=>{/**
1424 * @author       Richard Davey <[email protected]>
1425 * @copyright    2013-2025 Phaser Studio Inc.
1426 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1427 */c.exports="error"},19483:c=>{/**
1428 * @author       Richard Davey <[email protected]>
1429 * @copyright    2013-2025 Phaser Studio Inc.
1430 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1431 */c.exports="locked"},56059:c=>{/**
1432 * @author       Richard Davey <[email protected]>
1433 * @copyright    2013-2025 Phaser Studio Inc.
1434 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1435 */c.exports="loop"},26772:c=>{/**
1436 * @author       Richard Davey <[email protected]>
1437 * @copyright    2013-2025 Phaser Studio Inc.
1438 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1439 */c.exports="metadata"},64437:c=>{/**
1440 * @author       Richard Davey <[email protected]>
1441 * @copyright    2013-2025 Phaser Studio Inc.
1442 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1443 */c.exports="playing"},83411:c=>{/**
1444 * @author       Richard Davey <[email protected]>
1445 * @copyright    2013-2025 Phaser Studio Inc.
1446 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1447 */c.exports="play"},75780:c=>{/**
1448 * @author       Richard Davey <[email protected]>
1449 * @copyright    2013-2025 Phaser Studio Inc.
1450 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1451 */c.exports="seeked"},67799:c=>{/**
1452 * @author       Richard Davey <[email protected]>
1453 * @copyright    2013-2025 Phaser Studio Inc.
1454 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1455 */c.exports="seeking"},63500:c=>{/**
1456 * @author       Richard Davey <[email protected]>
1457 * @copyright    2013-2025 Phaser Studio Inc.
1458 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1459 */c.exports="stalled"},55541:c=>{/**
1460 * @author       Richard Davey <[email protected]>
1461 * @copyright    2013-2025 Phaser Studio Inc.
1462 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1463 */c.exports="stop"},53208:c=>{/**
1464 * @author       Richard Davey <[email protected]>
1465 * @copyright    2013-2025 Phaser Studio Inc.
1466 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1467 */c.exports="textureready"},4992:c=>{/**
1468 * @author       Richard Davey <[email protected]>
1469 * @copyright    2013-2025 Phaser Studio Inc.
1470 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1471 */c.exports="unlocked"},12:c=>{/**
1472 * @author       Richard Davey <[email protected]>
1473 * @copyright    2013-2025 Phaser Studio Inc.
1474 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1475 */c.exports="unsupported"},51708:(c,x,t)=>{/**
1476 * @author       Richard Davey <[email protected]>
1477 * @copyright    2013-2025 Phaser Studio Inc.
1478 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1479 */c.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
1479(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}},42421:(c,x,t)=>{/**
1480 * @author       Richard Davey <[email protected]>
1481 * @copyright    2013-2025 Phaser Studio Inc.
1482 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1483 */var o=t(83419),p=t(31401),a=t(95643),n=t(64993),r=new o({Extends:a,Mixins:[p.Alpha,p.BlendMode,p.Depth,p.Flip,p.Origin,p.ScrollFactor,p.Size,p.Texture,p.Tint,p.Transform,p.Visible,n],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(){}});c.exports=r},70217:()=>{},56315:(c,x,t)=>{/**
1484 * @author       Richard Davey <[email protected]>
1485 * @copyright    2013-2025 Phaser Studio Inc.
1486 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1487 */var o=t(42421),p=t(39429);p.register("extern",function(){var a=new o(this.scene);return this.displayList.add(a),a})},64993:(c,x,t)=>{/**
1488 * @author       Richard Davey <[email protected]>
1489 * @copyright    2013-2025 Phaser Studio Inc.
1490 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1491 */var o=t(29747),p=o,a=o;p=t(80287),a=t(70217),c.exports={renderWebGL:p,renderCanvas:a}},80287:(c,x,t)=>{/**
1492 * @author       Richard Davey <[email protected]>
1493 * @copyright    2013-2025 Phaser Studio Inc.
1494 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1495 */var o=t(91296),p=function(a,n,r,e){a.pipelines.clear();var s=o(n,r,e).calc;n.render.call(n,a,r,s),a.pipelines.rebind()};c.exports=p},85592:c=>{/**
1496 * @author       Richard Davey <[email protected]>
1497 * @copyright    2013-2025 Phaser Studio Inc.
1498 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1499 */c.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:(c,x,t)=>{/**
1500 * @author       Richard Davey <[email protected]>
1501 * @copyright    2013-2025 Phaser Studio Inc.
1502 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1503 */var o=t(71911),p=t(83419),a=t(85592),n=t(31401),r=t(8497),e=t(95643),s=t(95540),h=t(35154),i=t(36383),l=t(84503),u=new p({Extends:e,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.PostPipeline,n.Transform,n.Visible,n.ScrollFactor,l],initialize:function(f,v){var m=h(v,"x",0),y=h(v,"y",0);e.call(this,f,"Graphics"),this.setPosition(m,y),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(d){return h(d,"lineStyle",null)&&(this.defaultStrokeWidth=h(d,"lineStyle.width",1),this.defaultStrokeColor=h(d,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(d,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(d,"fillStyle",null)&&(this.defaultFillColor=h(d,"fillStyle.color",16777215),this.defaultFillAlpha=h(d,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(d,f,v){return v===void 0&&(v=1),this.commandBuffer.push(a.LINE_STYLE,d,f,v),this._lineWidth=d,this},fillStyle:function(d,f){return f===void 0&&(f=1),this.commandBuffer.push(a.FILL_STYLE,d,f),this},fillGradientStyle:function(d,f,v,m,y,g,T,S){return y===void 0&&(y=1),g===void 0&&(g=y),T===void 0&&(T=y),S===void 0&&(S=y),this.commandBuffer.push(a.GRADIENT_FILL_STYLE,y,g,T,S,d,f,v,m),this},lineGradientStyle:function(d,f,v,m,y,g){return g===void 0&&(g=1),this.commandBuffer.push(a.GRADIENT_LINE_STYLE,d,g,f,v,m,y),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(d){return this.fillCircle(d.x,d.y,d.radius)},strokeCircleShape:function(d){return this.strokeCircle(d.x,d.y,d.radius)},fillCircle:function(d,f,v){return this.beginPath(),this.arc(d,f,v,0,i.PI2),this.fillPath(),this},strokeCircle:function(d,f,v){return this.beginPath(),this.arc(d,f,v,0,i.PI2),this.strokePath(),this},fillRectShape:function(d){return this.fillRect(d.x,d.y,d.width,d.height)},strokeRectShape:function(d){return this.strokeRect(d.x,d.y,d.width,d.height)},fillRect:function(d,f,v,m){return this.commandBuffer.push(a.FILL_RECT,d,f,v,m),this},strokeRect:function(d,f,v,m){var y=this._lineWidth/2,g=d-y,T=d+y;return this.beginPath(),this.moveTo(d,f),this.lineTo(d,f+m),this.strokePath(),this.beginPath(),this.moveTo(d+v,f),this.lineTo(d+v,f+m),this.strokePath(),this.beginPath(),this.moveTo(g,f),this.lineTo(T+v,f),this.strokePath(),this.beginPath(),this.moveTo(g,f+m),this.lineTo(T+v,f+m),this.strokePath(),this},fillRoundedRect:function(d,f,v,m,y){y===void 0&&(y=20);var g=y,T=y,S=y,E=y;typeof y!="number"&&(g=s(y,"tl",20),T=s(y,"tr",20),S=s(y,"bl",20),E=s(y,"br",20));var M=g>=0,F=T>=0,A=S>=0,P=E>=0;return g=Math.abs(g),T=Math.abs(T),S=Math.abs(S),E=Math.abs(E),this.beginPath(),this.moveTo(d+g,f),this.lineTo(d+v-T,f),F?this.arc(d+v-T,f+T,T,-i.TAU,0):this.arc(d+v,f,T,Math.PI,i.TAU,!0),this.lineTo(d+v,f+m-E),P?this.arc(d+v-E,f+m-E,E,0,i.TAU):this.arc(d+v,f+m,E,-i.TAU,Math.PI,!0),this.lineTo(d+S,f+m),A?this.arc(d+S,f+m-S,S,i.TAU,Math.PI):this.arc(d,f+m,S,0,-i.TAU,!0),this.lineTo(d,f+g),M?this.arc(d+g,f+g,g,-Math.PI,-i.TAU):this.arc(d,f,g,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(d,f,v,m,y){y===void 0&&(y=20);var g=y,T=y,S=y,E=y,M=Math.min(v,m)/2;typeof y!="number"&&(g=s(y,"tl",20),T=s(y,"tr",20),S=s(y,"bl",20),E=s(y,"br",20));var F=g>=0,A=T>=0,P=S>=0,L=E>=0;return g=Math.min(Math.abs(g),M),T=Math.min(Math.abs(T),M),S=Math.min(Math.abs(S),M),E=Math.min(Math.abs(E),M),this.beginPath(),this.moveTo(d+g,f),this.lineTo(d+v-T,f),this.moveTo(d+v-T,f),A?this.arc(d+v-T,f+T,T,-i.TAU,0):this.arc(d+v,f,T,Math.PI,i.TAU,!0),this.lineTo(d+v,f+m-E),this.moveTo(d+v,f+m-E),L?this.arc(d+v-E,f+m-E,E,0,i.TAU):this.arc(d+v,f+m,E,-i.TAU,Math.PI,!0),this.lineTo(d+S,f+m),this.moveTo(d+S,f+m),P?this.arc(d+S,f+m-S,S,i.TAU,Math.PI):this.arc(d,f+m,S,0,-i.TAU,!0),this.lineTo(d,f+g),this.moveTo(d,f+g),F?this.arc(d+g,f+g,g,-Math.PI,-i.TAU):this.arc(d,f,g,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(d,f){return this.fillPoint(d.x,d.y,f)},fillPoint:function(d,f,v){return!v||v<1?v=1:(d-=v/2,f-=v/2),this.commandBuffer.push(a.FILL_RECT,d,f,v,v),this},fillTriangleShape:function(d){return this.fillTriangle(d.x1,d.y1,d.x2,d.y2,d.x3,d.y3)},strokeTriangleShape:function(d){return this.strokeTriangle(d.x1,d.y1,d.x2,d.y2,d.x3,d.y3)},fillTriangle:function(d,f,v,m,y,g){return this.commandBuffer.push(a.FILL_TRIANGLE,d,f,v,m,y,g),this},strokeTriangle:function(d,f,v,m,y,g){return this.commandBuffer.push(a.STROKE_TRIANGLE,d,f,v,m,y,g),this},strokeLineShape:function(d){return this.lineBetween(d.x1,d.y1,d.x2,d.y2)},lineBetween:function(d,f,v,m){return this.beginPath(),this.moveTo(d,f),this.lineTo(v,m),this.strokePath(),this},lineTo:function(d,f){return this.commandBuffer.push(a.LINE_TO,d,f),this},moveTo:function(d,f){return this.commandBuffer.push(a.MOVE_TO,d,f),this},strokePoints:function(d,f,v,m){f===void 0&&(f=!1),v===void 0&&(v=!1),m===void 0&&(m=d.length),this.beginPath(),this.moveTo(d[0].x,d[0].y);for(var y=1;y<m;y++)this.lineTo(d[y].x,d[y].y);return f&&this.lineTo(d[0].x,d[0].y),v&&this.closePath(),this.strokePath(),this},fillPoints:function(d,f,v,m){f===void 0&&(f=!1),v===void 0&&(v=!1),m===void 0&&(m=d.length),this.beginPath(),this.moveTo(d[0].x,d[0].y);for(var y=1;y<m;y++)this.lineTo(d[y].x,d[y].y);return f&&this.lineTo(d[0].x,d[0].y),v&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(d,f){f===void 0&&(f=32);var v=d.getPoints(f);return this.strokePoints(v,!0)},strokeEllipse:function(d,f,v,m,y){y===void 0&&(y=32);var g=new r(d,f,v,m),T=g.getPoints(y);return this.strokePoints(T,!0)},fillEllipseShape:function(d,f){f===void 0&&(f=32);var v=d.getPoints(f);return this.fillPoints(v,!0)},fillEllipse:function(d,f,v,m,y){y===void 0&&(y=32);var g=new r(d,f,v,m),T=g.getPoints(y);return this.fillPoints(T,!0)},arc:function(d,f,v,m,y,g,T){return g===void 0&&(g=!1),T===void 0&&(T=0),this.commandBuffer.push(a.ARC,d,f,v,m,y,g,T),this},slice:function(d,f,v,m,y,g,T){return g===void 0&&(g=!1),T===void 0&&(T=0),this.commandBuffer.push(a.BEGIN_PATH),this.commandBuffer.push(a.MOVE_TO,d,f),this.commandBuffer.push(a.ARC,d,f,v,m,y,g,T),this.commandBuffer.push(a.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(a.SAVE),this},restore:function(){return this.commandBuffer.push(a.RESTORE),this},translateCanvas:function(d,f){return this.commandBuffer.push(a.TRANSLATE,d,f),this},scaleCanvas:function(d,f){return this.commandBuffer.push(a.SCALE,d,f),this},rotateCanvas:function(d){return this.commandBuffer.push(a.ROTATE,d),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(d,f,v){var m=this.scene.sys,y=m.game.renderer;f===void 0&&(f=m.scale.width),v===void 0&&(v=m.scale.height),u.TargetCamera.setScene(this.scene),u.TargetCamera.setViewport(0,0,f,v),u.TargetCamera.scrollX=this.x,u.TargetCamera.scrollY=this.y;var g,T,S={willReadFrequently:!0};
1503if(typeof d=="string")if(m.textures.exists(d)){g=m.textures.get(d);var E=g.getSourceImage();E instanceof HTMLCanvasElement&&(T=E.getContext("2d",S))}else g=m.textures.createCanvas(d,f,v),T=g.getSourceImage().getContext("2d",S);else d instanceof HTMLCanvasElement&&(T=d.getContext("2d",S));return T&&(this.renderCanvas(y,this,u.TargetCamera,null,T,!1),g&&g.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});u.TargetCamera=new o,c.exports=u},32768:(c,x,t)=>{/**
1504 * @author       Richard Davey <[email protected]>
1505 * @copyright    2013-2025 Phaser Studio Inc.
1506 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1507 */var o=t(85592),p=t(20926),a=function(n,r,e,s,h,i){var l=r.commandBuffer,u=l.length,d=h||n.currentContext;if(!(u===0||!p(n,d,r,e,s))){e.addToRenderList(r);var f=1,v=1,m=0,y=0,g=1,T=0,S=0,E=0;d.beginPath();for(var M=0;M<u;++M){var F=l[M];switch(F){case o.ARC:d.arc(l[M+1],l[M+2],l[M+3],l[M+4],l[M+5],l[M+6]),M+=7;break;case o.LINE_STYLE:g=l[M+1],m=l[M+2],f=l[M+3],T=(m&16711680)>>>16,S=(m&65280)>>>8,E=m&255,d.strokeStyle="rgba("+T+","+S+","+E+","+f+")",d.lineWidth=g,M+=3;break;case o.FILL_STYLE:y=l[M+1],v=l[M+2],T=(y&16711680)>>>16,S=(y&65280)>>>8,E=y&255,d.fillStyle="rgba("+T+","+S+","+E+","+v+")",M+=2;break;case o.BEGIN_PATH:d.beginPath();break;case o.CLOSE_PATH:d.closePath();break;case o.FILL_PATH:i||d.fill();break;case o.STROKE_PATH:i||d.stroke();break;case o.FILL_RECT:i?d.rect(l[M+1],l[M+2],l[M+3],l[M+4]):d.fillRect(l[M+1],l[M+2],l[M+3],l[M+4]),M+=4;break;case o.FILL_TRIANGLE:d.beginPath(),d.moveTo(l[M+1],l[M+2]),d.lineTo(l[M+3],l[M+4]),d.lineTo(l[M+5],l[M+6]),d.closePath(),i||d.fill(),M+=6;break;case o.STROKE_TRIANGLE:d.beginPath(),d.moveTo(l[M+1],l[M+2]),d.lineTo(l[M+3],l[M+4]),d.lineTo(l[M+5],l[M+6]),d.closePath(),i||d.stroke(),M+=6;break;case o.LINE_TO:d.lineTo(l[M+1],l[M+2]),M+=2;break;case o.MOVE_TO:d.moveTo(l[M+1],l[M+2]),M+=2;break;case o.LINE_FX_TO:d.lineTo(l[M+1],l[M+2]),M+=5;break;case o.MOVE_FX_TO:d.moveTo(l[M+1],l[M+2]),M+=5;break;case o.SAVE:d.save();break;case o.RESTORE:d.restore();break;case o.TRANSLATE:d.translate(l[M+1],l[M+2]),M+=2;break;case o.SCALE:d.scale(l[M+1],l[M+2]),M+=2;break;case o.ROTATE:d.rotate(l[M+1]),M+=1;break;case o.GRADIENT_FILL_STYLE:M+=5;break;case o.GRADIENT_LINE_STYLE:M+=6;break}}d.restore()}};c.exports=a},87079:(c,x,t)=>{/**
1508 * @author       Richard Davey <[email protected]>
1509 * @copyright    2013-2025 Phaser Studio Inc.
1510 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1511 */var o=t(44603),p=t(43831);o.register("graphics",function(a,n){a===void 0&&(a={}),n!==void 0&&(a.add=n);var r=new p(this.scene,a);return a.add&&this.scene.sys.displayList.add(r),r})},1201:(c,x,t)=>{/**
1512 * @author       Richard Davey <[email protected]>
1513 * @copyright    2013-2025 Phaser Studio Inc.
1514 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1515 */var o=t(43831),p=t(39429);p.register("graphics",function(a){return this.displayList.add(new o(this.scene,a))})},84503:(c,x,t)=>{/**
1516 * @author       Richard Davey <[email protected]>
1517 * @copyright    2013-2025 Phaser Studio Inc.
1518 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1519 */var o=t(29747),p=o,a=o;p=t(77545),a=t(32768),a=t(32768),c.exports={renderWebGL:p,renderCanvas:a}},77545:(c,x,t)=>{/**
1520 * @author       Richard Davey <[email protected]>
1521 * @copyright    2013-2025 Phaser Studio Inc.
1522 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1523 */var o=t(85592),p=t(91296),a=t(61340),n=t(70554),r=function(l,u,d){this.x=l,this.y=u,this.width=d},e=function(l,u,d){this.points=[],this.pointsLength=1,this.points[0]=new r(l,u,d)},s=[],h=new a,i=function(l,u,d,f){if(u.commandBuffer.length!==0){d.addToRenderList(u);var v=l.pipelines.set(u.pipeline,u);l.pipelines.preBatch(u);for(var m=p(u,d,f).calc,y=h.loadIdentity(),g=u.commandBuffer,T=d.alpha*u.alpha,S=1,E=v.fillTint,M=v.strokeTint,F=0,A=0,P=0,L=.01,O=Math.PI*2,G,z=[],Y=0,X=!0,I=null,U=n.getTintAppendFloatAlpha,D=0;D<g.length;D++)switch(G=g[D],G){case o.BEGIN_PATH:{z.length=0,I=null,X=!0;break}case o.CLOSE_PATH:{X=!1,I&&I.points.length&&I.points.push(I.points[0]);break}case o.FILL_PATH:{for(Y=0;Y<z.length;Y++)v.batchFillPath(z[Y].points,y,m);break}case o.STROKE_PATH:{for(Y=0;Y<z.length;Y++)v.batchStrokePath(z[Y].points,S,X,y,m);break}case o.LINE_STYLE:{S=g[++D];var V=g[++D],B=g[++D]*T,W=U(V,B);M.TL=W,M.TR=W,M.BL=W,M.BR=W;break}case o.FILL_STYLE:{var K=g[++D],J=g[++D]*T,Z=U(K,J);E.TL=Z,E.TR=Z,E.BL=Z,E.BR=Z;break}case o.GRADIENT_FILL_STYLE:{var j=g[++D]*T,k=g[++D]*T,_=g[++D]*T,q=g[++D]*T;E.TL=U(g[++D],j),E.TR=U(g[++D],k),E.BL=U(g[++D],_),E.BR=U(g[++D],q);break}case o.GRADIENT_LINE_STYLE:{S=g[++D];var et=g[++D]*T;M.TL=U(g[++D],et),M.TR=U(g[++D],et),M.BL=U(g[++D],et),M.BR=U(g[++D],et);break}case o.ARC:{var nt=0,tt=g[++D],ot=g[++D],ht=g[++D],lt=g[++D],it=g[++D],rt=g[++D],at=g[++D];for(it-=lt,rt?it<-O?it=-O:it>0&&(it=-O+it%O):it>O?it=O:it<0&&(it=O+it%O),I===null&&(I=new e(tt+Math.cos(lt)*ht,ot+Math.sin(lt)*ht,S),z.pu
1523sh(I),nt+=L);nt<1+at;)P=it*nt+lt,F=tt+Math.cos(P)*ht,A=ot+Math.sin(P)*ht,I.points.push(new r(F,A,S)),nt+=L;P=it+lt,F=tt+Math.cos(P)*ht,A=ot+Math.sin(P)*ht,I.points.push(new r(F,A,S));break}case o.FILL_RECT:{v.batchFillRect(g[++D],g[++D],g[++D],g[++D],y,m);break}case o.FILL_TRIANGLE:{v.batchFillTriangle(g[++D],g[++D],g[++D],g[++D],g[++D],g[++D],y,m);break}case o.STROKE_TRIANGLE:{v.batchStrokeTriangle(g[++D],g[++D],g[++D],g[++D],g[++D],g[++D],S,y,m);break}case o.LINE_TO:{I!==null?I.points.push(new r(g[++D],g[++D],S)):(I=new e(g[++D],g[++D],S),z.push(I));break}case o.MOVE_TO:{I=new e(g[++D],g[++D],S),z.push(I);break}case o.SAVE:{s.push(y.copyToArray());break}case o.RESTORE:{y.copyFromArray(s.pop());break}case o.TRANSLATE:{tt=g[++D],ot=g[++D],y.translate(tt,ot);break}case o.SCALE:{tt=g[++D],ot=g[++D],y.scale(tt,ot);break}case o.ROTATE:{y.rotate(g[++D]);break}}l.pipelines.postBatch(u)}};c.exports=i},26479:(c,x,t)=>{/**
1524 * @author       Richard Davey <[email protected]>
1525 * @copyright    2013-2025 Phaser Studio Inc.
1526 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1527 */var o=t(61061),p=t(83419),a=t(51708),n=t(50792),r=t(46710),e=t(95540),s=t(35154),h=t(97022),i=t(41212),l=t(88492),u=t(35072),d=t(68287),f=new p({Extends:n,initialize:function(m,y,g){n.call(this),g?y&&!Array.isArray(y)&&(y=[y]):Array.isArray(y)?i(y[0])&&(g=y,y=null):i(y)&&(g=y,y=null),this.scene=m,this.children=new u,this.isParent=!0,this.type="Group",this.classType=e(g,"classType",d),this.name=e(g,"name",""),this.active=e(g,"active",!0),this.maxSize=e(g,"maxSize",-1),this.defaultKey=e(g,"defaultKey",null),this.defaultFrame=e(g,"defaultFrame",null),this.runChildUpdate=e(g,"runChildUpdate",!1),this.createCallback=e(g,"createCallback",null),this.removeCallback=e(g,"removeCallback",null),this.createMultipleCallback=e(g,"createMultipleCallback",null),this.internalCreateCallback=e(g,"internalCreateCallback",null),this.internalRemoveCallback=e(g,"internalRemoveCallback",null),y&&this.addMultiple(y),g&&this.createMultiple(g),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,m,y,g,T,S){if(v===void 0&&(v=0),m===void 0&&(m=0),y===void 0&&(y=this.defaultKey),g===void 0&&(g=this.defaultFrame),T===void 0&&(T=!0),S===void 0&&(S=!0),this.isFull())return null;var E=new this.classType(this.scene,v,m,y,g);return E.addToDisplayList(this.scene.sys.displayList),E.addToUpdateList(),E.visible=T,E.setActive(S),this.add(E),E},createMultiple:function(v){if(this.isFull())return[];Array.isArray(v)||(v=[v]);var m=[];if(v[0].key)for(var y=0;y<v.length;y++){var g=this.createFromConfig(v[y]);m=m.concat(g)}return m},createFromConfig:function(v){if(this.isFull())return[];this.classType=e(v,"classType",this.classType);var m=e(v,"key",void 0),y=e(v,"frame",null),g=e(v,"visible",!0),T=e(v,"active",!0),S=[];if(m===void 0)return S;Array.isArray(m)||(m=[m]),Array.isArray(y)||(y=[y]);var E=e(v,"repeat",0),M=e(v,"randomKey",!1),F=e(v,"randomFrame",!1),A=e(v,"yoyo",!1),P=e(v,"quantity",!1),L=e(v,"frameQuantity",1),O=e(v,"max",0),G=l(m,y,{max:O,qty:P||L,random:M,randomB:F,repeat:E,yoyo:A});v.createCallback&&(this.createCallback=v.createCallback),v.removeCallback&&(this.removeCallback=v.removeCallback),v.internalCreateCallback&&(this.internalCreateCallback=v.internalCreateCallback),v.internalRemoveCallback&&(this.internalRemoveCallback=v.internalRemoveCallback);for(var z=0;z<G.length;z++){var Y=this.create(0,0,G[z].a,G[z].b,g,T);if(!Y)break;S.push(Y)}if(h(v,"setXY")){var X=s(v,"setXY.x",0),I=s(v,"setXY.y",0),U=s(v,"setXY.stepX",0),D=s(v,"setXY.stepY",0);o.SetXY(S,X,I,U,D)}if(h(v,"setRotation")){var V=s(v,"setRotation.value",0),B=s(v,"setRotation.step",0);o.SetRotation(S,V,B)}if(h(v,"setScale")){var W=s(v,"setScale.x",1),K=s(v,"setScale.y",W),J=s(v,"setScale.stepX",0),Z=s(v,"setScale.stepY",0);o.SetScale(S,W,K,J,Z)}if(h(v,"setOrigin")){var j=s(v,"setOrigin.x",.5),k=s(v,"setOrigin.y",j),_=s(v,"setOrigin.stepX",0),q=s(v,"setOrigin.stepY",0);o.SetOrigin(S,j,k,_,q)}if(h(v,"setAlpha")){var et=s(v,"setAlpha.value",1),nt=s(v,"setAlpha.step",0);o.SetAlpha(S,et,nt)}if(h(v,"setDepth")){var tt=s(v,"setDepth.value",0),ot=s(v,"setDepth.step",0);o.SetDepth(S,tt,ot)}if(h(v,"setScrollFactor")){var ht=s(v,"setScrollFactor.x",1),lt=s(v,"setScrollFactor.y",ht),it=s(v,"setScrollFactor.stepX",0),rt=s(v,"setScrollFactor.stepY",0);o.SetScrollFactor(S,ht,lt,it,rt)}var at=e(v,"hitArea",null),ct=e(v,"hitAreaCallback",null);at&&o.SetHitArea(S,at,ct);var Tt=e(v,"gridAlign",!1);return Tt&&o.GridAlign(S,Tt),this.createMultipleCallback&&this.createMultipleCallback.call(this,S),S},preUpdate:function(v,m){if(!(!this.runChildUpdate||this.children.size===0))for(var y=this.children.entries.slice(),g=0;g<y.length;g++){var T=y[g];T.active&&T.update(v,m)}},add:function(v,m){return m===void 0&&(m=!1),this.isFull()?this:(this.children.set(v),this.internalCreateCallback&&this.internalCreateCallback.call(this,v),this.createCallback&&this.createCallback.call(this,v),m&&(v.addToDisplayList(this.scene.sys.displayList),v.addToUpdateList()),v.on(a.DESTROY,this.remove,this),this)},addMultiple:function(v,m){if(m===void 0&&(m=!1),Array.isArray(v))for(var y=0;y<v.length;y++)this.add(v[y],m);return this},remove:function(v,m,y){return m===void 0&&(m=!1),y===void 0&&(y=!1),this.children.contains(v)?(this.children.delete(v),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,v),this.removeCallback&&this.removeCallback.call(this,v),v.off(a.DESTROY,this.remove,this),y?v.destroy():m&&(v.removeFromDisplayList(),v.removeFromUpdateList()),this):this},clear:function(v,m){v===void 0&&(v=!1),m===void 0&&(m=!1);for(var y=this.children,g=0;g<y.size;g++){var T=y.entries[g];T.off(a.DESTROY,this.remove,this),m?T.destroy():v&&(T.removeFromDisplayList(),T.removeFromUpdateList())}return this.children.clear(),this},contains:function(v){return this.children.contains(v)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(v,m,y,g){return r(this.children.entries,v,m,y,g)},getFirst:function(v,m,y,g,T,S,E){return this.getHandler(!0,1,v,m,y,g,T,S,E)},getFirstNth:function(v,m,y,g,T,S,E,M){return this.getHandler(!0,v,m,y,g,T,S,E,M)},getLast:function(v,m,y,g,T,S,E){return this.getHandler(!1,1,v,m,y,g,T,S,E)},getLastNth:function(v,m,y,g,T,S,E,M){return this.getHandler(!1,v,m,y,g,T,S,E,M)},getHandler:function(v,m,y,g,T,S,E,M,F){y===void 0&&(y=!1),g===void 0&&(g=!1);var A,P,L=0,O=this.children.entries;if(v)for(P=0;P<O.length;P++)if(A=O[P],A.active===y){if(L++,L===m)break}else A=null;else for(P=O.length-1;P>=0;P--)if(A=O[P],A.active===y){if(L++,L===m)break}else A=null;return A?(typeof T=="number"&&(A.x=T),typeof S=="number"&&(A.y=S),A):g?this.create(T,S,E,M,F):null},get:function(v,m,y,g,T){return this.getFirst(!1,!0,v,m,y,g,T)},getFirstAlive:function(v,m,y,g,T,S){return this.getFirst(!0,v,m,y,g,T,S)},getFirstDead:function(v,m,y,g,T,S){return this.getFirst(!1,v,m,y,g,T,S)},playAnimation:function(v,m){return o.PlayAnimation(this.children.entries,v,m),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(v){v===void 0&&(v=!0);for(var m=0,y=0;y<this.children.size;y++)this.children.entries[y].active===v&&m++;return m},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var v=this.getTotalUsed(),m=this.maxSize===-1?999999999999:this.maxSize;return m-v},setActive:function(v){return this.active=v,this},setName:function(v){return this.name=v,this},propertyValueSet:function(v,m,y,g,T){return o.PropertyValueSet(this.children.entries,v,m,y,g,T),this},propertyValueInc:function(v,m,y,g,T){return o.PropertyValueInc(this.children.entries,v,m,y,g,T),this},setX:function(v,m){return o.SetX(this.children.entries,v,m),this},setY:function(v,m){return o.SetY(this.children.entries,v,m),this},setXY:function(v,m,y,g){return o.SetXY(this.children.entries,v,m,y,g),this},incX:function(v,m){return o.IncX(this.children.entries,v,m),this},incY:function(v,m){return o.IncY(this.children.entries,v,m),this},incXY:function(v,m,y,g){return o.IncXY(this.children.entries,v,m,y,g),this},shiftPosition:function(v,m,y){return o.ShiftPosition(this.children.entries,v,m,y),this},angle:function(v,m){return o.Angle(this.children.entries,v,m),this},rotate:function(v,m){return o.Rotate(this.children.entries,v,m),this}
1527,rotateAround:function(v,m){return o.RotateAround(this.children.entries,v,m),this},rotateAroundDistance:function(v,m,y){return o.RotateAroundDistance(this.children.entries,v,m,y),this},setAlpha:function(v,m){return o.SetAlpha(this.children.entries,v,m),this},setTint:function(v,m,y,g){return o.SetTint(this.children.entries,v,m,y,g),this},setOrigin:function(v,m,y,g){return o.SetOrigin(this.children.entries,v,m,y,g),this},scaleX:function(v,m){return o.ScaleX(this.children.entries,v,m),this},scaleY:function(v,m){return o.ScaleY(this.children.entries,v,m),this},scaleXY:function(v,m,y,g){return o.ScaleXY(this.children.entries,v,m,y,g),this},setDepth:function(v,m){return o.SetDepth(this.children.entries,v,m),this},setBlendMode:function(v){return o.SetBlendMode(this.children.entries,v),this},setHitArea:function(v,m){return o.SetHitArea(this.children.entries,v,m),this},shuffle:function(){return o.Shuffle(this.children.entries),this},kill:function(v){this.children.contains(v)&&v.setActive(!1)},killAndHide:function(v){this.children.contains(v)&&(v.setActive(!1),v.setVisible(!1))},setVisible:function(v,m,y){return o.SetVisible(this.children.entries,v,m,y),this},toggleVisible:function(){return o.ToggleVisible(this.children.entries),this},destroy:function(v,m){v===void 0&&(v=!1),m===void 0&&(m=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(a.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(m,v),this.scene=void 0,this.children=void 0)}});c.exports=f},94975:(c,x,t)=>{/**
1528 * @author       Richard Davey <[email protected]>
1529 * @copyright    2013-2025 Phaser Studio Inc.
1530 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1531 */var o=t(44603),p=t(26479);o.register("group",function(a){return new p(this.scene,null,a)})},3385:(c,x,t)=>{/**
1532 * @author       Richard Davey <[email protected]>
1533 * @copyright    2013-2025 Phaser Studio Inc.
1534 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1535 */var o=t(26479),p=t(39429);p.register("group",function(a,n){return this.updateList.add(new o(this.scene,a,n))})},88571:(c,x,t)=>{/**
1536 * @author       Richard Davey <[email protected]>
1537 * @copyright    2013-2025 Phaser Studio Inc.
1538 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1539 */var o=t(83419),p=t(31401),a=t(95643),n=t(59819),r=new o({Extends:a,Mixins:[p.Alpha,p.BlendMode,p.Depth,p.Flip,p.GetBounds,p.Mask,p.Origin,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Size,p.TextureCrop,p.Tint,p.Transform,p.Visible,n],initialize:function(s,h,i,l,u){a.call(this,s,"Image"),this._crop=this.resetCropObject(),this.setTexture(l,u),this.setPosition(h,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=r},40652:c=>{/**
1540 * @author       Richard Davey <[email protected]>
1541 * @copyright    2013-2025 Phaser Studio Inc.
1542 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1543 */var x=function(t,o,p,a){p.addToRenderList(o),t.batchSprite(o,o.frame,p,a)};c.exports=x},82459:(c,x,t)=>{/**
1544 * @author       Richard Davey <[email protected]>
1545 * @copyright    2013-2025 Phaser Studio Inc.
1546 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1547 */var o=t(25305),p=t(44603),a=t(23568),n=t(88571);p.register("image",function(r,e){r===void 0&&(r={});var s=a(r,"key",null),h=a(r,"frame",null),i=new n(this.scene,0,0,s,h);return e!==void 0&&(r.add=e),o(this.scene,i,r),i})},2117:(c,x,t)=>{/**
1548 * @author       Richard Davey <[email protected]>
1549 * @copyright    2013-2025 Phaser Studio Inc.
1550 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1551 */var o=t(88571),p=t(39429);p.register("image",function(a,n,r,e){return this.displayList.add(new o(this.scene,a,n,r,e))})},59819:(c,x,t)=>{/**
1552 * @author       Richard Davey <[email protected]>
1553 * @copyright    2013-2025 Phaser Studio Inc.
1554 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1555 */var o=t(29747),p=o,a=o;p=t(99517),a=t(40652),c.exports={renderWebGL:p,renderCanvas:a}},99517:c=>{/**
1556 * @author       Richard Davey <[email protected]>
1557 * @copyright    2013-2025 Phaser Studio Inc.
1558 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1559 */var x=function(t,o,p,a){p.addToRenderList(o),this.pipeline.batchSprite(o,p,a)};c.exports=x}
vendor: 5,286 bytes, lines 1559-1567
1559,77856:(c,x,t)=>{/**
1560 * @author       Richard Davey <[email protected]>
1561 * @copyright    2013-2025 Phaser Studio Inc.
1562 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1563 */var o={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)}};o.Shader=t(20071),o.Mesh=t(4703),o.NineSlice=t(28103),o.PointLight=t(80321),o.Plane=t(33663),o.Factories.Shader=t(74177),o.Factories.Mesh=t(9225),o.Factories.NineSlice=t(47521),o.Factories.PointLight=t(71255),o.Factories.Plane=t(30985),o.Creators.Shader=t(54935),o.Creators.Mesh=t(20527),o.Creators.NineSlice=t(28279),o.Creators.PointLight=t(39829),o.Creators.Plane=t(56015),o.Light=t(41432),o.LightsManager=t(61356),o.LightsPlugin=t(88992),c.exports=o},93595:(c,x,t)=>{/**
1564 * @author       Richard Davey <[email protected]>
1565 * @copyright    2013-2025 Phaser Studio Inc.
1566 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1567 */var o=t(10312),p=t(83419),a=t(31401),n=t(53774),r=t(45893),e=t(50792),s=t(51708),h=t(73162),i=t(33963),l=t(44594),u=t(19186),d=new p({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.PostPipeline,a.Visible,e,i],initialize:function(v,m){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(o.SKIP_CHECK),m&&this.add(m),v.sys.queueDepthSort()},setActive:function(f){return this.active=f,this},setName:function(f){return this.name=f,this},setState:function(f){return this.state=f,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(f,v){return this.data||(this.data=new r(this)),this.data.set(f,v),this},incData:function(f,v){return this.data||(this.data=new r(this)),this.data.inc(f,v),this},toggleData:function(f){return this.data||(this.data=new r(this)),this.data.toggle(f),this},getData:function(f){return this.data||(this.data=new r(this)),this.data.get(f)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(f){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&f.id)},getIndexList:function(){for(var f=this,v=this.parentContainer,m=[];v&&(m.unshift(v.getIndex(f)),f=v,v.parentContainer);)v=v.parentContainer;return m.unshift(this.displayList.getIndex(f)),m},addChildCallback:function(f){var v=f.displayList;v&&v!==this&&f.removeFromDisplayList(),f.displayList||(this.queueDepthSort(),f.displayList=this,f.emit(s.ADDED_TO_SCENE,f,this.scene),this.events.emit(l.ADDED_TO_SCENE,f,this.scene))},removeChildCallback:function(f){this.queueDepthSort(),f.displayList=null,f.emit(s.REMOVED_FROM_SCENE,f,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,f,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(u(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(f,v){return f._depth-v._depth},getChildren:function(){return this.list},addToDisplayList:function(f){return f===void 0&&(f=this.scene.sys.displayList),this.displayList&&this.displayList!==f&&this.removeFromDisplayList(),f.exists(this)||(this.displayList=f,f.add(this,!0),f.queueDepthSort(),this.emit
1567(s.ADDED_TO_SCENE,this,this.scene),f.events.emit(l.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var f=this.displayList||this.scene.sys.displayList;return f.exists(this)&&(f.remove(this,!0),f.queueDepthSort(),this.displayList=null,this.emit(s.REMOVED_FROM_SCENE,this,this.scene),f.events.emit(l.REMOVED_FROM_SCENE,this,this.scene)),this},getDisplayList:function(){var f=null;return this.parentContainer?f=this.parentContainer.list:this.displayList&&(f=this.displayList.list),f},destroy:function(f){if(!(!this.scene||this.ignoreDestroy)){this.emit(s.DESTROY,this);for(var v=this.list;v.length;)v[0].destroy(f);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}}});c.exports=d},2956:c=>{/**
1568 * @author       Richard Davey <[email protected]>
1569 * @copyright    2013-2025 Phaser Studio Inc.
1570 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1571 */var x=function(t,o,p){var a=o.list;if(a.length!==0){o.depthSort();var n=o.blendMode!==-1;n||t.setBlendMode(0);var r=o._alpha;o.mask&&o.mask.preRenderCanvas(t,null,p);for(var e=0;e<a.length;e++){var s=a[e];if(s.willRender(p)){var h=s.alpha;!n&&s.blendMode!==t.currentBlendMode&&t.setBlendMode(s.blendMode),s.setAlpha(h*r),s.renderCanvas(t,s,p),s.setAlpha(h)}}o.mask&&o.mask.postRenderCanvas(t)}};c.exports=x},25179:(c,x,t)=>{/**
1572 * @author       Richard Davey <[email protected]>
1573 * @copyright    2013-2025 Phaser Studio Inc.
1574 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1575 */var o=t(25305),p=t(93595),a=t(44603),n=t(23568);a.register("layer",function(r,e){r===void 0&&(r={});var s=n(r,"children",null),h=new p(this.scene,s);return e!==void 0&&(r.add=e),o(this.scene,h,r),h})},20005:(c,x,t)=>{/**
1576 * @author       Richard Davey <[email protected]>
1577 * @copyright    2013-2025 Phaser Studio Inc.
1578 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1579 */var o=t(93595),p=t(39429);p.register("layer",function(a){return this.displayList.add(new o(this.scene,a))})},33963:(c,x,t)=>{/**
1580 * @author       Richard Davey <[email protected]>
1581 * @copyright    2013-2025 Phaser Studio Inc.
1582 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1583 */var o=t(29747),p=o,a=o;p=t(15869),a=t(2956),c.exports={renderWebGL:p,renderCanvas:a}},15869:c=>{/**
1584 * @author       Richard Davey <[email protected]>
1585 * @copyright    2013-2025 Phaser Studio Inc.
1586 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1587 */var x=function(t,o,p){var a=o.list,n=a.length;if(n!==0){o.depthSort(),t.pipelines.preBatch(o);var r=o.blendMode!==-1;r||t.setBlendMode(0);for(var e=o.alpha,s=0;s<n;s++){var h=a[s];if(h.willRender(p)){var i,l,u,d;if(h.alphaTopLeft!==void 0)i=h.alphaTopLeft,l=h.alphaTopRight,u=h.alphaBottomLeft,d=h.alphaBottomRight;else{var f=h.alpha;i=f,l=f,u=f,d=f}!r&&h.blendMode!==t.currentBlendMode&&t.setBlendMode(h.blendMode);var v=h.mask;v&&v.preRenderWebGL(t,h,p);var m=h.type;m!==t.currentType&&(t.newType=!0,t.currentType=m),t.nextTypeMatch=s<n-1?a[s+1].type===t.currentType:!1,h.setAlpha(i*e,l*e,u*e,d*e),h.renderWebGL(t,h,p),h.setAlpha(i,l,u,d),v&&v.postRenderWebGL(t,p),t.newType=!1}}t.pipelines.postBatch(o)}};c.exports=x},41432:(c,x,t)=>{/**
1588 * @author       Richard Davey <[email protected]>
1589 * @copyright    2013-2025 Phaser Studio Inc.
1590 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1591 */var o=t(96503),p=t(83419),a=t(31401),n=t(51767),r=t(70554),e=new p({Extends:o,Mixins:[a.Origin,a.ScrollFactor,a.Visible],initialize:function(h,i,l,u,d,f,v){o.call(this,h,i,l),this.color=new n(u,d,f),this.intensity=v,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(l)},displayWidth:{get:function(){return this.diameter},set:function(s){this.diameter=s}},displayHeight:{get:function(){return this.diameter},set:function(s){this.diameter=s}
1591},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=r.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,c.exports=e},61356:(c,x,t)=>{/**
1592 * @author       Richard Davey <[email protected]>
1593 * @copyright    2013-2025 Phaser Studio Inc.
1594 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1595 */var o=t(81491),p=t(83419),a=t(20339),n=t(41432),r=t(80321),e=t(51767),s=t(19133),h=t(19186),i=t(70554),l=new p({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(u,d,f,v,m,y){return this.systems.displayList.add(new r(this.scene,u,d,f,v,m,y))},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(u){for(var d=this.lights,f=u.worldView,v=[],m=0;m<d.length;m++){var y=d[m];y.willRender(u)&&o(y,f)&&v.push({light:y,distance:a(y.x,y.y,f.centerX,f.centerY)})}return v.length>this.maxLights&&(h(v,this.sortByDistance),v=v.slice(0,this.maxLights)),this.visibleLights=v.length,v},sortByDistance:function(u,d){return u.distance>=d.distance},setAmbientColor:function(u){var d=i.getFloatsFromUintRGB(u);return this.ambientColor.set(d[0],d[1],d[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(u,d,f,v,m){u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=128),v===void 0&&(v=16777215),m===void 0&&(m=1);var y=i.getFloatsFromUintRGB(v),g=new n(u,d,f,y[0],y[1],y[2],m);return this.lights.push(g),g},removeLight:function(u){var d=this.lights.indexOf(u);return d>=0&&s(this.lights,d),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});c.exports=l},88992:(c,x,t)=>{/**
1596 * @author       Richard Davey <[email protected]>
1597 * @copyright    2013-2025 Phaser Studio Inc.
1598 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1599 */var o=t(83419),p=t(61356),a=t(37277),n=t(44594),r=new o({Extends:p,initialize:function(s){this.scene=s,this.systems=s.sys,s.sys.settings.isBooted||s.sys.events.once(n.BOOT,this.boot,this),p.call(this)},boot:function(){var e=this.systems.events;e.on(n.SHUTDOWN,this.shutdown,this),e.on(n.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});a.register("LightsPlugin",r,"lights"),c.exports=r},4703:(c,x,t)=>{/**
1600 * @author       Richard Davey <[email protected]>
1601 * @copyright    2013-2025 Phaser Studio Inc.
1602 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1603 */var o=t(83419),p=t(31401),a=t(39506),n=t(83997),r=t(95643),e=t(34684),s=t(92515),h=t(91296),i=t(37867),l=t(29807),u=t(43396),d=t(19186),f=t(25836),v=t(39318),m=new o({Extends:r,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Size,p.Texture,p.Transform,p.Visible,l],initialize:function(g,T,S,E,M,F,A,P,L,O,G,z){T===void 0&&(T=0),S===void 0&&(S=0),E===void 0&&(E="__WHITE"),r.call(this,g,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new f,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 Y=g.sys.renderer;this.setPosition(T,S),this.setTexture(E,M),this.setSize(Y.width,Y.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(Y.width,Y.height),F&&this.addVertices(F,A,P,L,O,G,z)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(y){return this.viewPosition.addScale(f.LEFT,y),this.dirtyCache[10]=1,this},panY:function(y){return this.viewPosition.y+=f.DOWN.y*y,this.dirtyCache[10]=1,this},panZ:function(y){return this.viewPosition.z+=y,this.dirtyCache[10]=1,this},setPerspective:function(y,g,T,S,E){return T===void 0&&(T=45),S===void 0&&(S=.01),E===void 0&&(E=1e3),this.fov=T,this.projectionMatrix.perspective(a(T),y/g,S,E),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(y,g,T,S){return y===void 0&&(y=this.scene.sys.renderer.getAspectRatio()),g===void 0&&(g=1),T===void 0&&(T=-1e3),S===void 0&&(S=1e3),this.fov=0,this.projectionMatrix.ortho(-y,y,-g,g,T,S),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this}
1603,clear:function(){return this.faces.forEach(function(y){y.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(y,g,T,S,E,M,F,A,P){var L=this.scene.sys.cache.obj.get(y),O;return L&&(O=e(L,this,g,T,S,E,M,F,A,P)),(!O||O.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",y),this},sortByDepth:function(y,g){return y.depth-g.depth},depthSort:function(){return d(this.faces,this.sortByDepth),this},addVertex:function(y,g,T,S,E,M,F){var A=new v(y,g,T,S,E,M,F);return this.vertices.push(A),A},addFace:function(y,g,T){var S=new n(y,g,T);return this.faces.push(S),this.dirtyCache[9]=-1,S},addVertices:function(y,g,T,S,E,M,F){var A=s(y,g,T,S,E,M,F);return A?(this.faces=this.faces.concat(A.faces),this.vertices=this.vertices.concat(A.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(y){return this.faces[y]},hasFaceAt:function(y,g,T){T===void 0&&(T=this.scene.sys.cameras.main);for(var S=h(this,T).calc,E=this.faces,M=0;M<E.length;M++){var F=E[M];if(F.contains(y,g,S))return!0}return!1},getFaceAt:function(y,g,T){T===void 0&&(T=this.scene.sys.cameras.main);for(var S=h(this,T).calc,E=this.faces,M=[],F=0;F<E.length;F++){var A=E[F];A.contains(y,g,S)&&M.push(A)}return d(M,this.sortByDepth)},setDebug:function(y,g){return this.debugGraphic=y,!y&&!g?this.debugCallback=null:g?this.debugCallback=g:this.debugCallback=this.renderDebug,this},isDirty:function(){var y=this.modelPosition,g=this.modelRotation,T=this.modelScale,S=this.dirtyCache,E=y.x,M=y.y,F=y.z,A=g.x,P=g.y,L=g.z,O=T.x,G=T.y,z=T.z,Y=this.getFaceCount(),X=S[0],I=S[1],U=S[2],D=S[3],V=S[4],B=S[5],W=S[6],K=S[7],J=S[8],Z=S[9];return S[0]=E,S[1]=M,S[2]=F,S[3]=A,S[4]=P,S[5]=L,S[6]=O,S[7]=G,S[8]=z,S[9]=Y,X!==E||I!==M||U!==F||D!==A||V!==P||B!==L||W!==O||K!==G||J!==z||Z!==Y},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var y=this.dirtyCache;if(!(!this.ignoreDirtyCache&&!y[10]&&!this.isDirty())){var g=this.width,T=this.height,S=this.viewMatrix,E=this.viewPosition;y[10]&&(S.identity(),S.translate(E),S.invert(),y[10]=0);var M=this.transformMatrix;M.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var F=E.z,A=this.faces,P=0;P<A.length;P++)A[P].transformCoordinatesLocal(M,g,T,F);this.depthSort()}},renderDebug:function(y,g){for(var T=y.debugGraphic,S=0;S<g.length;S++){var E=g[S],M=E.vertex1.tx,F=E.vertex1.ty,A=E.vertex2.tx,P=E.vertex2.ty,L=E.vertex3.tx,O=E.vertex3.ty;T.strokeTriangle(M,F,A,P,L,O)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null},clearTint:function(){return this.setTint()},setInteractive:function(y){y===void 0&&(y={});var g=(function(T,S,E){for(var M=this.faces,F=0;F<M.length;F++){var A=M[F];if(A.contains(S,E))return!0}return!1}).bind(this);return this.scene.sys.input.enable(this,y,g),this},setTint:function(y){y===void 0&&(y=16777215);for(var g=this.vertices,T=0;T<g.length;T++)g[T].color=y;return this},uvScroll:function(y,g){for(var T=this.faces,S=0;S<T.length;S++)T[S].scrollUV(y,g);return this},uvScale:function(y,g){for(var T=this.faces,S=0;S<T.length;S++)T[S].scaleUV(y,g);return this},tint:{set:function(y){this.setTint(y)}},rotateX:{get:function(){return u(this.modelRotation.x)},set:function(y){this.modelRotation.x=a(y)}},rotateY:{get:function(){return u(this.modelRotation.y)},set:function(y){this.modelRotation.y=a(y)}},rotateZ:{get:function(){return u(this.modelRotation.z)},set:function(y){this.modelRotation.z=a(y)}}});c.exports=m},36488:c=>{/**
1604 * @author       Richard Davey <[email protected]>
1605 * @copyright    2013-2025 Phaser Studio Inc.
1606 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1607 */var x=function(){};c.exports=x},20527:(c,x,t)=>{/**
1608 * @author       Richard Davey <[email protected]>
1609 * @copyright    2013-2025 Phaser Studio Inc.
1610 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1611 */var o=t(25305),p=t(44603),a=t(23568),n=t(35154),r=t(4703);p.register("mesh",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=a(e,"frame",null),l=n(e,"vertices",[]),u=n(e,"uvs",[]),d=n(e,"indicies",[]),f=n(e,"containsZ",!1),v=n(e,"normals",[]),m=n(e,"colors",16777215),y=n(e,"alphas",1),g=new r(this.scene,0,0,h,i,l,u,d,f,v,m,y);return s!==void 0&&(e.add=s),o(this.scene,g,e),g})},9225:(c,x,t)=>{/**
1612 * @author       Richard Davey <[email protected]>
1613 * @copyright    2013-2025 Phaser Studio Inc.
1614 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1615 */var o=t(4703),p=t(39429);p.register("mesh",function(a,n,r,e,s,h,i,l,u,d,f){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i,l,u,d,f))})},29807:(c,x,t)=>{/**
1616 * @author       Richard Davey <[email protected]>
1617 * @copyright    2013-2025 Phaser Studio Inc.
1618 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1619 */var o=t(29747),p=o,a=o;p=t(48833),a=t(36488),c.exports={renderWebGL:p,renderCanvas:a}},48833:(c,x,t)=>{/**
1620 * @author       Richard Davey <[email protected]>
1621 * @copyright    2013-2025 Phaser Studio Inc.
1622 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1623 */var o=t(91296),p=function(a,n,r,e){var s=n.faces,h=s.length;if(h!==0){r.addToRenderList(n);var i=a.pipelines.set(n.pipeline,n),l=o(n,r,e).calc;a.pipelines.preBatch(n);for(var u=i.setGameObject(n),d=i.vertexViewF32,f=i.vertexViewU32,v=i.vertexCount*i.currentShader.vertexComponentCount-1,m=n.tintFill,y=[],g=n.debugCallback,T=l.a,S=l.b,E=l.c,M=l.d,F=l.e,A=l.f,P=n.viewPosition.z,L=n.hideCCW,O=r.roundPixels,G=r.alpha*n.alpha,z=0,Y=0;Y<h;Y++){var X=s[Y];X.isInView(r,L,P,G,T,S,E,M,F,A,O)&&(i.shouldFlush(3)&&(i.flush(),u=i.setGameObject(n),v=i.vertexCount*i.currentShader.vertexComponentCount-1),v=X.load(d,f,v,u,m),z++,i.vertexCount+=3,i.currentBatch.count=i.vertexCount-i.currentBatch.start,g&&y.push(X))}n.totalFrame+=z,g&&g.call(n,n,y),a.pipelines.postBatch(n)}};c.exports=p},28103:(c,x,t)=>{/**
1624 * @author       Richard Davey <[email protected]>
1625 * @copyright    2013-2025 Phaser Studio Inc.
1626 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1627 */var o=t(83419),p=t(31401),a=t(95643),n=t(78023),r=t(39318),e=new o({Extends:a,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.GetBounds,p.Mask,p.Origin,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Texture,p.Transform,p.Visible,n],initialize:function(h,i,l,u,d,f,v,m,y,g,T){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 S=h.textures.getFrame(u,d);this.is3Slice=!g&&!T,S&&S.scale9&&(this.is3Slice=S.is3Slice);for(var E=this.is3Slice?18:54,M=0;M<E;M++)this.vertices.push(new r);this.setPosition(i,l),this.setTexture(u,d),this.setSlices(f,v,m,y,g,T,!1),this.updateDisplayOrigin(),this.initPipeline(),this.initPostPipeline()},setSlices:function(s,h,i,l,u,d,f){i===void 0&&(i=10),l===void 0&&(l=10),u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=!1);var v=this.frame,m=!1;if(this.is3Slice&&f&&u!==0&&d!==0&&(m=!0),m)console.warn("Cannot change 9 slice to 3 slice");else{if(v&&v.scale9&&!f){var y=v.data.scale9Borders,g=y.x,T=y.y;i=g,l=v.width-y.w-g,u=T,d=v.height-y.h-T,s===void 0&&(s=v.width),h===void 0&&(h=v.height)}else s===void 0&&(s=256),h===void 0&&(h=256);this._width=s,this._height=h,this.leftWidth=i,this.rightWidth=l,this.topHeight=u,this.bottomHeight=d,this.is3Slice&&(h=v.height,this._height=h,this.topHeight=h,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var s=this.leftWidth,h=this.rightWidth,i=this.topHeight,l=this.bottomHeight,u=this.frame.width,d=this.frame.height;this.updateQuadUVs(0,0,0,s/u,i/d),this.updateQuadUVs(6,s/u,0,1-h/u,i/d),this.updateQuadUVs(12,1-h/u,0,1,i/d),this.is3Slice||(this.updateQuadUVs(18,0,i/d,s/u,1-l/d),this.updateQuadUVs(24,s/u,i/d,1-h/u,1-l/d),this.updateQuadUVs(30,1-h/u,i/d,1,1-l/d),this.updateQuadUVs(36,0,1-l/d,s/u,1),this.updateQuadUVs(42,s/u,1-l/d,1-h/u,1),this.updateQuadUVs(48,1-h/u,1-l/d,1,1))},updateVertices:function(){var s=this.leftWidth,h=this.rightWidth,i=this.topHeight,l=this.bottomHeight,u=this.width,d=this.height;this.updateQuad(0,-.5,.5,-.5+s/u,.5-i/d),this.updateQuad(6,-.5+s/u,.5,.5-h/u,.5-i/d),this.updateQuad(12,.5-h/u,.5,.5,.5-i/d),this.is3Slice||(this.updateQuad(18,-.5,.5-i/d,-.5+s/u,-.5+l/d),this.updateQuad(24,-.5+s/u,.5-i/d,.5-h/u,-.5+l/d),this.updateQuad(30,.5-h/u,.5-i/d,.5,-.5+l/d),this.updateQuad(36,-.5,-.5+l/d,-.5+s/u,-.5),this.updateQuad(42,-.5+s/u,-.5+l/d,.5-h/u,-.5),this.updateQuad(48,.5-h/u,-.5+l/d,.5,-.5))},updateQuad:function(s,h,i,l,u){var d=this.width,f=this.height,v=this.originX,m=this.originY,y=this.vertices;y[s+0].resize(h,i,d,f,v,m),y[s+1].resize(h,u,d,f,v,m),y[s+2].resize(l,i,d,f,v,m),y[s+3].resize(h,u,d,f,v,m),y[s+4].resize(l,u,d,f,v,m),y[s+5].resize(l,i,d,f,v,m)},updateQuadUVs:function(s,h,i,l,u){var d=this.vertices,f=this.frame,v=f.u0,m=f.v0,y=f.u1,g=f.v1;if(v!==0||y!==1){var T=y-v;h=v+h*T,l=v+l*T}if(m!==0||g!==1){var S=g-m;i=m+i*S,u=m+u*S}d[s+0].setUVs(h,i),d[s+1].setUVs(h,u),d[s+2].setUVs(l,i),d[s+3].setUVs(h,u),d[s+4].setUVs(l,u),d[s+5].setUVs(l,i)},clearTint:function(){return this.setTint(16777215),this},setTint:function(s){return s===void 0&&(s=16777215),this.tint=s,this.tintFill=!1,this},setTintFill:function(s){return this.setTint(s),this.tintFill=!0,this},isTinted:{get:function(){return this.tint!==16777215}},width:{get:function(){return this._width}
1627,set:function(s){this._width=Math.max(s,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(s){this.is3Slice||(this._height=Math.max(s,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(s){this.scaleX=s/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(s){this.scaleY=s/this.height}},setSize:function(s,h){this.width=s,this.height=h,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=this.width,i.hitArea.height=this.height),this},setDisplaySize:function(s,h){return this.displayWidth=s,this.displayHeight=h,this},originX:{get:function(){return this._originX},set:function(s){this._originX=s,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(s){this._originY=s,this.updateVertices()}},setOrigin:function(s,h){return s===void 0&&(s=.5),h===void 0&&(h=s),this._originX=s,this._originY=h,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var s=this.frame.height;this._height=s,this.topHeight=s,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});c.exports=e},28279:(c,x,t)=>{/**
1628 * @author       Richard Davey <[email protected]>
1629 * @copyright    2013-2025 Phaser Studio Inc.
1630 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1631 */var o=t(25305),p=t(44603),a=t(23568),n=t(35154),r=t(28103);p.register("nineslice",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=a(e,"frame",null),l=n(e,"width",256),u=n(e,"height",256),d=n(e,"leftWidth",10),f=n(e,"rightWidth",10),v=n(e,"topHeight",0),m=n(e,"bottomHeight",0),y=new r(this.scene,0,0,h,i,l,u,d,f,v,m);return s!==void 0&&(e.add=s),o(this.scene,y,e),y})},47521:(c,x,t)=>{/**
1632 * @author       Richard Davey <[email protected]>
1633 * @copyright    2013-2025 Phaser Studio Inc.
1634 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1635 */var o=t(28103),p=t(39429);p.register("nineslice",function(a,n,r,e,s,h,i,l,u,d){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i,l,u,d))})},78023:(c,x,t)=>{/**
1636 * @author       Richard Davey <[email protected]>
1637 * @copyright    2013-2025 Phaser Studio Inc.
1638 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1639 */var o=t(29747),p=o,a=o;p=t(52230),c.exports={renderWebGL:p,renderCanvas:a}},52230:(c,x,t)=>{/**
1640 * @author       Richard Davey <[email protected]>
1641 * @copyright    2013-2025 Phaser Studio Inc.
1642 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1643 */var o=t(91296),p=t(70554),a=function(n,r,e,s){var h=r.vertices,i=h.length;if(i!==0){e.addToRenderList(r);var l=n.pipelines.set(r.pipeline,r),u=o(r,e,s,!1).calc;n.pipelines.preBatch(r);var d=l.setGameObject(r),f=l.vertexViewF32,v=l.vertexViewU32,m=l.vertexCount*l.currentShader.vertexComponentCount-1,y=e.roundPixels,g=r.tintFill,T=e.alpha*r.alpha,S=p.getTintAppendFloatAlpha(r.tint,T),E=l.vertexAvailable(),M=-1;E<i&&(M=E);for(var F=0;F<i;F++){var A=h[F];F===M&&(l.flush(),d=l.setGameObject(r),m=0),f[++m]=u.getXRound(A.vx,A.vy,y),f[++m]=u.getYRound(A.vx,A.vy,y),f[++m]=A.u,f[++m]=A.v,f[++m]=d,f[++m]=g,v[++m]=S,l.vertexCount++,l.currentBatch.count=l.vertexCount-l.currentBatch.start}n.pipelines.postBatch(r)}};c.exports=a},76472:(c,x,t)=>{/**
1644 * @author       Richard Davey <[email protected]>
1645 * @copyright    2013-2025 Phaser Studio Inc.
1646 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1647 */var o=t(83419),p=t(44777),a=t(37589),n=t(6113),r=t(91389),e=t(90664),s=new o({Extends:p,initialize:function(i){p.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,l=this.defaultEmit,u=this.defaultUpdate;if(this.method===9){this.start=h[0],this.ease=n("Linear"),this.interpolation=r("linear"),l=this.easedValueEmit,u=this.easeValueUpdate,i=h[0],this.active=!0,this.r.length=0,this.g.length=0,this.b.length=0;for(var d=0;d<h.length;d++){var f=e(h[d]);this.r.push(f.r),this.g.push(f.g),this.b.push(f.b)}}return this.onEmit=l,this.onUpdate=u,this.current=i,this},setEase:function(h){this.easeName=h,this.ease=n(h)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(h,i,l){var u=this.ease(l),d=this.interpolation(this.r,u),f=this.interpolation(this.g,u),v=this.interpolation(this.b,u),m=a(d,f,v);return this.current=m,m}});c.exports=s},44777:(c,x,t)=>{/**
1648 * @author       Richard Davey <[email protected]>
1649 * @copyright    2013-2025 Phaser Studio Inc.
1650 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1651 */var o=t(30976),p=t(45319),a=t(83419),n=t(99472),r=t(6113),e=t(95540),s=t(91389),h=t(77720),i=t(15994),l=new a({initialize:function(d,f,v){v===void 0&&(v=!1),this.propertyKey=d,this.propertyValue=f,this.defaultValue=f,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(u,d){u===void 0&&(u={}),d&&(this.propertyKey=d),this.propertyValue=e(u,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(u){var d;switch(this.method){case 1:case 3:case 8:d=u;break;case 2:this.propertyValue.indexOf(u)>=0&&(d=u);break;case 4:var f=(this.end-this.start)/this.steps;d=h(u,f),this.counter=d;break;
1651case 5:case 6:case 7:d=p(u,this.start,this.end);break;case 9:d=this.start[0];break}return this.current=d,this},getMethod:function(){var u=this.propertyValue;if(u===null)return 0;var d=typeof u;if(d==="number")return 1;if(Array.isArray(u))return 2;if(d==="function")return 3;if(d==="object"){if(this.hasBoth(u,"start","end"))return this.has(u,"steps")?4:5;if(this.hasBoth(u,"min","max"))return 6;if(this.has(u,"random"))return 7;if(this.hasEither(u,"onEmit","onUpdate"))return 8;if(this.hasEither(u,"values","interpolation"))return 9}return 0},setMethods:function(){var u=this.propertyValue,d=u,f=this.defaultEmit,v=this.defaultUpdate;switch(this.method){case 1:f=this.staticValueEmit;break;case 2:f=this.randomStaticValueEmit,d=u[0];break;case 3:this._onEmit=u,f=this.proxyEmit,d=this.defaultValue;break;case 4:this.start=u.start,this.end=u.end,this.steps=u.steps,this.counter=this.start,this.yoyo=this.has(u,"yoyo")?u.yoyo:!1,this.direction=0,f=this.steppedEmit,d=this.start;break;case 5:this.start=u.start,this.end=u.end;var m=this.has(u,"ease")?u.ease:"Linear";this.ease=r(m,u.easeParams),f=this.has(u,"random")&&u.random?this.randomRangedValueEmit:this.easedValueEmit,v=this.easeValueUpdate,d=this.start;break;case 6:this.start=u.min,this.end=u.max,f=this.has(u,"int")&&u.int?this.randomRangedIntEmit:this.randomRangedValueEmit,d=this.start;break;case 7:var y=u.random;Array.isArray(y)&&(this.start=y[0],this.end=y[1]),f=this.randomRangedIntEmit,d=this.start;break;case 8:this._onEmit=this.has(u,"onEmit")?u.onEmit:this.defaultEmit,this._onUpdate=this.has(u,"onUpdate")?u.onUpdate:this.defaultUpdate,f=this.proxyEmit,v=this.proxyUpdate,d=this.defaultValue;break;case 9:this.start=u.values;var g=this.has(u,"ease")?u.ease:"Linear";this.ease=r(g,u.easeParams),this.interpolation=s(u.interpolation),f=this.easedValueEmit,v=this.easeValueUpdate,d=this.start[0];break}return this.onEmit=f,this.onUpdate=v,this.current=d,this},has:function(u,d){return u.hasOwnProperty(d)},hasBoth:function(u,d,f){return u.hasOwnProperty(d)&&u.hasOwnProperty(f)},hasEither:function(u,d,f){return u.hasOwnProperty(d)||u.hasOwnProperty(f)},defaultEmit:function(){return this.defaultValue},defaultUpdate:function(u,d,f,v){return v},proxyEmit:function(u,d,f){var v=this._onEmit(u,d,f);return this.current=v,v},proxyUpdate:function(u,d,f,v){var m=this._onUpdate(u,d,f,v);return this.current=m,m},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var u=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[u],this.current},randomRangedValueEmit:function(u,d){var f=n(this.start,this.end);return u&&u.data[d]&&(u.data[d].min=f,u.data[d].max=this.end),this.current=f,f},randomRangedIntEmit:function(u,d){var f=o(this.start,this.end);return u&&u.data[d]&&(u.data[d].min=f,u.data[d].max=this.end),this.current=f,f},steppedEmit:function(){var u=this.counter,d=u,f=(this.end-this.start)/this.steps;if(this.yoyo){var v;this.direction===0?(d+=f,d>=this.end&&(v=d-this.end,d=this.end-v,this.direction=1)):(d-=f,d<=this.start&&(v=this.start-d,d=this.start+v,this.direction=0)),this.counter=d}else this.counter=i(d+f,this.start,this.end);return this.current=u,u},easedValueEmit:function(u,d){if(u&&u.data[d]){var f=u.data[d];f.min=this.start,f.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(u,d,f){var v=u.data[d],m,y=this.ease(f);return this.interpolation?m=this.interpolation(this.start,y):m=(v.max-v.min)*y+v.min,this.current=m,m},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});c.exports=l},24502:(c,x,t)=>{/**
1652 * @author       Richard Davey <[email protected]>
1653 * @copyright    2013-2025 Phaser Studio Inc.
1654 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1655 */var o=t(83419),p=t(95540),a=t(20286),n=new o({Extends:a,initialize:function(e,s,h,i,l){if(typeof e=="object"){var u=e;e=p(u,"x",0),s=p(u,"y",0),h=p(u,"power",0),i=p(u,"epsilon",100),l=p(u,"gravity",50)}else e===void 0&&(e=0),s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=100),l===void 0&&(l=50);a.call(this,e,s,!0),this._gravity=l,this._power=h*l,this._epsilon=i*i},update:function(r,e){var s=this.x-r.x,h=this.y-r.y,i=s*s+h*h;if(i!==0){var l=Math.sqrt(i);i<this._epsilon&&(i=this._epsilon);var u=this._power*e/(i*l)*100;r.velocityX+=s*u,r.velocityY+=h*u}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(r){this._epsilon=r*r}},power:{get:function(){return this._power/this._gravity},set:function(r){this._power=r*this._gravity}},gravity:{get:function(){return this._gravity},set:function(r){var e=this.power;this._gravity=r,this.power=e}}});c.exports=n},56480:(c,x,t)=>{/**
1656 * @author       Richard Davey <[email protected]>
1657 * @copyright    2013-2025 Phaser Studio Inc.
1658 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1659 */var o=t(9674),p=t(45319),a=t(83419),n=t(39506),r=t(87841),e=t
vendor: 10,620 bytes, lines 1659-1667
1659(11520),s=t(26099),h=new a({initialize:function(l){this.emitter=l,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=l.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new o(this)),this.bounds=new r},emit:function(i,l,u,d,f,v){return this.emitter.emit(i,l,u,d,f,v)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,l){i===void 0&&(i=0),l===void 0&&(l=0),this.x=i,this.y=l},fire:function(i,l){var u=this.emitter,d=u.ops,f=u.getAnim();if(f?this.anims.play(f):(this.frame=u.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(u.getEmitZone(this),i===void 0?this.x+=d.x.onEmit(this,"x"):d.x.steps>0?this.x+=i+d.x.onEmit(this,"x"):this.x+=i,l===void 0?this.y+=d.y.onEmit(this,"y"):d.y.steps>0?this.y+=l+d.y.onEmit(this,"y"):this.y+=l,this.life=d.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=d.delay.onEmit(this,"delay"),this.holdCurrent=d.hold.onEmit(this,"hold"),this.scaleX=d.scaleX.onEmit(this,"scaleX"),this.scaleY=d.scaleY.active?d.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=d.rotate.onEmit(this,"rotate"),this.rotation=n(this.angle),u.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&u.getDeathZone(this))return this.lifeCurrent=0,!1;var v=d.speedX.onEmit(this,"speedX"),m=d.speedY.active?d.speedY.onEmit(this,"speedY"):v;if(u.radial){var y=n(d.angle.onEmit(this,"angle"));this.velocityX=Math.cos(y)*Math.abs(v),this.velocityY=Math.sin(y)*Math.abs(m)}else if(u.moveTo){var g=d.moveToX.onEmit(this,"moveToX"),T=d.moveToY.onEmit(this,"moveToY"),S=this.life/1e3;this.velocityX=(g-this.x)/S,this.velocityY=(T-this.y)/S}else this.velocityX=v,this.velocityY=m;return u.acceleration&&(this.accelerationX=d.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=d.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=d.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=d.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=d.bounce.onEmit(this,"bounce"),this.alpha=d.alpha.onEmit(this,"alpha"),d.color.active?this.tint=d.color.onEmit(this,"tint"):this.tint=d.tint.onEmit(this,"tint"),!0},update:function(i,l,u){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&&this.anims.update(0,i);var d=this.emitter,f=d.ops,v=1-this.lifeCurrent/this.life;if(this.lifeT=v,this.x=f.x.onUpdate(this,"x",v,this.x),this.y=f.y.onUpdate(this,"y",v,this.y),d.moveTo){var m=f.moveToX.onUpdate(this,"moveToX",v,d.moveToX),y=f.moveToY.onUpdate(this,"moveToY",v,d.moveToY),g=this.lifeCurrent/1e3;this.velocityX=(m-this.x)/g,this.velocityY=(y-this.y)/g}return this.computeVelocity(d,i,l,u,v),this.scaleX=f.scaleX.onUpdate(this,"scaleX",v,this.scaleX),f.scaleY.active?this.scaleY=f.scaleY.onUpdate(this,"scaleY",v,this.scaleY):this.scaleY=this.scaleX,this.angle=f.rotate.onUpdate(this,"rotate",v,this.angle),this.rotation=n(this.angle),d.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=p(f.alpha.onUpdate(this,"alpha",v,this.alpha),0,1),f.color.active?this.tint=f.color.onUpdate(this,"color",v,this.tint):this.tint=f.tint.onUpdate(this,"tint",v,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,l,u,d,f){var v=i.ops,m=this.velocityX,y=this.velocityY,g=v.accelerationX.onUpdate(this,"accelerationX",f,this.accelerationX),T=v.accelerationY.onUpdate(this,"accelerationY",f,this.accelerationY),S=v.maxVelocityX.onUpdate(this,"maxVelocityX",f,this.maxVelocityX),E=v.maxVelocityY.onUpdate(this,"maxVelocityY",f,this.maxVelocityY);this.bounce=v.bounce.onUpdate(this,"bounce",f,this.bounce),m+=i.gravityX*u+g*u,y+=i.gravityY*u+T*u,m=p(m,-S,S),y=p(y,-E,E),this.velocityX=m,this.velocityY=y,this.x+=m*u,this.y+=y*u,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var M=0;M<d.length;M++){var F=d[M];F.active&&F.update(this,l,u,f)}},setSizeToFrame:function(){},getBounds:function(i){i===void 0&&(i=this.emitter.getWorldTransformMatrix());var l=Math.abs(i.scaleX)*this.scaleX,u=Math.abs(i.scaleY)*this.scaleY,d=this.x,f=this.y,v=this.rotation,m=this.frame.width*l/2,y=this.frame.height*u/2,g=this.bounds,T=new s(d-m,f-y),S=new s(d+m,f-y),E=new s(d-m,f+y),M=new s(d+m,f+y);return v!==0&&(e(T,d,f,v),e(S,d,f,v),e(E,d,f,v),e(M,d,f,v)),i.transformPoint(T.x,T.y,T),i.transformPoint(S.x,S.y,S),i.transformPoint(E.x,E.y,E),i.transformPoint(M.x,M.y,M),g.x=Math.min(T.x,S.x,E.x,M.x),g.y=Math.min(T.y,S.y,E.y,M.y),g.width=Math.max(T.x,S.x,E.x,M.x)-g.x,g.height=Math.max(T.y,S.y,E.y,M.y)-g.y,g},destroy:function(){this.anims&&this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});c.exports=h},69601:(c,x,t)=>{/**
1660 * @author       Richard Davey <[email protected]>
1661 * @copyright    2013-2025 Phaser Studio Inc.
1662 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1663 */var o=t(83419),p=t(20286),a=t(87841),n=new o({Extends:p,initialize:function(e,s,h,i,l,u,d,f){l===void 0&&(l=!0),u===void 0&&(u=!0),d===void 0&&(d=!0),f===void 0&&(f=!0),p.call(this,e,s,!0),this.bounds=new a(e,s,h,i),this.collideLeft=l,this.collideRight=u,this.collideTop=d,this.collideBottom=f},update:function(r){var e=this.bounds,s=-r.bounce,h=r.worldPosition;h.x<e.x&&this.collideLeft?(r.x+=e.x-h.x,r.velocityX*=s):h.x>e.right&&this.collideRight&&(r.x-=h.x-e.right,r.velocityX*=s),h.y<e.y&&this.collideTop?(r.y+=e.y-h.y,r.velocityY*=s):h.y>e.bottom&&this.collideBottom&&(r.y-=h.y-e.bottom,r.velocityY*=s)}});c.exports=n},31600:(c,x,t)=>{/**
1664 * @author       Richard Davey <[email protected]>
1665 * @copyright    2013-2025 Phaser Studio Inc.
1666 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1667 */var o=t(83419),p=t(31401),a=t(53774),n=t(43459),r=t(26388),e=t(19909),s=t(76472),h=t(44777),i=t(20696),l=t(95643),u=t(95540),d=t(26546),f=t(24502),v=t(69036),m=t(1985),y=t(97022),g=t(86091),T=t(73162),S=t(20074),E=t(269),M=t(56480),F=t(69601),A=t(68875),P=t(87841),L=t(59996),O=t(72905),G=t(90668),z=t(19186),Y=t(61340),X=t(26099),I=t(15994),U=["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"],D=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],V=new o({Extends:l,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Texture,p.Transform,p.Visible,G],initialize:function(W,K,J,Z,j){l.call(this,W,"ParticleEmitter"),this.particleClass=M,this.config=null,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new 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 X,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 Y,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new T(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(K,J),this.setTexture(Z),j&&this.setConfig(j)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(B){if(!B)return this;this.config=B;var W=0,K="",J=this.ops;for(W=0;W<D.length;W++)K=D[W],J[K].loadConfig(B);for(W=0;W<U.length;W++)K=U[W],y(B,K)&&(this[K]=u(B,K));if(this.acceleration=this.accelerationX!==0||this.accelerationY!==0,this.moveTo=v(B,["moveToX","moveToY"]),y(B,"speed")&&(J.speedX.loadConfig(B,"speed"),J.speedY.active=!1),(m(B,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),y(B,"scale")&&(J.scaleX.loadConfig(B,"scale"),J.scaleY.active=!1),y(B,"callbackScope")){var Z=u(B,"callbackScope",null);this.emitCallbackScope=Z,this.deathCallbackScope=Z}if(y(B,"emitZone")&&this.addEmitZone(B.emitZone),y(B,"deathZone")&&this.addDeathZone(B.deathZone),y(B,"bounds")){var j=this.addParticleBounds(B.bounds);j.collideLeft=u(B,"collideLeft",!0),j.collideRight=u(B,"collideRight",!0),j.collideTop=u(B,"collideTop",!0),j.collideBottom=u(B,"collideBottom",!0)}return y(B,"followOffset")&&this.followOffset.setFromObject(u(B,"followOffset",0)),y(B,"texture")&&this.setTexture(B.texture),y(B,"frame")?this.setEmitterFrame(B.frame):y(B,"anim")&&this.setAnim(B.anim),y(B,"reserve")&&this.reserve(B.reserve),y(B,"advance")&&this.fastForward(B.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit
1667(i.START,this),this},updateConfig:function(B){return B&&(this.config?this.setConfig(E(this.config,B)):this.setConfig(B)),this},toJSON:function(){var B=a(this),W=0,K="";for(W=0;W<U.length;W++)K=U[W],B[K]=this[K];var J=this.ops;for(W=0;W<D.length;W++)K=D[W],J[K]&&(B[K]=J[K].toJSON());return J.speedY.active||(delete B.speedX,B.speed=J.speedX.toJSON()),this.scaleX===this.scaleY&&(delete B.scaleX,delete B.scaleY,B.scale=J.scaleX.toJSON()),B},resetCounters:function(B,W){var K=this.counters;K.fill(0),K[0]=B,W&&(K[5]=1)},startFollow:function(B,W,K,J){return W===void 0&&(W=0),K===void 0&&(K=0),J===void 0&&(J=!1),this.follow=B,this.followOffset.set(W,K),this.trackVisible=J,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var B=this.frames,W=B.length,K;return W===1?K=B[0]:this.randomFrame?K=d(B):(K=B[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===W&&(this.currentFrame=0))),this.texture.get(K)},setEmitterFrame:function(B,W,K){W===void 0&&(W=!0),K===void 0&&(K=1),this.randomFrame=W,this.frameQuantity=K,this.currentFrame=0;var J=typeof B;if(this.frames.length=0,Array.isArray(B))this.frames=this.frames.concat(B);else if(J==="string"||J==="number")this.frames.push(B);else if(J==="object"){var Z=B;B=u(Z,"frames",null),B&&(this.frames=this.frames.concat(B));var j=u(Z,"cycle",!1);this.randomFrame=!j,this.frameQuantity=u(Z,"quantity",K)}return this.frames.length===1&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var B=this.anims,W=B.length;if(W===0)return null;if(W===1)return B[0];if(this.randomAnim)return d(B);var K=B[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=I(this.currentAnim+1,0,W)),K},setAnim:function(B,W,K){W===void 0&&(W=!0),K===void 0&&(K=1),this.randomAnim=W,this.animQuantity=K,this.currentAnim=0;var J=typeof B;if(this.anims.length=0,Array.isArray(B))this.anims=this.anims.concat(B);else if(J==="string")this.anims.push(B);else if(J==="object"){var Z=B;B=u(Z,"anims",null),B&&(this.anims=this.anims.concat(B));var j=u(Z,"cycle",!1);this.randomAnim=!j,this.animQuantity=u(Z,"quantity",K)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(B){return B===void 0&&(B=!0),this.radial=B,this},addParticleBounds:function(B,W,K,J,Z,j,k,_){if(typeof B=="object"){var q=B;B=q.x,W=q.y,K=y(q,"w")?q.w:q.width,J=y(q,"h")?q.h:q.height}return this.addParticleProcessor(new F(B,W,K,J,Z,j,k,_))},setParticleSpeed:function(B,W){return W===void 0&&(W=B),this.ops.speedX.onChange(B),B===W?this.ops.speedY.active=!1:this.ops.speedY.onChange(W),this.radial=!0,this},setParticleScale:function(B,W){return B===void 0&&(B=1),W===void 0&&(W=B),this.ops.scaleX.onChange(B),this.ops.scaleY.onChange(W),this},setParticleGravity:function(B,W){return this.gravityX=B,this.gravityY=W,this},setParticleAlpha:function(B){return this.ops.alpha.onChange(B),this},setParticleTint:function(B){return this.ops.tint.onChange(B),this},setEmitterAngle:function(B){return this.ops.angle.onChange(B),this},setParticleLifespan:function(B){return this.ops.lifespan.onChange(B),this},setQuantity:function(B){return this.quantity=B,this},setFrequency:function(B,W){return this.frequency=B,this.flowCounter=B>0?B:0,W&&(this.quantity=W),this},addDeathZone:function(B){Array.isArray(B)||(B=[B]);for(var W,K=[],J=0;J<B.length;J++)if(W=B[J],W instanceof r)K.push(W);else if(typeof W.contains=="function")W=new r(W,!0),K.push(W);else{var Z=u(W,"type","onEnter"),j=u(W,"source",null);if(j&&typeof j.contains=="function"){var k=Z==="onEnter";W=new r(j,k),K.push(W)}}return this.deathZones=this.deathZones.concat(K),K},removeDeathZone:function(B){return O(this.deathZones,B),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(B){Array.isArray(B)||(B=[B]);for(var W,K=[],J=0;J<B.length;J++)if(W=B[J],W instanceof A||W instanceof e)K.push(W);else{var Z=u(W,"source",null);if(Z){var j=u(W,"type","random");if(j==="random"&&typeof Z.getRandomPoint=="function")W=new A(Z),K.push(W);else if(j==="edge"&&typeof Z.getPoints=="function"){var k=u(W,"quantity",1),_=u(W,"stepRate",0),q=u(W,"yoyo",!1),et=u(W,"seamless",!0),nt=u(W,"total",-1);W=new e(Z,k,_,q,et,nt),K.push(W)}}}return this.emitZones=this.emitZones.concat(K),K},removeEmitZone:function(B){return O(this.emitZones,B),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(B){var W=this.emitZones,K=W.length;if(K!==0){var J=W[this.zoneIndex];J.getPoint(B),J.total>-1&&(this.zoneTotal++,this.zoneTotal===J.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===K&&(this.zoneIndex=0)))}},getDeathZone:function(B){for(var W=this.deathZones,K=0;K<W.length;K++){var J=W[K];
1667if(J.willKill(B))return this.emit(i.DEATH_ZONE,this,B,J),!0}return!1},setEmitZone:function(B){var W;return isFinite(B)?W=B:W=this.emitZones.indexOf(B),W>=0&&(this.zoneIndex=W),this},addParticleProcessor:function(B){return this.processors.exists(B)||(B.emitter&&B.emitter.removeParticleProcessor(B),this.processors.add(B),B.emitter=this),B},removeParticleProcessor:function(B){return this.processors.exists(B)&&(this.processors.remove(B,!0),B.emitter=null),B},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(B){return this.addParticleProcessor(new f(B))},reserve:function(B){var W=this.dead;if(this.maxParticles>0){var K=this.getParticleCount();K+B>this.maxParticles&&(B=this.maxParticles-(K+B))}for(var J=0;J<B;J++)W.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(B,W){return B===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof B=="function"&&(this.emitCallback=B,W&&(this.emitCallbackScope=W)),this},onParticleDeath:function(B,W){return B===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof B=="function"&&(this.deathCallback=B,W&&(this.deathCallbackScope=W)),this},killAll:function(){for(var B=this.dead,W=this.alive;W.length>0;)B.push(W.pop());return this},forEachAlive:function(B,W){for(var K=this.alive,J=K.length,Z=0;Z<J;Z++)B.call(W,K[Z],this);return this},forEachDead:function(B,W){for(var K=this.dead,J=K.length,Z=0;Z<J;Z++)B.call(W,K[Z],this);return this},start:function(B,W){return B===void 0&&(B=0),this.emitting||(B>0&&this.fastForward(B),this.emitting=!0,this.resetCounters(this.frequency,!0),W!==void 0&&(this.duration=Math.abs(W)),this.emit(i.START,this)),this},stop:function(B){return B===void 0&&(B=!1),this.emitting&&(this.emitting=!1,B&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(B,W){return B===void 0&&(B=""),W===void 0&&(W=this.true),this.sortProperty=B,this.sortOrderAsc=W,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(B){return this.sortProperty!==""?B=this.depthSortCallback:B=null,this.sortCallback=B,this},depthSort:function(){return z(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(B,W){var K=this.sortProperty;return this.sortOrderAsc?B[K]-W[K]:W[K]-B[K]},flow:function(B,W,K){return W===void 0&&(W=1),this.emitting=!1,this.frequency=B,this.quantity=W,K!==void 0&&(this.stopAfter=K),this.start()},explode:function(B,W,K){this.frequency=-1,this.resetCounters(-1,!0);var J=this.emitParticle(B,W,K);return this.emit(i.EXPLODE,this,J),J},emitParticleAt:function(B,W,K){return this.emitParticle(K,B,W)},emitParticle:function(B,W,K){if(!this.atLimit()){B===void 0&&(B=this.ops.quantity.onEmit());for(var J=this.dead,Z=this.stopAfter,j=this.follow?this.follow.x+this.followOffset.x:W,k=this.follow?this.follow.y+this.followOffset.y:K,_=0;_<B;_++){var q=J.pop();if(q||(q=new this.particleClass(this)),q.fire(j,k)?(this.particleBringToTop?this.alive.push(q):this.alive.unshift(q),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,q,this)):this.dead.push(q),Z>0&&(this.stopCounter++,this.stopCounter>=Z)||this.atLimit())break}return q}},fastForward:function(B,W){W===void 0&&(W=1e3/60);var K=0;for(this.skipping=!0;K<Math.abs(B);)this.preUpdate(0,W),K+=W;return this.skipping=!1,this},preUpdate:function(B,W){W*=this.timeScale;var K=W/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var J=this.getProcessors(),Z=this.alive,j=this.dead,k=0,_=[],q=Z.length;for(k=0;k<q;k++){var et=Z[k];et.update(W,K,J)&&_.push({index:k,particle:et})}if(q=_.length,q>0){var nt=this.deathCallback,tt=this.deathCallbackScope;for(k=q-1;k>=0;k--){var ot=_[k];Z.splice(ot.index,1),j.push(ot.particle),nt&&nt.call(tt,ot.particle),ot.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&Z.length===0&&(this.completeFlag=0,this.emit
1667(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=W;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=W,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(B){for(var W=this.getWorldTransformMatrix(),K=this.alive,J=K.length,Z=[],j=0;j<J;j++){var k=K[j];L(B,k.getBounds(W))&&Z.push(k)}return Z},getBounds:function(B,W,K,J){B===void 0&&(B=0),W===void 0&&(W=0),K===void 0&&(K=1e3/60),J===void 0&&(J=new P);var Z=this.getWorldTransformMatrix(),j,k,_=this.alive,q=!1;if(J.setTo(0,0,0,0),W>0){var et=0;for(this.skipping=!0;et<Math.abs(W);){for(this.preUpdate(0,K),j=0;j<_.length;j++)k=_[j].getBounds(Z),q?S(J,k):(q=!0,n(k,J));et+=K}this.skipping=!1}else for(j=0;j<_.length;j++)k=_[j].getBounds(Z),q?S(J,k):(q=!0,n(k,J));return B>0&&g(J,B,B),J},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(B){this.ops.x.onChange(B)}},particleY:{get:function(){return this.ops.y.current},set:function(B){this.ops.y.onChange(B)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(B){this.ops.accelerationX.onChange(B)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(B){this.ops.accelerationY.onChange(B)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(B){this.ops.maxVelocityX.onChange(B)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(B){this.ops.maxVelocityY.onChange(B)}},speed:{get:function(){return this.ops.speedX.current},set:function(B){this.ops.speedX.onChange(B),this.ops.speedY.onChange(B)}},speedX:{get:function(){return this.ops.speedX.current},set:function(B){this.ops.speedX.onChange(B)}},speedY:{get:function(){return this.ops.speedY.current},set:function(B){this.ops.speedY.onChange(B)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(B){this.ops.moveToX.onChange(B)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(B){this.ops.moveToY.onChange(B)}},bounce:{get:function(){return this.ops.bounce.current},set:function(B){this.ops.bounce.onChange(B)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(B){this.ops.scaleX.onChange(B)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(B){this.ops.scaleY.onChange(B)}},particleColor:{get:function(){return this.ops.color.current},set:function(B){this.ops.color.onChange(B)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(B){this.ops.color.setEase(B)}},particleTint:{get:function(){return this.ops.tint.current},set:function(B){this.ops.tint.onChange(B)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(B){this.ops.alpha.onChange(B)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(B){this.ops.lifespan.onChange(B)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(B){this.ops.angle.onChange(B)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(B){this.ops.rotate.onChange(B)}},quantity:{get:function(){return this.ops.quantity.current},set:function(B){this.ops.quantity.onChange(B)}},delay:{get:function(){return this.ops.delay.current},set:function(B){this.ops.delay.onChange(B)}},hold:{get:function(){return this.ops.hold.current},set:function(B){this.ops.hold.onChange(B)}},flowCounter:{get:function(){return this.counters[0]},set:function(B){this.counters[0]=B}},frameCounter:{get:function(){return this.counters[1]},set:function(B){this.counters[1]=B}},animCounter:{get:function(){return this.counters[2]},set:function(B){this.counters[2]=B}},elapsed:{get:function(){return this.counters[3]},set:function(B){this.counters[3]=B}},stopCounter:{get:function(){return this.counters[4]},set:function(B){this.counters[4]=B}},completeFlag:{get:function(){return this.counters[5]},set:function(B){this.counters[5]=B}},zoneIndex:{get:function(){return this.counters[6]},set:function(B){this.counters[6]=B}},zoneTotal:{get:function(){return this.counters[7]},set:function(B){this.counters[7]=B}},currentFrame:{get:function(){return this.counters[8]},set:function(B){this.counters[8]=B}},currentAnim:{get:function(){return this.counters[9]}
1667,set:function(B){this.counters[9]=B}},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 B,W=this.ops;for(B=0;B<D.length;B++){var K=D[B];W[K].destroy()}for(B=0;B<this.alive.length;B++)this.alive[B].destroy();for(B=0;B<this.dead.length;B++)this.dead[B].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});c.exports=V},9871:(c,x,t)=>{/**
1668 * @author       Richard Davey <[email protected]>
1669 * @copyright    2013-2025 Phaser Studio Inc.
1670 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1671 */var o=t(59996),p=t(61340),a=new p,n=new p,r=new p,e=new p,s=function(h,i,l,u){var d=a,f=n,v=r,m=e;u?(m.loadIdentity(),m.multiply(u),m.translate(i.x,i.y),m.rotate(i.rotation),m.scale(i.scaleX,i.scaleY)):m.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var y=h.currentContext,g=l.roundPixels,T=l.alpha,S=i.alpha,E=i.alive,M=E.length,F=i.viewBounds;if(!(!i.visible||M===0||F&&!o(F,l.worldView))){i.sortCallback&&i.depthSort(),l.addToRenderList(i);var A=i.scrollFactorX,P=i.scrollFactorY;y.save(),y.globalCompositeOperation=h.blendModes[i.blendMode];for(var L=0;L<M;L++){var O=E[L],G=O.alpha*S*T;if(!(G<=0||O.scaleX===0||O.scaleY===0)){v.applyITRS(O.x,O.y,O.rotation,O.scaleX,O.scaleY),d.copyFrom(l.matrix),d.multiplyWithOffset(m,-l.scrollX*A,-l.scrollY*P),v.e=O.x,v.f=O.y,d.multiply(v,f);var z=O.frame,Y=z.canvasData;if(Y.width>0&&Y.height>0){var X=-z.halfWidth,I=-z.halfHeight;y.globalAlpha=G,y.save(),f.setToContext(y),g&&(X=Math.round(X),I=Math.round(I)),y.imageSmoothingEnabled=!z.source.scaleMode,y.drawImage(z.source.image,Y.x,Y.y,Y.width,Y.height,X,I,Y.width,Y.height),y.restore()}}}y.restore()}};c.exports=s},92730:(c,x,t)=>{/**
1672 * @author       Richard Davey <[email protected]>
1673 * @copyright    2013-2025 Phaser Studio Inc.
1674 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1675 */var o=t(25305),p=t(44603),a=t(23568),n=t(95540),r=t(31600);p.register("particles",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=n(e,"config",null),l=new r(this.scene,0,0,h);return s!==void 0&&(e.add=s),o(this.scene,l,e),i&&l.setConfig(i),l})},676:(c,x,t)=>{/**
1676 * @author       Richard Davey <[email protected]>
1677 * @copyright    2013-2025 Phaser Studio Inc.
1678 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1679 */var o=t(39429),p=t(31600);o.register("particles",function(a,n,r,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 p(this.scene,a,n,r,e))})},90668:(c,x,t)=>{/**
1680 * @author       Richard Davey <[email protected]>
1681 * @copyright    2013-2025 Phaser Studio Inc.
1682 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1683 */var o=t(29747),p=o,a=o;p=t(21188),a=t(9871),c.exports={renderWebGL:p,renderCanvas:a}},21188:(c,x,t)=>{/**
1684 * @author       Richard Davey <[email protected]>
1685 * @copyright    2013-2025 Phaser Studio Inc.
1686 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1687 */var o=t(59996),p=t(61340),a=t(70554),n=new p,r=new p,e=new p,s=new p,h=function(i,l,u,d){var f=i.pipelines.set(l.pipeline),v=n,m=r,y=e,g=s;d?(g.loadIdentity(),g.multiply(d),g.translate(l.x,l.y),g.rotate(l.rotation),g.scale(l.scaleX,l.scaleY)):g.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);var T=a.getTintAppendFloatAlpha,S=u.alpha,E=l.alpha;i.pipelines.preBatch(l);var M=l.alive,F=M.length,A=l.viewBounds;if(!(F===0||A&&!o(A,u.worldView))){l.sortCallback&&l.depthSort(),u.addToRenderList(l),v.copyFrom(u.matrix),v.multiplyWithOffset(g,-u.scrollX*l.scrollFactorX,-u.scrollY*l.scrollFactorY),i.setBlendMode(l.blendMode),l.mask&&(l.mask.preRenderWebGL(i,l,u),i.pipelines.set(l.pipeline));for(var P=l.tintFill,L,O,G=0;G<F;G++){var z=M[G],Y=z.alpha*E*S;if(!(Y<=0||z.scaleX===0||z.scaleY===0)){y.applyITRS(z.x,z.y,z.rotation,z.scaleX,z.scaleY),y.e=z.x,y.f=z.y,v.multiply(y,m);var X=z.frame;X.glTexture!==O&&(O=X.glTexture,L=f.setGameObject(l,X));var I=-X.halfWidth,U=-X.halfHeight,D=m.setQuad(I,U,I+X.width,U+X.height),V=T(z.tint,Y);f.shouldFlush(6)&&(f.flush(),L=f.setGameObject(l,X)),f.batchQuad(l,D[0],D[1],D[2],D[3],D[4],D[5],D[6],D[7],X.u0,X.v0,X.u1,X.v1,V,V,V,V,P,O,L)}}l.mask&&l.mask.postRenderWebGL(i,u),i.pipelines.postBatch(l)}};c.exports=h},20286:(c,x,t)=>{/**
1688 * @author       Richard Davey <[email protected]>
1689 * @copyright    2013-2025 Phaser Studio Inc.
1690 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1691 */var o=t(83419),p=new o({initialize:function(n,r,e){n===void 0&&(n=0),r===void 0&&(r=0),e===void 0&&(e=!0),this.emitter,this.x=n,this.y=r,this.active=e},update:function(){},destroy:function(){this.emitter=null}});c.exports=p},9774:c=>{/**
1692 * @author       Richard Davey <[email protected]>
1693 * @copyright    2013-2025 Phaser Studio Inc.
1694 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1695 */c.exports="complete"},812:c=>{/**
1696 * @author       Richard Davey <[email protected]>
1697 * @copyright    2013-2025 Phaser Studio Inc.
1698 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1699 */c.exports="deathzone"},30522:c=>{/**
1700 * @author       Richard Davey <[email protected]>
1701 * @copyright    2013-2025 Phaser Studio Inc.
1702 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1703 */c.exports="explode"},96695:c=>{/**
1704 * @author       Richard Davey <[email protected]>
1705 * @copyright    2013-2025 Phaser Studio Inc.
1706 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1707 */c.exports="start"},18677:c=>{/**
1708 * @author       Richard Davey <[email protected]>
1709 * @copyright    2013-2025 Phaser Studio Inc.
1710 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1711 */c.exports="stop"},20696:(c,x,t)=>{/**
1712 * @author       Richard Davey <[email protected]>
1713 * @copyright    2013-2025 Phaser Studio Inc.
1714 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1715 */c.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(c,x,t)=>{/**
1716 * @author       Richard Davey <[email protected]>
1717 * @copyright    2013-2025 Phaser Studio Inc.
1718 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1719 */c.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:(c,x,t)=>{/**
1720 * @author       Richard Davey <[email protected]>
1721 * @copyright    2013-2025 Phaser Studio Inc.
1722 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1723 */var o=t(83419),p=new o({initialize:function(n,r){this.source=n,this.killOnEnter=r},willKill:function(a){var n=a.worldPosition,r=this.source.contains(n.x,n.y);return r&&this.killOnEnter||!r&&!this.killOnEnter}});c.exports=p},19909:(c,x,t)=>{/**
1724 * @author       Richard Davey <[email protected]>
1725 * @copyright    2013-2025 Phaser Studio Inc.
1726 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1727 */var o=t(83419),p=new o({initialize:function(n,r,e,s,h,i){s===void 0&&(s=!1),h===void 0&&(h=!0),i===void 0&&(i=-1),this.source=n,this.points=[],this.quantity=r,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],n=this.points[this.points.length-1];a.x===n.x&&a.y===n.y&&this.points.pop()}
1727var r=this._length;return this._length=this.points.length,this._length<r&&this.counter>this._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 n=this.points[this.counter];n&&(a.x=n.x,a.y=n.y)}});c.exports=p},68875:(c,x,t)=>{/**
1728 * @author       Richard Davey <[email protected]>
1729 * @copyright    2013-2025 Phaser Studio Inc.
1730 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1731 */var o=t(83419),p=t(26099),a=new o({initialize:function(r){this.source=r,this._tempVec=new p,this.total=-1},getPoint:function(n){var r=this._tempVec;this.source.getRandomPoint(r),n.x=r.x,n.y=r.y}});c.exports=a},21024:(c,x,t)=>{/**
1732 * @author       Richard Davey <[email protected]>
1733 * @copyright    2013-2025 Phaser Studio Inc.
1734 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1735 */c.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(c,x,t)=>{/**
1736 * @author       Richard Davey <[email protected]>
1737 * @copyright    2013-2025 Phaser Studio Inc.
1738 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1739 */var o=t(83419),p=t(31401),a=t(68287),n=new o({Extends:a,Mixins:[p.PathFollower],initialize:function(e,s,h,i,l,u){a.call(this,e,h,i,l,u),this.path=s},preUpdate:function(r,e){this.anims.update(r,e),this.pathUpdate(r)}});c.exports=n},90145:(c,x,t)=>{/**
1740 * @author       Richard Davey <[email protected]>
1741 * @copyright    2013-2025 Phaser Studio Inc.
1742 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1743 */var o=t(39429),p=t(1159);o.register("follower",function(a,n,r,e,s){var h=new p(this.scene,a,n,r,e,s);return this.displayList.add(h),this.updateList.add(h),h})},33663:(c,x,t)=>{/**
1744 * @author       Richard Davey <[email protected]>
1745 * @copyright    2013-2025 Phaser Studio Inc.
1746 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1747 */var o=t(9674),p=t(83419),a=t(48803),n=t(90664),r=t(4703),e=t(45650),s=new p({Extends:r,initialize:function(i,l,u,d,f,v,m,y){d||(d="__DEFAULT"),r.call(this,i,l,u,d,f),this.type="Plane",this.anims=new o(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(v,m,y),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(h,i,l){h===void 0&&(h=8),i===void 0&&(i=8),l===void 0&&(l=!1);var u=!1;return l&&(u=!0),this.gridWidth=h,this.gridHeight=i,this.isTiled=l,this.clear(),a({mesh:this,widthSegments:h,heightSegments:i,isOrtho:!1,tile:l,flipY:u}),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 l=this.gridWidth,u=this.gridHeight,d=this.vertices,f=i.u0,v=i.u1,m=i.v0,y=i.v1,g,T,S=0;if(this.isTiled)for(m=i.v1,y=i.v0,T=0;T<u;T++)for(g=0;g<l;g++)d[S++].setUVs(f,y),d[S++].setUVs(f,m),d[S++].setUVs(v,y),d[S++].setUVs(f,m),d[S++].setUVs(v,m),d[S++].setUVs(v,y);else{var E=l+1,M=u+1,F=v-f,A=y-m,P=[];for(T=0;T<M;T++)for(g=0;g<E;g++){var L=f+F*(g/l),O=m+A*(T/u);P.push(L,O)}for(T=0;T<u;T++)for(g=0;g<l;g++){var G=(g+E*T)*2,z=(g+E*(T+1))*2,Y=(g+1+E*(T+1))*2,X=(g+1+E*T)*2;d[S++].setUVs(P[G],P[G+1]),d[S++].setUVs(P[z],P[z+1]),d[S++].setUVs(P[X],P[X+1]),d[S++].setUVs(P[z],P[z+1]),d[S++].setUVs(P[Y],P[Y+1]),d[S++].setUVs(P[X],P[X+1])}}return this},setViewHeight:function(h){h===void 0&&(h=this.frame.height);var i=this.fov*(Math.PI/180);this.viewPosition.z=this.height/h/Math.tan(i/2),this.dirtyCache[10]=1},createCheckerboard:function(h,i,l,u,d){h===void 0&&(h=16777215),i===void 0&&(i=255),l===void 0&&(l=255),u===void 0&&(u=255),d===void 0&&(d=128);for(var f=n(h),v=n(i),m=[],y=0;y<16;y++)for(var g=0;g<16;g++)y<8&&g<8||y>7&&g>7?m.push(f.r,f.g,f.b,l):m.push(v.r,v.g,v.b,u);var T=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(m),16,16);return this.removeCheckerboard(),this.setTexture(T),this.setSizeToFrame(),this.setViewHeight(d),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){r.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}});c.exports=s},56015:(c,x,t)=>{/**
1748 * @author       Richard Davey <[email protected]>
1749 * @copyright    2013-2025 Phaser Studio Inc.
1750 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1751 */var o=t(25305),p=t(13059),a=t(44603),n=t(23568),r=t(35154),e=t(33663);a.register("plane",function(s,h){s===void 0&&(s={});var i=n(s,"key",null),l=n(s,"frame",null),u=r(s,"width",8),d=r(s,"height",8),f=r(s,"tile",!1),v=new e(this.scene,0,0,i,l,u,d,f);
1751h!==void 0&&(s.add=h);var m=r(s,"checkerboard",null);if(m){var y=r(m,"color1",16777215),g=r(m,"color2",255),T=r(m,"alpha1",255),S=r(m,"alpha2",255),E=r(m,"height",128);v.createCheckerboard(y,g,T,S,E)}return o(this.scene,v,s),p(v,s),v})},30985:(c,x,t)=>{/**
1752 * @author       Richard Davey <[email protected]>
1753 * @copyright    2013-2025 Phaser Studio Inc.
1754 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1755 */var o=t(33663),p=t(39429);p.register("plane",function(a,n,r,e,s,h,i){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i))})},80321:(c,x,t)=>{/**
1756 * @author       Richard Davey <[email protected]>
1757 * @copyright    2013-2025 Phaser Studio Inc.
1758 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1759 */var o=t(83419),p=t(31401),a=t(95643),n=t(30100),r=t(36060),e=t(67277),s=new o({Extends:a,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Transform,p.Visible,e],initialize:function(i,l,u,d,f,v,m){d===void 0&&(d=16777215),f===void 0&&(f=128),v===void 0&&(v=1),m===void 0&&(m=.1),a.call(this,i,"PointLight"),this.initPipeline(r.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(l,u),this.color=n(d),this.intensity=v,this.attenuation=m,this.width=f*2,this.height=f*2,this._radius=f},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}}});c.exports=s},39829:(c,x,t)=>{/**
1760 * @author       Richard Davey <[email protected]>
1761 * @copyright    2013-2025 Phaser Studio Inc.
1762 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1763 */var o=t(25305),p=t(44603),a=t(23568),n=t(80321);p.register("pointlight",function(r,e){r===void 0&&(r={});var s=a(r,"color",16777215),h=a(r,"radius",128),i=a(r,"intensity",1),l=a(r,"attenuation",.1),u=new n(this.scene,0,0,s,h,i,l);return e!==void 0&&(r.add=e),o(this.scene,u,r),u})},71255:(c,x,t)=>{/**
1764 * @author       Richard Davey <[email protected]>
1765 * @copyright    2013-2025 Phaser Studio Inc.
1766 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1767 */var o=t(39429),p=t(80321);o.register("pointlight",function(a,n,r,e,s,h){return this.displayList.add(new p(this.scene,a,n,r,e,s,h))})},67277:(c,x,t)=>{/**
1768 * @author       Richard Davey <[email protected]>
1769 * @copyright    2013-2025 Phaser Studio Inc.
1770 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1771 */var o=t(29747),p=o,a=o;p=t(57787),c.exports={renderWebGL:p,renderCanvas:a}},57787:(c,x,t)=>{/**
1772 * @author       Richard Davey <[email protected]>
1773 * @copyright    2013-2025 Phaser Studio Inc.
1774 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1775 */var o=t(91296),p=function(a,n,r,e){r.addToRenderList(n);var s=a.pipelines.set(n.pipeline),h=o(n,r,e).calc,i=n.width,l=n.height,u=-n._radius,d=-n._radius,f=u+i,v=d+l,m=h.getX(0,0),y=h.getY(0,0),g=h.getX(u,d),T=h.getY(u,d),S=h.getX(u,v),E=h.getY(u,v),M=h.getX(f,v),F=h.getY(f,v),A=h.getX(f,d),P=h.getY(f,d);a.pipelines.preBatch(n),s.batchPointLight(n,r,g,T,S,E,M,F,A,P,m,y),a.pipelines.postBatch(n)};c.exports=p},591:(c,x,t)=>{/**
1776 * @author       Richard Davey <[email protected]>
1777 * @copyright    2013-2025 Phaser Studio Inc.
1778 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1779 */var o=t(83419),p=t(81320),a=t(88571),n=new o({Extends:a,initialize:function(e,s,h,i,l,u){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=32),l===void 0&&(l=32),u===void 0&&(u=!0);var d=new p(e.sys.textures,"",i,l,u);a.call(this,e,s,h,d),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(r,e){this.width=r,this.height=e,this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=r,s.hitArea.height=e),this},resize:function(r,e,s){return this.texture.setSize(r,e,s),this.setSize(this.texture.width,this.texture.height),this},saveTexture:function(r){var e=this.texture;return e.key=r,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(r,e,s,h,i,l){return this.texture.fill(r,e,s,h,i,l),this},clear:function(){return this.texture.clear(),this},stamp:function(r,e,s,h,i){return this.texture.stamp(r,e,s,h,i),this},erase:function(r,e,s){return this.texture.erase(r,e,s),this},draw:function(r,e,s,h,i){return this.texture.draw(r,e,s,h,i),this},drawFrame:function(r,e,s,h,i,l){return this.texture.drawFrame(r,e,s,h,i,l),this},repeat:function(r,e,s,h,i,l,u,d,f){return this.texture.repeat(r,e,s,h,i,l,u,d,f),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(r,e,s,h,i){return this.texture.batchDraw(r,e,s,h,i),this},batchDrawFrame:function(r,e,s,h,i,l){return this.texture.batchDrawFrame(r,e,s,h,i,l),this},endDraw:function(r){return this.texture.endDraw(r),this},snapshotArea:function(r,e,s,h,i,l,u){return this.texture.snapshotArea(r,e,s,h,i,l,u),this},snapshot:function(r,e,s){return this.snapshotArea(0,0,this.width,this.height,r,e,s)},snapshotPixel:function(r,e,s){return this.snapshotArea(r,e,1,1,s,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});c.exports=n},34495:(c,x,t)=>{/**
1780 * @author       Richard Davey <[email protected]>
1781 * @copyright    2013-2025 Phaser Studio Inc.
1782 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1783 */var o=t(25305),p=t(44603),a=t(23568),n=t(591);p.register("renderTexture",function(r,e){r===void 0&&(r={});var s=a(r,"x",0),h=a(r,"y",0),i=a(r,"width",32),l=a(r,"height",32),u=new n(this.scene,s,h,i,l);return e!==void 0&&(r.add=e),o(this.scene,u,r),u})},60505:(c,x,t)=>{/**
1784 * @author       Richard Davey <[email protected]>
1785 * @copyright    2013-2025 Phaser Studio Inc.
1786 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1787 */var o=t(39429),p=t(591);o.register("renderTexture",function(a,n,r,e){return this.displayList.add(new p(this.scene,a,n,r,e))})},77757:(c,x,t)=>{/**
1788 * @author       Richard Davey <[email protected]>
1789 * @copyright    2013-2025 Phaser Studio Inc.
1790 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1791 */var o=t(9674),p=t(83419),a=t(31401),n=t(95643),r=t(36060),e=t(38745),s=t(26099),h=new p({Extends:n,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(l,u,d,f,v,m,y,g,T){f===void 0&&(f="__DEFAULT"),m===void 0&&(m=2),y===void 0&&(y=!0),n.call(this,l,"Rope"),this.anims=new o(this),this.points=m,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=f==="__DEFAULT",this.dirty=!1,this.horizontal=y,this._flipX=!1,this._flipY=!1,this._perp=new s,this.debugCallback=null,this.debugGraphic=null,this.setTexture(f,v),this.setPosition(u,d),this.setSizeToFrame(),this.initPipeline(r.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(m)&&this.resizeArrays(m.length),this.setPoints(m,g,T),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,l){var u=this.anims.currentFrame;this.anims.update(i,l),this.anims.currentFrame!==u&&(this.updateUVs(),this.updateVertices())},play:function(i,l,u){return this.anims.play(i,l,u),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,l,u){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,l,u))},setVertical:function(i,l,u){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,l,u)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,l){var u=this.points.length;if(u<1)return this;var d=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&l===void 0&&(i=[i]);var f,v=0;
1791if(l!==void 0)for(f=0;f<u;f++)v=f*2,d[v]=i,d[v+1]=l;else if(i.length===u)for(f=0;f<u;f++)v=f*2,d[v]=i[f],d[v+1]=i[f];else{var m=i[0];for(f=0;f<u;f++)v=f*2,i.length>v&&(m=i[v]),d[v]=m,i.length>v+1&&(m=i[v+1]),d[v+1]=m}return this},setColors:function(i){var l=this.points.length;if(l<1)return this;var u=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var d,f=0;if(i.length===l)for(d=0;d<l;d++)f=d*2,u[f]=i[d],u[f+1]=i[d];else{var v=i[0];for(d=0;d<l;d++)f=d*2,i.length>f&&(v=i[f]),u[f]=v,i.length>f+1&&(v=i[f+1]),u[f+1]=v}return this},setPoints:function(i,l,u){if(i===void 0&&(i=2),typeof i=="number"){var d=i;d<2&&(d=2),i=[];var f,v,m;if(this.horizontal)for(m=-this.frame.halfWidth,v=this.frame.width/(d-1),f=0;f<d;f++)i.push({x:m+f*v,y:0});else for(m=-this.frame.halfHeight,v=this.frame.height/(d-1),f=0;f<d;f++)i.push({x:0,y:m+f*v})}var y=i.length,g=this.points.length;return y<1?(console.warn("Rope: Not enough points given"),this):(y===1&&(i.unshift({x:0,y:0}),y++),g!==y&&this.resizeArrays(y),this.dirty=!0,this.points=i,this.updateUVs(),l!=null&&this.setColors(l),u!=null&&this.setAlphas(u),this)},updateUVs:function(){for(var i=this.uv,l=this.points.length,u=this.frame.u0,d=this.frame.v0,f=this.frame.u1,v=this.frame.v1,m=(f-u)/(l-1),y=(v-d)/(l-1),g=0;g<l;g++){var T=g*4,S,E,M,F;this.horizontal?(this._flipX?(S=f-g*m,M=f-g*m):(S=u+g*m,M=u+g*m),this._flipY?(E=v,F=d):(E=d,F=v)):(this._flipX?(S=u,M=f):(S=f,M=u),this._flipY?(E=v-g*y,F=v-g*y):(E=d+g*y,F=d+g*y)),i[T+0]=S,i[T+1]=E,i[T+2]=M,i[T+3]=F}return this},resizeArrays:function(i){var l=this.colors,u=this.alphas;this.vertices=new Float32Array(i*4),this.uv=new Float32Array(i*4),l=new Uint32Array(i*2),u=new Float32Array(i*2);for(var d=0;d<i*2;d++)l[d]=16777215,u[d]=1;return this.colors=l,this.alphas=u,this.dirty=!0,this},updateVertices:function(){var i=this._perp,l=this.points,u=this.vertices,d=l.length;if(this.dirty=!1,!(d<1)){for(var f,v=l[0],m=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,y=0;y<d;y++){var g=l[y],T=y*4;y<d-1?f=l[y+1]:f=g,i.x=f.y-v.y,i.y=-(f.x-v.x);var S=i.length();i.x/=S,i.y/=S,i.x*=m,i.y*=m,u[T]=g.x+i.x,u[T+1]=g.y+i.y,u[T+2]=g.x-i.x,u[T+3]=g.y-i.y,v=g}return this}},setDebug:function(i,l){return this.debugGraphic=i,!i&&!l?this.debugCallback=null:l?this.debugCallback=l:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(i,l,u){var d=i.debugGraphic,f=u[0],v=u[1],m=u[2],y=u[3];d.lineBetween(f,v,m,y);for(var g=4;g<l;g+=4){var T=u[g+0],S=u[g+1],E=u[g+2],M=u[g+3];d.lineBetween(f,v,T,S),d.lineBetween(m,y,E,M),d.lineBetween(m,y,T,S),d.lineBetween(T,S,E,M),f=T,v=S,m=E,y=M}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(i){return this._flipX=i,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(i){return this._flipY=i,this.updateUVs()}}});c.exports=h},95262:c=>{/**
1792 * @author       Richard Davey <[email protected]>
1793 * @copyright    2013-2025 Phaser Studio Inc.
1794 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1795 */var x=function(){};c.exports=x},26209:(c,x,t)=>{/**
1796 * @author       Richard Davey <[email protected]>
1797 * @copyright    2013-2025 Phaser Studio Inc.
1798 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1799 */var o=t(25305),p=t(44603),a=t(23568),n=t(35154),r=t(77757);p.register("rope",function(e,s){e===void 0&&(e={});var h=a(e,"key",null),i=a(e,"frame",null),l=a(e,"horizontal",!0),u=n(e,"points",void 0),d=n(e,"colors",void 0),f=n(e,"alphas",void 0),v=new r(this.scene,0,0,h,i,u,l,d,f);return s!==void 0&&(e.add=s),o(this.scene,v,e),v})},96819:(c,x,t)=>{/**
1800 * @author       Richard Davey <[email protected]>
1801 * @copyright    2013-2025 Phaser Studio Inc.
1802 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1803 */var o=t(77757),p=t(39429);p.register("rope",function(a,n,r,e,s,h,i,l){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i,l))})},38745:(c,x,t)=>{/**
1804 * @author       Richard Davey <[email protected]>
1805 * @copyright    2013-2025 Phaser Studio Inc.
1806 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1807 */var o=t(29747),p=o,a=o;p=t(20439),a=t(95262),c.exports={renderWebGL:p,renderCanvas:a}},20439:(c,x,t)=>{/**
1808 * @author       Richard Davey <[email protected]>
1809 * @copyright    2013-2025 Phaser Studio Inc.
1810 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1811 */var o=t(91296),p=t(70554),a=function(n,r,e,s){e.addToRenderList(r);
1811var h=n.pipelines.set(r.pipeline,r),i=o(r,e,s).calc,l=r.vertices,u=r.uv,d=r.colors,f=r.alphas,v=r.alpha,m=p.getTintAppendFloatAlpha,y=e.roundPixels,g=l.length,T=Math.floor(g*.5);h.flush(),n.pipelines.preBatch(r);var S=h.setGameObject(r),E=h.vertexViewF32,M=h.vertexViewU32,F=h.vertexCount*h.currentShader.vertexComponentCount-1,A=0,P=r.tintFill;r.dirty&&r.updateVertices();for(var L=r.debugCallback,O=[],G=0;G<g;G+=2){var z=l[G+0],Y=l[G+1],X=z*i.a+Y*i.c+i.e,I=z*i.b+Y*i.d+i.f;y&&(X=Math.round(X),I=Math.round(I)),E[++F]=X,E[++F]=I,E[++F]=u[G+0],E[++F]=u[G+1],E[++F]=S,E[++F]=P,M[++F]=m(d[A],e.alpha*(f[A]*v)),A++,L&&(O[G+0]=X,O[G+1]=I)}L&&L.call(r,r,g,O),h.vertexCount+=T,h.currentBatch.count=h.vertexCount-h.currentBatch.start,n.pipelines.postBatch(r)};c.exports=a},20071:(c,x,t)=>{/**
1812 * @author       Richard Davey <[email protected]>
1813 * @copyright    2013-2025 Phaser Studio Inc.
1814 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1815 */var o=t(83419),p=t(31401),a=t(95643),n=t(95540),r=t(79291),e=t(61622),s=t(25479),h=t(61340),i=t(95428),l=t(92503),u=new o({Extends:a,Mixins:[p.ComputedSize,p.Depth,p.GetBounds,p.Mask,p.Origin,p.ScrollFactor,p.Transform,p.Visible,s],initialize:function(f,v,m,y,g,T,S,E){m===void 0&&(m=0),y===void 0&&(y=0),g===void 0&&(g=128),T===void 0&&(T=128),a.call(this,f,"Shader"),this.blendMode=-1,this.shader;var M=f.sys.renderer;this.renderer=M,this.gl=M.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=M.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=M.width,this._rendererHeight=M.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(m,y),this.setSize(g,T),this.setOrigin(.5,.5),this.setShader(v,S,E),this.renderer.on(l.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(d){return this.renderToTexture?!0:!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&d.id)},setRenderToTexture:function(d,f){if(!this.renderToTexture){var v=this.width,m=this.height,y=this.renderer;this.glTexture=y.createTextureFromSource(null,v,m,0),this.framebuffer=y.createFramebuffer(v,m,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=m,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),d&&(this.texture=this.scene.sys.textures.addGLTexture(d,this.glTexture))}return this.shader&&(y.pipelines.clear(),this.load(),this.flush(),y.pipelines.rebind()),this},setShader:function(d,f,v){if(this.renderer.contextLost)return this._deferSetShader={key:d,textures:f,textureData:v},this;if(f===void 0&&(f=[]),typeof d=="string"){var m=this.scene.sys.cache.shader;if(!m.has(d))return console.warn("Shader missing: "+d),this;this.shader=m.get(d)}else this.shader=d;var y=this.gl,g=this.renderer;this.program&&g.deleteProgram(this.program);var T=g.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);y.uniformMatrix4fv(y.getUniformLocation(T.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),y.uniformMatrix4fv(y.getUniformLocation(T.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(T.webGLProgram,"uResolution"),this.width,this.height),this.program=T;var S=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:[S.getFullYear(),S.getMonth(),S.getDate(),S.getHours()*60*60+S.getMinutes()*60+S.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=r(!0,{},this.shader.uniforms,E):this.uniforms=E;for(var M=0;M<4;
1815M++)f[M]&&this.setSampler2D("iChannel"+M,f[M],M,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(d){return this.pointer=d,this},projOrtho:function(d,f,v,m){if(this.renderer.contextLost){this._deferProjOrtho={left:d,right:f,bottom:v,top:m};return}var y=-1e3,g=1e3,T=1/(d-f),S=1/(v-m),E=1/(y-g),M=this.projectionMatrix;M[0]=-2*T,M[5]=-2*S,M[10]=2*E,M[12]=(d+f)*T,M[13]=(m+v)*S,M[14]=(g+y)*E;var F=this.program,A=this.gl,P=this.renderer;P.setProgram(F),A.uniformMatrix4fv(A.getUniformLocation(F.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=f,this._rendererHeight=v},initUniforms:function(){var d=this.renderer.glFuncMap,f=this.program;this._textureCount=0;for(var v in this.uniforms){var m=this.uniforms[v],y=m.type,g=d[y];m.uniformLocation=this.renderer.createUniformLocation(f,v),y!=="sampler2D"&&(m.glMatrix=g.matrix,m.glValueLength=g.length,m.glFunc=g.func)}},setSampler2DBuffer:function(d,f,v,m,y,g){y===void 0&&(y=0),g===void 0&&(g={});var T=this.uniforms[d];return T.value=f,g.width=v,g.height=m,T.textureData=g,this._textureCount=y,this.initSampler2D(T),this},setSampler2D:function(d,f,v,m){v===void 0&&(v=0);var y=this.scene.sys.textures;if(y.exists(f)){var g=y.getFrame(f);if(g.glTexture&&g.glTexture.isRenderTexture)return this.setSampler2DBuffer(d,g.glTexture,g.width,g.height,v,m);var T=this.uniforms[d],S=g.source;T.textureKey=f,T.source=S.image,T.value=g.glTexture,S.isGLTexture&&(m||(m={}),m.width=S.width,m.height=S.height),m&&(T.textureData=m),this._textureCount=v,this.initSampler2D(T)}return this},setUniform:function(d,f){return e(this.uniforms,d,f),this},getUniform:function(d){return n(this.uniforms,d,null)},setChannel0:function(d,f){return this.setSampler2D("iChannel0",d,0,f)},setChannel1:function(d,f){return this.setSampler2D("iChannel1",d,1,f)},setChannel2:function(d,f){return this.setSampler2D("iChannel2",d,2,f)},setChannel3:function(d,f){return this.setSampler2D("iChannel3",d,3,f)},initSampler2D:function(d){if(d.value){var f=d.textureData;if(f&&!d.value.isRenderTexture){var v=this.gl,m=d.value,y=v[n(f,"magFilter","linear").toUpperCase()],g=v[n(f,"minFilter","linear").toUpperCase()],T=v[n(f,"wrapS","repeat").toUpperCase()],S=v[n(f,"wrapT","repeat").toUpperCase()],E=v[n(f,"format","rgba").toUpperCase()],M=n(f,"flipY",!1),F=n(f,"width",m.width),A=n(f,"height",m.height),P=n(f,"source",m.pixels);f.repeat&&(T=v.REPEAT,S=v.REPEAT),f.width&&(P=null),m.update(P,F,A,M,T,S,g,y,E)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var d=this.gl,f=this.uniforms,v,m,y,g,T,S=0;for(var E in f)v=f[E],y=v.glFunc,m=v.glValueLength,g=v.uniformLocation,T=v.value,T!==null&&(m===1?v.glMatrix?y.call(d,g.webGLUniformLocation,v.transpose,T):y.call(d,g.webGLUniformLocation,T):m===2?y.call(d,g.webGLUniformLocation,T.x,T.y):m===3?y.call(d,g.webGLUniformLocation,T.x,T.y,T.z):m===4?y.call(d,g.webGLUniformLocation,T.x,T.y,T.z,T.w):v.type==="sampler2D"&&(d.activeTexture(d.TEXTURE0+S),d.bindTexture(d.TEXTURE_2D,T.webGLTexture),d.uniform1i(g.webGLUniformLocation,S),S++))},load:function(d){var f=this.gl,v=this.width,m=this.height,y=this.renderer,g=this.program,T=this.viewMatrix;if(!this.renderToTexture){var S=-this._displayOriginX,E=-this._displayOriginY;T[0]=d[0],T[1]=d[1],T[4]=d[2],T[5]=d[3],T[8]=d[4],T[9]=d[5],T[12]=T[0]*S+T[4]*E,T[13]=T[1]*S+T[5]*E}f.useProgram(g.webGLProgram),f.uniformMatrix4fv(f.getUniformLocation(g.webGLProgram,"uViewMatrix"),!1,T),f.uniformMatrix4fv(f.getUniformLocation(g.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),f.uniform2f(f.getUniformLocation(g.webGLProgram,"uResolution"),this.width,this.height);var M=this.uniforms,F=M.resolution;F.value.x=v,F.value.y=m,M.time.value=y.game.loop.getDuration();var A=this.pointer;if(A){var P=M.mouse,L=A.x/v,O=1-A.y/m;P.value.x=L.toFixed(2),P.value.y=O.toFixed(2)}this.syncUniforms()},flush:function(){var d=this.width,f=this.height,v=this.program,m=this.gl,y=this.vertexBuffer,g=this.renderer,T=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(g.setFramebuffer(this.framebuffer),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT)),m.bindBuffer(m.ARRAY_BUFFER,y.webGLBuffer);var S=m.getAttribLocation(v.webGLProgram,"inPosition");S!==-1&&(m.enableVertexAttribArray(S),m.vertexAttribPointer(S,2,m.FLOAT,!1,T,0));var E=this.vertexViewF32;E[3]=f,E[4]=d,E[5]=f,E[8]=d,E[9]=f,E[10]=d;var M=6;m.bufferSubData(m.ARRAY_BUFFER,0,this.bytes.subarray(0,M*T)),m.drawArrays(m.TRIANGLES,0,M),this.renderToTexture&&g.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var d=this._deferSetShader.key,f=this._deferSetShader.textures,v=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(d,f,v)}
1815if(this._deferProjOrtho!==null){var m=this._deferProjOrtho.left,y=this._deferProjOrtho.right,g=this._deferProjOrtho.bottom,T=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(m,y,g,T)}},preDestroy:function(){var d=this.renderer;d.off(l.RESTORE_WEBGL,this.onContextRestored,this),d.deleteProgram(this.program),d.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(d.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),i(this.uniforms,function(f){d.deleteUniformLocation(f.uniformLocation),f.uniformLocation=null})}});c.exports=u},80464:c=>{/**
1816 * @author       Richard Davey <[email protected]>
1817 * @copyright    2013-2025 Phaser Studio Inc.
1818 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1819 */var x=function(){};c.exports=x},54935:(c,x,t)=>{/**
1820 * @author       Richard Davey <[email protected]>
1821 * @copyright    2013-2025 Phaser Studio Inc.
1822 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1823 */var o=t(25305),p=t(44603),a=t(23568),n=t(20071);p.register("shader",function(r,e){r===void 0&&(r={});var s=a(r,"key",null),h=a(r,"x",0),i=a(r,"y",0),l=a(r,"width",128),u=a(r,"height",128),d=new n(this.scene,s,h,i,l,u);return e!==void 0&&(r.add=e),o(this.scene,d,r),d})},74177:(c,x,t)=>{/**
1824 * @author       Richard Davey <[email protected]>
1825 * @copyright    2013-2025 Phaser Studio Inc.
1826 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1827 */var o=t(20071),p=t(39429);p.register("shader",function(a,n,r,e,s,h,i){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i))})},25479:(c,x,t)=>{/**
1828 * @author       Richard Davey <[email protected]>
1829 * @copyright    2013-2025 Phaser Studio Inc.
1830 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1831 */var o=t(29747),p=o,a=o;p=t(19257),a=t(80464),c.exports={renderWebGL:p,renderCanvas:a}},19257:(c,x,t)=>{/**
1832 * @author       Richard Davey <[email protected]>
1833 * @copyright    2013-2025 Phaser Studio Inc.
1834 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1835 */var o=t(91296),p=function(a,n,r,e){if(n.shader){if(r.addToRenderList(n),a.pipelines.clear(),n.renderToTexture)n.load(),n.flush();else{var s=o(n,r,e).calc;(a.width!==n._rendererWidth||a.height!==n._rendererHeight)&&n.projOrtho(0,a.width,a.height,0),n.load(s.matrix),n.flush()}a.pipelines.rebind()}};c.exports=p},10441:(c,x,t)=>{/**
1836 * @author       Richard Davey <[email protected]>
1837 * @copyright    2013-2025 Phaser Studio Inc.
1838 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1839 */var o=t(70554),p=function(a,n,r,e,s,h){for(var i=o.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*e),l=r.pathData,u=r.pathIndexes,d=0;d<u.length;d+=3){var f=u[d]*2,v=u[d+1]*2,m=u[d+2]*2,y=l[f+0]-s,g=l[f+1]-h,T=l[v+0]-s,S=l[v+1]-h,E=l[m+0]-s,M=l[m+1]-h,F=n.getX(y,g),A=n.getY(y,g),P=n.getX(T,S),L=n.getY(T,S),O=n.getX(E,M),G=n.getY(E,M);a.batchTri(r,F,A,P,L,O,G,0,0,1,1,i,i,i,2)}};c.exports=p},65960:c=>{/**
1840 * @author       Richard Davey <[email protected]>
1841 * @copyright    2013-2025 Phaser Studio Inc.
1842 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1843 */var x=function(t,o,p,a){var n=p||o.fillColor,r=a||o.fillAlpha,e=(n&16711680)>>>16,s=(n&65280)>>>8,h=n&255;t.fillStyle="rgba("+e+","+s+","+h+","+r+")"};c.exports=x},75177:c=>{/**
1844 * @author       Richard Davey <[email protected]>
1845 * @copyright    2013-2025 Phaser Studio Inc.
1846 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1847 */var x=function(t,o,p,a){var n=p||o.strokeColor,r=a||o.strokeAlpha,e=(n&16711680)>>>16,s=(n&65280)>>>8,h=n&255;t.strokeStyle="rgba("+e+","+s+","+h+","+r+")",t.lineWidth=o.lineWidth};c.exports=x},17803:(c,x,t)=>{/**
1848 * @author       Richard Davey <[email protected]>
1849 * @copyright    2013-2025 Phaser Studio Inc.
1850 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1851 */var o=t(83419),p=t(31401),a=t(95643),n=t(23031),r=new o({Extends:a,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.GetBounds,p.Mask,p.Origin,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Transform,p.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 n,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}
1851,set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});c.exports=r},34682:(c,x,t)=>{/**
1852 * @author       Richard Davey <[email protected]>
1853 * @copyright    2013-2025 Phaser Studio Inc.
1854 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1855 */var o=t(70554),p=function(a,n,r,e,s){var h=a.strokeTint,i=o.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*r);h.TL=i,h.TR=i,h.BL=i,h.BR=i;var l=n.pathData,u=l.length-1,d=n.lineWidth,f=d/2,v=l[0]-e,m=l[1]-s;n.closePath||(u-=2);for(var y=2;y<u;y+=2){var g=l[y]-e,T=l[y+1]-s;a.batchLine(v,m,g,T,f,f,d,y-2,n.closePath?y===u-1:!1),v=g,m=T}};c.exports=p},23629:(c,x,t)=>{/**
1856 * @author       Richard Davey <[email protected]>
1857 * @copyright    2013-2025 Phaser Studio Inc.
1858 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1859 */var o=t(13609),p=t(83419),a=t(39506),n=t(94811),r=t(96503),e=t(36383),s=t(17803),h=new p({Extends:s,Mixins:[o],initialize:function(l,u,d,f,v,m,y,g,T){u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=128),v===void 0&&(v=0),m===void 0&&(m=360),y===void 0&&(y=!1),s.call(this,l,"Arc",new r(0,0,f)),this._startAngle=v,this._endAngle=m,this._anticlockwise=y,this._iterations=.01,this.setPosition(u,d);var S=this.geom.radius*2;this.setSize(S,S),g!==void 0&&this.setFillStyle(g,T),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 l=i*2;this.setSize(l,l),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,l){return this._startAngle=i,l!==void 0&&(this._anticlockwise=l),this.updateData()},setEndAngle:function(i,l){return this._endAngle=i,l!==void 0&&(this._anticlockwise=l),this.updateData()},updateData:function(){var i=this._iterations,l=i,u=this.geom.radius,d=a(this._startAngle),f=a(this._endAngle),v=this._anticlockwise,m=u,y=u;f-=d,v?f<-e.PI2?f=-e.PI2:f>0&&(f=-e.PI2+f%e.PI2):f>e.PI2?f=e.PI2:f<0&&(f=e.PI2+f%e.PI2);for(var g=[m+Math.cos(d)*u,y+Math.sin(d)*u],T;l<1;)T=f*l+d,g.push(m+Math.cos(T)*u,y+Math.sin(T)*u),l+=i;return T=f+d,g.push(m+Math.cos(T)*u,y+Math.sin(T)*u),g.push(m+Math.cos(d)*u,y+Math.sin(d)*u),this.pathIndexes=n(g),this.pathData=g,this}});c.exports=h},42542:(c,x,t)=>{/**
1860 * @author       Richard Davey <[email protected]>
1861 * @copyright    2013-2025 Phaser Studio Inc.
1862 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1863 */var o=t(39506),p=t(65960),a=t(75177),n=t(20926),r=function(e,s,h,i){h.addToRenderList(s);var l=e.currentContext;if(n(e,l,s,h,i)){var u=s.radius;l.beginPath(),l.arc(u-s.originX*(u*2),u-s.originY*(u*2),u,o(s._startAngle),o(s._endAngle),s.anticlockwise),s.closePath&&l.closePath(),s.isFilled&&(p(l,s),l.fill()),s.isStroked&&(a(l,s),l.stroke()),l.restore()}};c.exports=r},42563:(c,x,t)=>{/**
1864 * @author       Richard Davey <[email protected]>
1865 * @copyright    2013-2025 Phaser Studio Inc.
1866 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1867 */var o=t(23629),p=t(39429);p.register("arc",function(a,n,r,e,s,h,i,l){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i,l))}),p.register("circle",function(a,n,r,e,s){return this.displayList.add(new o(this.scene,a,n,r,0,360,!1,e,s))})},13609:(c,x,t)=>{/**
1868 * @author       Richard Davey <[email protected]>
1869 * @copyright    2013-2025 Phaser Studio Inc.
1870 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1871 */var o=t(29747),p=o,a=o;p=t(41447),a=t(42542),c.exports={renderWebGL:p,renderCanvas:a}},41447:(c,x,t)=>{/**
1872 * @author       Richard Davey <[email protected]>
1873 * @copyright    2013-2025 Phaser Studio Inc.
1874 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1875 */var o=t(91296),p=t(10441),a=t(34682),n=function(r,e,s,h){s.addToRenderList(e);var i=r.pipelines.set(e.pipeline),l=o(e,s,h),u=i.calcMatrix.copyFrom(l.calc),d=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&p(i,u,e,v,d,f),e.isStroked&&a(i,e,v,d,f),r.pipelines.postBatch(e)};c.exports=n},89:(c,x,t)=>{/**
1876 * @author       Richard Davey <[email protected]>
1877 * @copyright    2013-2025 Phaser Studio Inc.
1878 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1879 */var o=t(83419),p=t(33141),a=t(94811),n=t(87841),r=t(17803),e=new o({Extends:r,Mixins:[p],initialize:function(h,i,l,u,d,f){i===void 0&&(i=0),l===void 0&&(l=0),r.call(this,h,"Curve",u),this._smoothness=32,this._curveBounds=new n,this.closePath=!1,this.setPosition(i,l),d!==void 0&&this.setFillStyle(d,f),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=[],l=this.geom.getPoints(h),u=0;u<l.length;u++)i.push(l[u].x,l[u].y);return i.push(l[0].x,l[0].y),this.pathIndexes=a(i),this.pathData=i,this}});c.exports=e},3170:(c,x,t)=>{/**
1880 * @author       Richard Davey <[email protected]>
1881 * @copyright    2013-2025 Phaser Studio Inc.
1882 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1883 */var o=t(65960),p=t(75177),a=t(20926),n=function(r,e,s,h){s.addToRenderList(e);var i=r.currentContext;if(a(r,i,e,s,h)){var l=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,d=e.pathData,f=d.length-1,v=d[0]-l,m=d[
18831]-u;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var y=2;y<f;y+=2){var g=d[y]-l,T=d[y+1]-u;i.lineTo(g,T)}e.closePath&&i.closePath(),e.isFilled&&(o(i,e),i.fill()),e.isStroked&&(p(i,e),i.stroke()),i.restore()}};c.exports=n},40511:(c,x,t)=>{/**
1884 * @author       Richard Davey <[email protected]>
1885 * @copyright    2013-2025 Phaser Studio Inc.
1886 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1887 */var o=t(39429),p=t(89);o.register("curve",function(a,n,r,e,s){return this.displayList.add(new p(this.scene,a,n,r,e,s))})},33141:(c,x,t)=>{/**
1888 * @author       Richard Davey <[email protected]>
1889 * @copyright    2013-2025 Phaser Studio Inc.
1890 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1891 */var o=t(29747),p=o,a=o;p=t(53987),a=t(3170),c.exports={renderWebGL:p,renderCanvas:a}},53987:(c,x,t)=>{/**
1892 * @author       Richard Davey <[email protected]>
1893 * @copyright    2013-2025 Phaser Studio Inc.
1894 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1895 */var o=t(10441),p=t(91296),a=t(34682),n=function(r,e,s,h){s.addToRenderList(e);var i=r.pipelines.set(e.pipeline),l=p(e,s,h),u=i.calcMatrix.copyFrom(l.calc),d=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,v=s.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&o(i,u,e,v,d,f),e.isStroked&&a(i,e,v,d,f),r.pipelines.postBatch(e)};c.exports=n},19921:(c,x,t)=>{/**
1896 * @author       Richard Davey <[email protected]>
1897 * @copyright    2013-2025 Phaser Studio Inc.
1898 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1899 */var o=t(83419),p=t(94811),a=t(54205),n=t(8497),r=t(17803),e=new o({Extends:r,Mixins:[a],initialize:function(h,i,l,u,d,f,v){i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=128),d===void 0&&(d=128),r.call(this,h,"Ellipse",new n(u/2,d/2,u,d)),this._smoothness=64,this.setPosition(i,l),this.width=u,this.height=d,f!==void 0&&this.setFillStyle(f,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.updateDisplayOrigin(),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<h.length;i++)s.push(h[i].x,h[i].y);return s.push(h[0].x,h[0].y),this.pathIndexes=p(s),this.pathData=s,this}});c.exports=e},7930:(c,x,t)=>{/**
1900 * @author       Richard Davey <[email protected]>
1901 * @copyright    2013-2025 Phaser Studio Inc.
1902 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1903 */var o=t(65960),p=t(75177),a=t(20926),n=function(r,e,s,h){s.addToRenderList(e);var i=r.currentContext;if(a(r,i,e,s,h)){var l=e._displayOriginX,u=e._displayOriginY,d=e.pathData,f=d.length-1,v=d[0]-l,m=d[
19031]-u;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var y=2;y<f;y+=2){var g=d[y]-l,T=d[y+1]-u;i.lineTo(g,T)}i.closePath(),e.isFilled&&(o(i,e),i.fill()),e.isStroked&&(p(i,e),i.stroke()),i.restore()}};c.exports=n},1543:(c,x,t)=>{/**
1904 * @author       Richard Davey <[email protected]>
1905 * @copyright    2013-2025 Phaser Studio Inc.
1906 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1907 */var o=t(19921),p=t(39429);p.register("ellipse",function(a,n,r,e,s,h){return this.displayList.add(new o(this.scene,a,n,r,e,s,h))})},54205:(c,x,t)=>{/**
1908 * @author       Richard Davey <[email protected]>
1909 * @copyright    2013-2025 Phaser Studio Inc.
1910 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1911 */var o=t(29747),p=o,a=o;p=t(19467),a=t(7930),c.exports={renderWebGL:p,renderCanvas:a}},19467:(c,x,t)=>{/**
1912 * @author       Richard Davey <[email protected]>
1913 * @copyright    2013-2025 Phaser Studio Inc.
1914 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1915 */var o=t(10441),p=t(91296),a=t(34682),n=function(r,e,s,h){s.addToRenderList(e);var i=r.pipelines.set(e.pipeline),l=p(e,s,h),u=i.calcMatrix.copyFrom(l.calc),d=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&o(i,u,e,v,d,f),e.isStroked&&a(i,e,v,d,f),r.pipelines.postBatch(e)};c.exports=n},30479:(c,x,t)=>{/**
1916 * @author       Richard Davey <[email protected]>
1917 * @copyright    2013-2025 Phaser Studio Inc.
1918 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1919 */var o=t(83419),p=t(17803),a=t(26015),n=new o({Extends:p,Mixins:[a],initialize:function(e,s,h,i,l,u,d,f,v,m,y){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=128),l===void 0&&(l=128),u===void 0&&(u=32),d===void 0&&(d=32),p.call(this,e,"Grid",null),this.cellWidth=u,this.cellHeight=d,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,l),this.setFillStyle(f,v),m!==void 0&&this.setOutlineStyle(m,y),this.updateDisplayOrigin()},setFillStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showCells=!1:(this.fillColor=r,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showAltCells=!1:(this.altFillColor=r,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showOutline=!1:(this.outlineFillColor=r,this.outlineFillAlpha=e,this.showOutline=!0),this}});c.exports=n},49912:(c,x,t)=>{/**
1920 * @author       Richard Davey <[email protected]>
1921 * @copyright    2013-2025 Phaser Studio Inc.
1922 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1923 */var o=t(65960),p=t(75177),a=t(20926),n=function(r,e,s,h){s.addToRenderList(e);var i=r.currentContext;if(a(r,i,e,s,h)){var l=-e._displayOriginX,u=-e._displayOriginY,d=s.alpha*e.alpha,f=e.width,v=e.height,m=e.cellWidth,y=e.cellHeight,g=Math.ceil(f/m),T=Math.ceil(v/y),S=m,E=y,M=m-(g*m-f),F=y-(T*y-v),A=e.showCells,P=e.showAltCells,L=e.showOutline,O=0,G=0,z=0,Y=0,X=0;if(L&&(S--,E--,M===m&&M--,F===y&&F--),A&&e.fillAlpha>0)for(o(i,e),G=0;G<T;G++)for(P&&(z=G%2),O=0;O<g;O++){if(P&&z){z=0;continue}z++,Y=O<g-1?S:M,X=G<T-1?E:F,i.fillRect(l+O*m,u+G*y,Y,X)}if(P&&e.altFillAlpha>0)for(o(i,e,e.altFillColor,e.altFillAlpha*d),G=0;G<T;G++)for(P&&(z=G%2),O=0;O<g;O++){if(P&&!z){z=1;continue}z=0,Y=O<g-1?S:M,X=G<T-1?E:F,i.fillRect(l+O*m,u+G*y,Y,X)}if(L&&e.outlineFillAlpha>0){for(p(i,e,e.outlineFillColor,e.outlineFillAlpha*d),O=1;O<g;O++){var I=O*m;i.beginPath(),i.moveTo(I+l,u),i.lineTo(I+l,v+u),i.stroke()}for(G=1;G<T;G++){var U=G*y;i.beginPath(),i.moveTo(l,U+u),i.lineTo(l+f,U+u),i.stroke()}}i.restore()}};c.exports=n},34137:(c,x,t)=>{/**
1924 * @author       Richard Davey <[email protected]>
1925 * @copyright    2013-2025 Phaser Studio Inc.
1926 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1927 */var o=t(39429),p=t(30479);o.register("grid",function(a,n,r,e,s,h,i,l,u,d){return this.displayList.add(new p(this.scene,a,n,r,e,s,h,i,l,u,d))})},26015:(c,x,t)=>{/**
1928 * @author       Richard Davey <[email protected]>
1929 * @copyright    2013-2025 Phaser Studio Inc.
1930 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1931 */var o=t(29747),p=o,a=o;p=t(46161),a=t(49912),c.exports={renderWebGL:p,renderCanvas:a}},46161:(c,x,t)=>{/**
1932 * @author       Richard Davey <[email protected]>
1933 * @copyright    2013-2025 Phaser Studio Inc.
1934 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1935 */var o=t(91296),p=t(70554),a=function(n,r,e,s){e.addToRenderList(r);var h=n.pipelines.set(r.pipeline),i=o(r,e,s),l=h.calcMatrix.copyFrom(i.calc);l.translate(-r._displayOriginX,-r._displayOriginY);var u=e.alpha*r.alpha,d=r.width,f=r.height,v=r.cellWidth,m=r.cellHeight,y=Math.ceil(d/v),g=Math.ceil(f/m),T=v,S=m,E=v-(y*v-d),M=m-(g*m-f),F,A,P=r.showCells,L=r.showAltCells,O=r.showOutline,G=0,z=0,Y=0,X=0,I=0;if(O&&(T--,S--,E===v&&E--,M===m&&M--),n.pipelines.preBatch(r),P&&r.fillAlpha>0)for(F=h.fillTint,A=p.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*u),F.TL=A,F.TR=A,F.BL=A,F.BR=A,z=0;z<g;z++)for(L&&(Y=z%2),G=0;G<y;G++){if(L&&Y){Y=0;continue}Y++,X=G<y-1?T:E,I=z<g-1?S:M,h.batchFillRect(G*v,z*m,X,I)}if(L&&r.altFillAlpha>0)for(F=h.fillTint,A=p.getTintAppendFloatAlpha(r.altFillColor,r.altFillAlpha*u),F.TL=A,F.TR=A,F.BL=A,F.BR=A,z=0;z<g;z++)for(L&&(Y=z%2),G=0;G<y;G++){if(L&&!Y){Y=1;continue}Y=0,X=G<y-1?T:E,I=z<g-1?S:M,h.batchFillRect(G*v,z*m,X,I)}if(O&&r.outlineFillAlpha>0){var U=h.strokeTint,D=p.getTintAppendFloatAlpha(r.outlineFillColor,r.outlineFillAlpha*u);for(U.TL=D,U.TR=D,U.BL=D,U.BR=D,G=1;G<y;G++){var V=G*v;h.batchLine(V,0,V,f,r.lineWidth,r.lineWidth,1,0,!1)}for(z=1;z<g;z++){var B=z*m;h.batchLine(0,B,d,B,r.lineWidth,r.lineWidth,1,0,!1)}}n.pipelines.postBatch(r)};c.exports=a},61475:(c,x,t)=>{/**
1936 * @author       Richard Davey <[email protected]>
1937 * @copyright    2013-2025 Phaser Studio Inc.
1938 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1939 */var o=t(99651),p=t(83419),a=t(17803),n=new p({Extends:a,Mixins:[o],initialize:function(e,s,h,i,l,u,d,f){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=48),l===void 0&&(l=32),u===void 0&&(u=15658734),d===void 0&&(d=10066329),f===void 0&&(f=13421772),a.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=u,this.fillLeft=d,this.fillRight=f,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(s,h),this.setSize(i,l),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setFaces:function(r,e,s){return r===void 0&&(r=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=r,this.showLeft=e,this.showRight=s,this},setFillStyle:function(r,e,s){return this.fillTop=r,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});c.exports=n},11508:(c,x,t)=>{/**
1940 * @author       Richard Davey <[email protected]>
1941 * @copyright    2013-2025 Phaser Studio Inc.
1942 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1943 */var o=t(65960),p=t(20926),a=function(n,r,e,s){e.addToRenderList(r);var h=n.currentContext;if(p(n,h,r,e,s)&&r.isFilled){var i=r.width,l=r.height,u=i/2,d=i/r.projection;r.showTop&&(o(h,r,r.fillTop),h.beginPath(),h.moveTo(-u,-l),h.lineTo(0,-d-l),h.lineTo(u,-l),h.lineTo(u,-1),h.lineTo(0,d-1),h.lineTo(-u,-1),h.lineTo(-u,-l),h.fill()),r.showLeft&&(o(h,r,r.fillLeft),h.beginPath(),h.moveTo(-u,0),h.lineTo(0,d),h.lineTo(0,d-l),h.lineTo(-u,-l),h.lineTo(-u,0),h.fill()),r.showRight&&(o(h,r,r.fillRight),h.beginPath(),h.moveTo(u,0),h.lineTo(0,d),h.lineTo(0,d-l),h.lineTo(u,-l),h.lineTo(u,0),h.fill()),h.restore(
1943)}};c.exports=a},3933:(c,x,t)=>{/**
1944 * @author       Richard Davey <[email protected]>
1945 * @copyright    2013-2025 Phaser Studio Inc.
1946 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1947 */var o=t(39429),p=t(61475);o.register("isobox",function(a,n,r,e,s,h,i){return this.displayList.add(new p(this.scene,a,n,r,e,s,h,i))})},99651:(c,x,t)=>{/**
1948 * @author       Richard Davey <[email protected]>
1949 * @copyright    2013-2025 Phaser Studio Inc.
1950 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1951 */var o=t(29747),p=o,a=o;p=t(68149),a=t(11508),c.exports={renderWebGL:p,renderCanvas:a}},68149:(c,x,t)=>{/**
1952 * @author       Richard Davey <[email protected]>
1953 * @copyright    2013-2025 Phaser Studio Inc.
1954 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1955 */var o=t(91296),p=t(70554),a=function(n,r,e,s){e.addToRenderList(r);var h=n.pipelines.set(r.pipeline),i=o(r,e,s),l=h.calcMatrix.copyFrom(i.calc),u=r.width,d=r.height,f=u/2,v=u/r.projection,m=e.alpha*r.alpha;if(r.isFilled){var y,g,T,S,E,M,F,A,P;n.pipelines.preBatch(r),r.showTop&&(y=p.getTintAppendFloatAlpha(r.fillTop,m),g=l.getX(-f,-d),T=l.getY(-f,-d),S=l.getX(0,-v-d),E=l.getY(0,-v-d),M=l.getX(f,-d),F=l.getY(f,-d),A=l.getX(0,v-d),P=l.getY(0,v-d),h.batchQuad(r,g,T,S,E,M,F,A,P,0,0,1,1,y,y,y,y,2)),r.showLeft&&(y=p.getTintAppendFloatAlpha(r.fillLeft,m),g=l.getX(-f,0),T=l.getY(-f,0),S=l.getX(0,v),E=l.getY(0,v),M=l.getX(0,v-d),F=l.getY(0,v-d),A=l.getX(-f,-d),P=l.getY(-f,-d),h.batchQuad(r,g,T,S,E,M,F,A,P,0,0,1,1,y,y,y,y,2)),r.showRight&&(y=p.getTintAppendFloatAlpha(r.fillRight,m),g=l.getX(f,0),T=l.getY(f,0),S=l.getX(0,v),E=l.getY(0,v),M=l.getX(0,v-d),F=l.getY(0,v-d),A=l.getX(f,-d),P=l.getY(f,-d),h.batchQuad(r,g,T,S,E,M,F,A,P,0,0,1,1,y,y,y,y,2)),n.pipelines.postBatch(r)}};c.exports=a},16933:(c,x,t)=>{/**
1956 * @author       Richard Davey <[email protected]>
1957 * @copyright    2013-2025 Phaser Studio Inc.
1958 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1959 */var o=t(83419),p=t(60561),a=t(17803),n=new o({Extends:a,Mixins:[p],initialize:function(e,s,h,i,l,u,d,f,v){s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i=48),l===void 0&&(l=32),u===void 0&&(u=!1),d===void 0&&(d=15658734),f===void 0&&(f=10066329),v===void 0&&(v=13421772),a.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=d,this.fillLeft=f,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=u,this.isFilled=!0,this.setPosition(s,h),this.setSize(i,l),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setReversed:function(r){return this.isReversed=r,this},setFaces:function(r,e,s){return r===void 0&&(r=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=r,this.showLeft=e,this.showRight=s,this},setFillStyle:function(r,e,s){return this.fillTop=r,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});c.exports=n},79590:(c,x,t)=>{/**
1960 * @author       Richard Davey <[email protected]>
1961 * @copyright    2013-2025 Phaser Studio Inc.
1962 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1963 */var o=t(65960),p=t(20926),a=function(n,r,e,s){e.addToRenderList(r);var h=n.currentContext;if(p(n,h,r,e,s)&&r.isFilled){var i=r.width,l=r.height,u=i/2,d=i/r.projection,f=r.isReversed;r.showTop&&f&&(o(h,r,r.fillTop),h.beginPath(),h.moveTo(-u,-l),h.lineTo(0,-d-l),h.lineTo(u,-l),h.lineTo(0,d-l),h.fill()),r.showLeft&&(o(h,r,r.fillLeft),h.beginPath(),f?(h.moveTo(-u,-l),h.lineTo(0,d),h.lineTo(0,d-l)):(h.moveTo(-u,0),h.lineTo(0,d),h.lineTo(0,d-l)),h.fill()),r.showRight&&(o(h,r,r.fillRight),h.beginPath(),f?(h.moveTo(u,-l),h.lineTo(0,d),h.lineTo(0,d-l)):(h.moveTo(u,0),h.lineTo(0,d),h.lineTo(0,d-l)),h.fill()),h.restore()}};c.exports=a},49803:(c,x,t)=>{/**
1964 * @author       Richard Davey <[email protected]>
1965 * @copyright    2013-2025 Phaser Studio Inc.
1966 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1967 */var o=t(39429),p=t(16933);o.register("isotriangle",function(a,n,r,e,s,h,i,l){return this.displayList.add(new p(this.scene,a,n,r,e,s,h,i,l))})},60561:(c,x,t)=>{/**
1968 * @author       Richard Davey <[email protected]>
1969 * @copyright    2013-2025 Phaser Studio Inc.
1970 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1971 */var o=t(29747),p=o,a=o;p=t(51503),a=t(79590),c.exports={renderWebGL:p,renderCanvas:a}}
1971,51503:(c,x,t)=>{/**
1972 * @author       Richard Davey <[email protected]>
1973 * @copyright    2013-2025 Phaser Studio Inc.
1974 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1975 */var o=t(91296),p=t(70554),a=function(n,r,e,s){e.addToRenderList(r);var h=n.pipelines.set(r.pipeline),i=o(r,e,s),l=h.calcMatrix.copyFrom(i.calc),u=r.width,d=r.height,f=u/2,v=u/r.projection,m=r.isReversed,y=e.alpha*r.alpha;if(r.isFilled){n.pipelines.preBatch(r);var g,T,S,E,M,F,A;if(r.showTop&&m){g=p.getTintAppendFloatAlpha(r.fillTop,y),T=l.getX(-f,-d),S=l.getY(-f,-d),E=l.getX(0,-v-d),M=l.getY(0,-v-d),F=l.getX(f,-d),A=l.getY(f,-d);var P=l.getX(0,v-d),L=l.getY(0,v-d);h.batchQuad(r,T,S,E,M,F,A,P,L,0,0,1,1,g,g,g,g,2)}r.showLeft&&(g=p.getTintAppendFloatAlpha(r.fillLeft,y),m?(T=l.getX(-f,-d),S=l.getY(-f,-d),E=l.getX(0,v),M=l.getY(0,v),F=l.getX(0,v-d),A=l.getY(0,v-d)):(T=l.getX(-f,0),S=l.getY(-f,0),E=l.getX(0,v),M=l.getY(0,v),F=l.getX(0,v-d),A=l.getY(0,v-d)),h.batchTri(r,T,S,E,M,F,A,0,0,1,1,g,g,g,2)),r.showRight&&(g=p.getTintAppendFloatAlpha(r.fillRight,y),m?(T=l.getX(f,-d),S=l.getY(f,-d),E=l.getX(0,v),M=l.getY(0,v),F=l.getX(0,v-d),A=l.getY(0,v-d)):(T=l.getX(f,0),S=l.getY(f,0),E=l.getX(0,v),M=l.getY(0,v),F=l.getX(0,v-d),A=l.getY(0,v-d)),h.batchTri(r,T,S,E,M,F,A,0,0,1,1,g,g,g,2)),n.pipelines.postBatch(r)}};c.exports=a},57847:(c,x,t)=>{/**
1976 * @author       Richard Davey <[email protected]>
1977 * @copyright    2013-2025 Phaser Studio Inc.
1978 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1979 */var o=t(83419),p=t(17803),a=t(23031),n=t(36823),r=new o({Extends:p,Mixins:[n],initialize:function(s,h,i,l,u,d,f,v,m){h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=128),f===void 0&&(f=0),p.call(this,s,"Line",new a(l,u,d,f));var y=Math.max(1,this.geom.right-this.geom.left),g=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(h,i),this.setSize(y,g),v!==void 0&&this.setStrokeStyle(1,v,m),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}});c.exports=r},17440:(c,x,t)=>{/**
1980 * @author       Richard Davey <[email protected]>
1981 * @copyright    2013-2025 Phaser Studio Inc.
1982 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1983 */var o=t(75177),p=t(20926),a=function(n,r,e,s){e.addToRenderList(r);var h=n.currentContext;if(p(n,h,r,e,s)){var i=r._displayOriginX,l=r._displayOriginY;r.isStroked&&(o(h,r),h.beginPath(),h.moveTo(r.geom.x1-i,r.geom.y1-l),h.lineTo(r.geom.x2-i,r.geom.y2-l),h.stroke()),h.restore()}};c.exports=a},2481:(c,x,t)=>{/**
1984 * @author       Richard Davey <[email protected]>
1985 * @copyright    2013-2025 Phaser Studio Inc.
1986 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1987 */var o=t(39429),p=t(57847);o.register("line",function(a,n,r,e,s,h,i,l){return this.displayList.add(new p(this.scene,a,n,r,e,s,h,i,l))})},36823:(c,x,t)=>{/**
1988 * @author       Richard Davey <[email protected]>
1989 * @copyright    2013-2025 Phaser Studio Inc.
1990 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1991 */var o=t(29747),p=o,a=o;p=t(77385),a=t(17440),c.exports={renderWebGL:p,renderCanvas:a}},77385:(c,x,t)=>{/**
1992 * @author       Richard Davey <[email protected]>
1993 * @copyright    2013-2025 Phaser Studio Inc.
1994 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1995 */var o=t(91296),p=t(70554),a=function(n,r,e,s){e.addToRenderList(r);var h=n.pipelines.set(r.pipeline),i=o(r,e,s);h.calcMatrix.copyFrom(i.calc);var l=r._displayOriginX,u=r._displayOriginY,d=e.alpha*r.alpha;if(n.pipelines.preBatch(r),r.isStroked){var f=h.strokeTint,v=p.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*d);f.TL=v,f.TR=v,f.BL=v,f.BR=v,h.batchLine(r.geom.x1-l,r.geom.y1-u,r.geom.x2-l,r.geom.y2-u,r._startWidth/2,r._endWidth/2,1,0,!1,i.sprite,i.camera)}n.pipelines.postBatch(r)};c.exports=a},24949:(c,x,t)=>{/**
1996 * @author       Richard Davey <[email protected]>
1997 * @copyright    2013-2025 Phaser Studio Inc.
1998 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
1999 */var o=t(90273),p=t(83419),a=t(94811),n=t(13829),r=t(25717),e=t(17803),s=t(5469),h=new p({Extends:e,Mixins:[o],initialize:function(l,u,d,f,v,m){u===void 0&&(u=0),d===void 0&&(d=0),e.call(this,l,"Polygon",new r(f));var y=n(this.geom);this.setPosition(u,d),this.setSize(y.width,y.height),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var l=0;l<i;l++)s(this.geom);return this.updateData()},setTo:function(i){this.geom.setTo(i);var l=n(this.geom);return this.setSize(l.width,l.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var i=[],l=this.geom.points,u=0;u<l.length;u++)i.push(l[u].x,l[u].y);return i.push(l[0].x,l[0].y),this.pathIndexes=a(i),this.pathData=i,this}});c.exports=h},38710:(c,x,t)=>{/**
2000 * @author       Richard Davey <[email protected]>
2001 * @copyright    2013-2025 Phaser Studio Inc.
2002 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2003 */var o=t(65960),p=t(75177),a=t(20926),n=function(r,e,s,h){s.addToRenderList(e);var i=r.currentContext;if(a(r,i,e,s,h)){var l=e._displayOriginX,u=e._displayOriginY,d=e.pathData,f=d.length-1,v=d[0]-l,m=d[
20031]-u;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var y=2;y<f;y+=2){var g=d[y]-l,T=d[y+1]-u;i.lineTo(g,T)}e.closePath&&i.closePath(),e.isFilled&&(o(i,e),i.fill()),e.isStroked&&(p(i,e),i.stroke()),i.restore()}};c.exports=n},64827:(c,x,t)=>{/**
2004 * @author       Richard Davey <[email protected]>
2005 * @copyright    2013-2025 Phaser Studio Inc.
2006 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2007 */var o=t(39429),p=t(24949);o.register("polygon",function(a,n,r,e,s){return this.displayList.add(new p(this.scene,a,n,r,e,s))})},90273:(c,x,t)=>{/**
2008 * @author       Richard Davey <[email protected]>
2009 * @copyright    2013-2025 Phaser Studio Inc.
2010 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2011 */var o=t(29747),p=o,a=o;p=t(73695),a=t(38710),c.exports={renderWebGL:p,renderCanvas:a}},73695:(c,x,t)=>{/**
2012 * @author       Richard Davey <[email protected]>
2013 * @copyright    2013-2025 Phaser Studio Inc.
2014 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2015 */var o=t(10441),p=t(91296),a=t(34682),n=function(r,e,s,h){s.addToRenderList(e);var i=r.pipelines.set(e.pipeline),l=p(e,s,h),u=i.calcMatrix.copyFrom(l.calc),d=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&o(i,u,e,v,d,f),e.isStroked&&a(i,e,v,d,f),r.pipelines.postBatch(e)};c.exports=n},74561:(c,x,t)=>{/**
2016 * @author       Richard Davey <[email protected]>
2017 * @copyright    2013-2025 Phaser Studio Inc.
2018 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2019 */var o=t(83419),p=t(94811),a=t(87841),n=t(17803),r=t(95597),e=new o({Extends:n,Mixins:[r],initialize:function(h,i,l,u,d,f,v){i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=128),d===void 0&&(d=128),n.call(this,h,"Rectangle",new a(0,0,u,d)),this.radius=20,this.isRounded=!1,this.setPosition(i,l),this.setSize(u,d),f!==void 0&&this.setFillStyle(f,v),this.updateDisplayOrigin(),this.updateData()},setRounded:function(s){return s===void 0&&(s=16),this.radius=s,this.isRounded=s>0,this.updateRoundedData()},setSize:function(s,h){this.width=s,this.height=h,this.geom.setSize(s,h),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=s,i.hitArea.height=h),this},updateData:function(){if(this.isRounded)return this.updateRoundedData();var s=[],h=this.geom,i=this._tempLine;return h.getLineA(i),s.push(i.x1,i.y1,i.x2,i.y2),h.getLineB(i),s.push(i.x2,i.y2),h.getLineC(i),s.push(i.x2,i.y2),h.getLineD(i),s.push(i.x2,i.y2),this.pathData=s,this},updateRoundedData:function(){var s=[],h=this.width/2,i=this.height/2,l=Math.min(h,i),u=Math.min(this.radius,l),d=h,f=i,v=Math.max(1,Math.floor(u/5));return this.arcTo(s,d-h+u,f-i+u,u,Math.PI,Math.PI*1.5,v),s.push(d+h-u,f-i),this.arcTo(s,d+h-u,f-i+u,u,Math.PI*1.5,Math.PI*2,v),s.push(d+h,f+i-u),this.arcTo(s,d+h-u,f+i-u,u,0,Math.PI*.5,v),s.push(d-h+u,f+i),this.arcTo(s,d-h+u,f+i-u,u,Math.PI*.5,Math.PI,v),s.push(d-h,f-i+u),this.pathIndexes=p(s),this.pathData=s,this},arcTo:function(s,h,i,l,u,d,f){for(var v=(d-u)/f,m=0;m<=f;m++){var y=u+v*m;s.push(h+Math.cos(y)*l,i+Math.sin(y)*l)}}});c.exports=e},48682:(c,x,t)=>{/**
2020 * @author       Richard Davey <[email protected]>
2021 * @copyright    2013-2025 Phaser Studio Inc.
2022 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2023 */var o=t(65960),p=t(75177),a=t(20926),n=function(e,s,h,i,l,u){var d=Math.min(i/2,l/2),f=Math.min(u,d);if(f===0){e.rect(s,h,i,l);return}e.moveTo(s+f,h),e.lineTo(s+i-f,h),e.arcTo(s+i,h,s+i,h+f,f),e.lineTo(s+i,h+l-f),e.arcTo(s+i,h+l,s+i-f,h+l,f),e.lineTo(s+f,h+l),e.arcTo(s,h+l,s,h+l-f,f),e.lineTo(s,h+f),e.arcTo(s,h,s+f,h,f),e.closePath()},r=function(e,s,h,i){h.addToRenderList(s);var l=e.currentContext;if(a(e,l,s,h,i)){var u=s._displayOriginX,d=s._displayOriginY;s.isFilled&&(o(l,s),s.isRounded?(l.beginPath(),n(l,-u,-d,s.width,s.height,s.radius),l.fill()):l.fillRect(-u,-d,s.width,s.height)),s.isStroked&&(p(l,s),l.beginPath(),s.isRounded?n(l,-u,-d,s.width,s.height,s.radius):l.rect(-u,-d,s.width,s.height),l.stroke()),l.restore()}};c.exports=r},87959:(c,x,t)=>{/**
2024 * @author       Richard Davey <[email protected]>
2025 * @copyright    2013-2025 Phaser Studio Inc.
2026 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2027 */var o=t(39429),p=t(74561);o.register("rectangle",function(a,n,r,e,s,h){return this.displayList.add(new p(this.scene,a,n,r,e,s,h))})},95597:(c,x,t)=>{/**
2028 * @author       Richard Davey <[email protected]>
2029 * @copyright    2013-2025 Phaser Studio Inc.
2030 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2031 */var o=t(29747),p=o,a=o;p=t(52059),a=t(48682),c.exports={renderWebGL:p,renderCanvas:a}},52059:(c,x,t)=>{/**
2032 * @author       Richard Davey <[email protected]>
2033 * @copyright    2013-2025 Phaser Studio Inc.
2034 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2035 */var o=t(10441),p=t(91296),a=t(34682),n=t(70554),r=function(e,s,h,i){h.addToRenderList(s);var l=e.pipelines.set(s.pipeline),u=p(s,h,i);l.calcMatrix.copyFrom(u.calc);var d=s._displayOriginX,f=s._displayOriginY,v=h.alpha*s.alpha;if(e.pipelines.preBatch(s),s.isRounded&&s.isFilled)o(l,u.calc,s,v,d,f);else if(s.isFilled){var m=l.fillTint,y=n.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*v);m.TL=y,m.TR=y,m.BL=y,m.BR=y,l.batchFillRect(-d,-f,s.width,s.height)}s.isStroked&&a(l,s,v,d,f),e.pipelines.postBatch(s)};c.exports=r},55911:(c,x,t)=>{/**
2036 * @author       Richard Davey <[email protected]>
2037 * @copyright    2013-2025 Phaser Studio Inc.
2038 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2039 */var o=t(81991),p=t(83419),a=t(94811),n=t(17803),r=new p({Extends:n,Mixins:[o],initialize:function(s,h,i,l,u,d,f,v){h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=5),u===void 0&&(u=32),d===void 0&&(d=64),n.call(this,s,"Star",null),this._points=l,this._innerRadius=u,this._outerRadius=d,this.setPosition(h,i),this.setSize(d*2,d*2),f!==void 0&&this.setFillStyle(f,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,l=Math.PI/2*3,u=Math.PI/s,d=i,f=i;e.push(d,f+-i);for(var v=0;v<s;v++)e.push(d+Math.cos(l)*i,f+Math.sin(l)*i),l+=u,e.push(d+Math.cos(l)*h,f+Math.sin(l)*h),l+=u;return e.push(d,f+-i),this.pathIndexes=a(e),this.pathData=e,this}});c.exports=r},64272:(c,x,t)=>{/**
2040 * @author       Richard Davey <[email protected]>
2041 * @copyright    2013-2025 Phaser Studio Inc.
2042 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2043 */var o=t(65960),p=t(75177),a=t(20926),n=function(r,e,s,h){s.addToRenderList(e);var i=r.currentContext;if(a(r,i,e,s,h)){var l=e._displayOriginX,u=e._displayOriginY,d=e.pathData,f=d.length-1,v=d[0]-l,m=d[
20431]-u;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var y=2;y<f;y+=2){var g=d[y]-l,T=d[y+1]-u;i.lineTo(g,T)}i.closePath(),e.isFilled&&(o(i,e),i.fill()),e.isStroked&&(p(i,e),i.stroke()),i.restore()}};c.exports=n},93697:(c,x,t)=>{/**
2044 * @author       Richard Davey <[email protected]>
2045 * @copyright    2013-2025 Phaser Studio Inc.
2046 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2047 */var o=t(55911),p=t(39429);p.register("star",function(a,n,r,e,s,h,i){return this.displayList.add(new o(this.scene,a,n,r,e,s,h,i))})},81991:(c,x,t)=>{/**
2048 * @author       Richard Davey <[email protected]>
2049 * @copyright    2013-2025 Phaser Studio Inc.
2050 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2051 */var o=t(29747),p=o,a=o;p=t(57017),a=t(64272),c.exports={renderWebGL:p,renderCanvas:a}},57017:(c,x,t)=>{/**
2052 * @author       Richard Davey <[email protected]>
2053 * @copyright    2013-2025 Phaser Studio Inc.
2054 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2055 */var o=t(10441),p=t(91296),a=t(34682),n=function(r,e,s,h){s.addToRenderList(e);var i=r.pipelines.set(e.pipeline),l=p(e,s,h),u=i.calcMatrix.copyFrom(l.calc),d=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&o(i,u,e,v,d,f),e.isStroked&&a(i,e,v,d,f),r.pipelines.postBatch(e)};c.exports=n},36931:(c,x,t)=>{/**
2056 * @author       Richard Davey <[email protected]>
2057 * @copyright    2013-2025 Phaser Studio Inc.
2058 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2059 */var o=t(83419),p=t(17803),a=t(16483),n=t(96195),r=new o({Extends:p,Mixins:[n],initialize:function(s,h,i,l,u,d,f,v,m,y,g){h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=128),d===void 0&&(d=64),f===void 0&&(f=0),v===void 0&&(v=128),m===void 0&&(m=128),p.call(this,s,"Triangle",new a(l,u,d,f,v,m));var T=this.geom.right-this.geom.left,S=this.geom.bottom-this.geom.top;this.setPosition(h,i),this.setSize(T,S),y!==void 0&&this.setFillStyle(y,g),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,s,h,i,l,u){return this.geom.setTo(e,s,h,i,l,u),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}});c.exports=r},85172:(c,x,t)=>{/**
2060 * @author       Richard Davey <[email protected]>
2061 * @copyright    2013-2025 Phaser Studio Inc.
2062 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2063 */var o=t(65960),p=t(75177),a=t(20926),n=function(r,e,s,h){s.addToRenderList(e);var i=r.currentContext;if(a(r,i,e,s,h)){var l=e._displayOriginX,u=e._displayOriginY,d=e.geom.x1-l,f=e.geom.y1-u,v=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,g=e.geom.y3-u;i.beginPath(),i.moveTo(d,f),i.lineTo(v,m),i.lineTo(y,g),i.closePath(),e.isFilled&&(o(i,e),i.fill()),e.isStroked&&(p(i,e),i.stroke()),i.restore()}};c.exports=n},45245:(c,x,t)=>{/**
2064 * @author       Richard Davey <[email protected]>
2065 * @copyright    2013-2025 Phaser Studio Inc.
2066 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2067 */var o=t(39429),p=t(36931);o.register("triangle",function(a,n,r,e,s,h,i,l,u,d){return this.displayList.add(new p(this.scene,a,n,r,e,s,h,i,l,u,d))})},96195:(c,x,t)=>{/**
2068 * @author       Richard Davey <[email protected]>
2069 * @copyright    2013-2025 Phaser Studio Inc.
2070 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2071 */var o=t(29747),p=o,a=o;p=t(83253),a=t(85172),c.exports={renderWebGL:p,renderCanvas:a}},83253:(c,x,t)=>{/**
2072 * @author       Richard Davey <[email protected]>
2073 * @copyright    2013-2025 Phaser Studio Inc.
2074 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2075 */var o=t(91296),p=t(34682),a=t(70554),n=function(r,e,s,h){s.addToRenderList(e);var i=r.pipelines.set(e.pipeline),l=o(e,s,h);i.calcMatrix.copyFrom(l.calc);var u=e._displayOriginX,d=e._displayOriginY,f=s.alpha*e.alpha;if(r.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*f);v.TL=m,v.TR=m,v.BL=m,v.BR=m;var y=e.geom.x1-u,g=e.geom.y1-d,T=e.geom.x2-u,S=e.geom.y2-d,E=e.geom.x3-u,M=e.geom.y3-d;i.batchFillTriangle(y,g,T,S,E,M,l.sprite,l.camera)}e.isStroked&&p(i,e,f,u,d),r.pipelines.postBatch(e)};c.exports=n},68287:(c,x,t)=>{/**
2076 * @author       Richard Davey <[email protected]>
2077 * @copyright    2013-2025 Phaser Studio Inc.
2078 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2079 */var o=t(9674),p=t(83419),a=t(31401),n=t(95643),r=t(92751),e=new p({Extends:n,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,r],initialize:function(h,i,l,u,d){n.call(this,h,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(u,d),this.setPosition(i,l),this.setSizeToFrame(),this.setOriginFromFrame
2079(),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}});c.exports=e},76552:c=>{/**
2080 * @author       Richard Davey <[email protected]>
2081 * @copyright    2013-2025 Phaser Studio Inc.
2082 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2083 */var x=function(t,o,p,a){p.addToRenderList(o),t.batchSprite(o,o.frame,p,a)};c.exports=x},15567:(c,x,t)=>{/**
2084 * @author       Richard Davey <[email protected]>
2085 * @copyright    2013-2025 Phaser Studio Inc.
2086 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2087 */var o=t(25305),p=t(13059),a=t(44603),n=t(23568),r=t(68287);a.register("sprite",function(e,s){e===void 0&&(e={});var h=n(e,"key",null),i=n(e,"frame",null),l=new r(this.scene,0,0,h,i);return s!==void 0&&(e.add=s),o(this.scene,l,e),p(l,e),l})},46409:(c,x,t)=>{/**
2088 * @author       Richard Davey <[email protected]>
2089 * @copyright    2013-2025 Phaser Studio Inc.
2090 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2091 */var o=t(39429),p=t(68287);o.register("sprite",function(a,n,r,e){return this.displayList.add(new p(this.scene,a,n,r,e))})},92751:(c,x,t)=>{/**
2092 * @author       Richard Davey <[email protected]>
2093 * @copyright    2013-2025 Phaser Studio Inc.
2094 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2095 */var o=t(29747),p=o,a=o;p=t(9409),a=t(76552),c.exports={renderWebGL:p,renderCanvas:a}},9409:c=>{/**
2096 * @author       Richard Davey <[email protected]>
2097 * @copyright    2013-2025 Phaser Studio Inc.
2098 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2099 */var x=function(t,o,p,a){p.addToRenderList(o),o.pipeline.batchSprite(o,p,a)};c.exports=x},14220:c=>{/**
2100 * @author       Richard Davey <[email protected]>
2101 * @copyright    2013-2025 Phaser Studio Inc.
2102 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2103 */var x=function(t,o,p){var a=t.canvas,n=t.context,r=t.style,e=[],s=0,h=p.length;r.maxLines>0&&r.maxLines<p.length&&(h=r.maxLines),r.syncFont(a,n);for(var i=t.letterSpacing,l=0;l<h;l++){var u=r.strokeThickness;if(i===0)u+=n.measureText(p[l]).width;else{for(var d=p[l],f=0;f<d.length;f++)u+=n.measureText(d[f]).width;d.length>1&&(u+=i*(d.length-1))}r.wordWrap&&(u-=n.measureText(" ").width),e[l]=Math.ceil(u),s=Math.max(s,e[l])}var v=o.fontSize+r.strokeThickness,m=v*h,y=t.lineSpacing;return h>1&&(m+=y*(h-1)),{width:s,height:m,lines:h,lineWidths:e,lineSpacing:y,lineHeight:v}};c.exports=x},79557:(c,x,t)=>{/**
2104 * @author       Richard Davey <[email protected]>
2105 * @copyright    2013-2025 Phaser Studio Inc.
2106 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2107 */var o=t(27919),p=function(a){var n=o.create(this),r=n.getContext("2d",{willReadFrequently:!0});a.syncFont(n,r);var e=r.measureText(a.testString);if("actualBoundingBoxAscent"in e){var s=e.actualBoundingBoxAscent,h=e.actualBoundingBoxDescent;return o.remove(n),{ascent:s,descent:h,fontSize:s+h}}var i=Math.ceil(e.width*a.baselineX),l=i,u=2*l;l=l*a.baselineY|0,n.width=i,n.height=u,r.fillStyle="#f00",r.fillRect(0,0,i,u),r.font=a._font,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(a.testString,0,l);var d={ascent:0,descent:0,fontSize:0},f=r.getImageData(0,0,i,u);if(!f)return d.ascent=l,d.descent=l+6,d.fontSize=d.ascent+d.descent,o.remove(n),d;var v=f.data,m=v.length,y=i*4,g,T,S=0,E=!1;for(g=0;g<l;g++){for(T=0;T<y;T+=4)if(v[S+T]!==255){E=!0;break}if(!E)S+=y;else break}for(d.ascent=l-g,S=m-y,E=!1,g=u;g>l;g--){for(T=0;T<y;T+=4)if(v[S+T]!==255){E=!0;break}if(!E)S-=y;else break}return d.descent=g-l,d.fontSize=d.ascent+d.descent,o.remove(n),d};c.exports=p},50171:(c,x,t)=>{/**
2108 * @author       Richard Davey <[email protected]>
2109 * @copyright    2013-2025 Phaser Studio Inc.
2110 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2111 */var o=t(40366),p=t(27919),a=t(83419),n=t(31401),r=t(95643),e=t(14220),s=t(35154),h=t(35846),i=t(61771),l=t(35762),u=t(45650),d=new a({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Crop,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Tint,n.Transform,n.Visible,i],initialize:function(v,m,y,g,T){m===void 0&&(m=0),y===void 0&&(y=0),r.call(this,v,"Text"),this.renderer=v.sys.renderer,this.setPosition(m,y),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=p.create(this),this.context,this.style=new l(this,T),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=u(),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(g),T&&T.padding&&this.setPadding(T.padding),T&&T.lineSpacing&&this.setLineSpacing(T.lineSpacing),T&&T.letterSpacing&&this.setLetterSpacing(T.letterSpacing)},initRTL:function(){if(!this.style.rtl){this.canvas.dir="ltr",this.context.direction="ltr";return}this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",o(this.canvas,this.scene.sys.canvas),this.originX=1},runWordWrap:function(f){var v=this.style;if(v.wordWrapCallback){var m=v.wordWrapCallback.call(v.wordWrapCallbackScope,f,this);return Array.isArray(m)&&(m=m.join(`
2112`)),m}else return v.wordWrapWidth?v.wordWrapUseAdvanced?this.advancedWordWrap(f,this.context,this.style.wordWrapWidth):this.basicWordWrap(f,this.context,this.style.wordWrapWidth):f},advancedWordWrap:function(f,v,m){for(var y="",g=f.replace(/ +/gi," ").split(this.splitRegExp),T=g.length,S=0;S<T;S++){var E=g[S],M="";E=E.replace(/^ *|\s*$/gi,"");var F=E.length*this.letterSpacing,A=v.measureText(E).width+F;if(A<m){y+=E+`
2113`;continue}for(var P=m,L=E.split(" "),O=0;O<L.length;O++){var G=L[O],z=G+" ",Y=z.length*this.letterSpacing,X=v.measureText(z).width+Y;if(X>P){if(O===0){for(var I=z;I.length;){I=I.slice(0,-1);var U=I.length*this.letterSpacing;if(X=v.measureText(I).width+U,X<=P)break}if(!I.length)throw new Error("wordWrapWidth < a single character");var D=G.substr(I.length);L[O]=D,M+=I}
2113var V=L[O].length?O:O+1,B=L.slice(V).join(" ").replace(/[ \n]*$/gi,"");g.splice(S+1,0,B),T=g.length;break}else M+=z,P-=X}y+=M.replace(/[ \n]*$/gi,"")+`
2114`}return y=y.replace(/[\s|\n]*$/gi,""),y},basicWordWrap:function(f,v,m){for(var y="",g=f.split(this.splitRegExp),T=g.length-1,S=v.measureText(" ").width,E=0;E<=T;E++){for(var M=m,F=g[E].split(" "),A=F.length-1,P=0;P<=A;P++){var L=F[P],O=L.length*this.letterSpacing,G=v.measureText(L).width+O,z=G;P<A&&(z+=S),z>M&&P>0&&(y+=`
2115`,M=m),y+=L,P<A?(y+=" ",M-=z):M-=G}E<T&&(y+=`
2116`)}return y},getWrappedText:function(f){f===void 0&&(f=this._text),this.style.syncFont(this.canvas,this.context);var v=this.runWordWrap(f);return v.split(this.splitRegExp)},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(`
2117`)),f!==this._text&&(this._text=f.toString(),this.updateText()),this},appendText:function(f,v){v===void 0&&(v=!0),!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(`
2118`)),f=f.toString();var m=this._text.concat(v?`
2119`+f:f);return m!==this._text&&(this._text=m,this.updateText()),this},setStyle:function(f){return this.style.setStyle(f)},setFont:function(f){return this.style.setFont(f)},setFontFamily:function(f){return this.style.setFontFamily(f)},setFontSize:function(f){return this.style.setFontSize(f)},setFontStyle:function(f){return this.style.setFontStyle(f)},setFixedSize:function(f,v){return this.style.setFixedSize(f,v)},setBackgroundColor:function(f){return this.style.setBackgroundColor(f)},setFill:function(f){return this.style.setFill(f)},setColor:function(f){return this.style.setColor(f)},setStroke:function(f,v){return this.style.setStroke(f,v)},setShadow:function(f,v,m,y,g,T){return this.style.setShadow(f,v,m,y,g,T)},setShadowOffset:function(f,v){return this.style.setShadowOffset(f,v)},setShadowColor:function(f){return this.style.setShadowColor(f)},setShadowBlur:function(f){return this.style.setShadowBlur(f)},setShadowStroke:function(f){return this.style.setShadowStroke(f)},setShadowFill:function(f){return this.style.setShadowFill(f)},setWordWrapWidth:function(f,v){return this.style.setWordWrapWidth(f,v)},setWordWrapCallback:function(f,v){return this.style.setWordWrapCallback(f,v)},setAlign:function(f){return this.style.setAlign(f)},setResolution:function(f){return this.style.setResolution(f)},setLineSpacing:function(f){return this.lineSpacing=f,this.updateText()},setLetterSpacing:function(f){return this.letterSpacing=f,this.updateText()},setPadding:function(f,v,m,y){if(typeof f=="object"){var g=f,T=s(g,"x",null);T!==null?(f=T,m=T):(f=s(g,"left",0),m=s(g,"right",f));var S=s(g,"y",null);S!==null?(v=S,y=S):(v=s(g,"top",0),y=s(g,"bottom",v))}else f===void 0&&(f=0),v===void 0&&(v=f),m===void 0&&(m=f),y===void 0&&(y=v);return this.padding.left=f,this.padding.top=v,this.padding.right=m,this.padding.bottom=y,this.updateText()},setMaxLines:function(f){return this.style.setMaxLines(f)},setRTL:function(f){f===void 0&&(f=!0);var v=this.style;return v.rtl===f?this:(v.rtl=f,f?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",o(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),v.align==="left"?v.align="right":v.align==="right"&&(v.align="left"),this)},updateText:function(){var f=this.canvas,v=this.context,m=this.style,y=m.resolution,g=m.metrics;m.syncFont(f,v);var T=this._text;(m.wordWrapWidth||m.wordWrapCallback)&&(T=this.runWordWrap(this._text));var S=T.split(this.splitRegExp),E=e(this,g,S),M=this.padding,F;m.fixedWidth===0?(this.width=E.width+M.left+M.right,F=E.width):(this.width=m.fixedWidth,F=this.width-M.left-M.right,F<E.width&&(F=E.width)),m.fixedHeight===0?this.height=E.height+M.top+M.bottom:this.height=m.fixedHeight;var A=this.width,P=this.height;this.updateDisplayOrigin(),A*=y,P*=y,A=Math.max(A,1),P=Math.max(P,1),f.width!==A||f.height!==P?(f.width=A,f.height=P,this.frame.setSize(A,P),m.syncFont(f,v),m.rtl&&(v.direction="rtl")):v.clearRect(0,0,A,P),v.save(),v.scale(y,y),m.backgroundColor&&(v.fillStyle=m.backgroundColor,v.fillRect(0,0,A,P)),m.syncStyle(f,v),v.translate(M.left,M.top);for(var L,O,G=0;G<E.lines;G++){if(L=m.strokeThickness/2,O=m.strokeThickness/2+G*E.lineHeight+g.ascent,G>0&&(O+=E.lineSpacing*G),m.rtl)L=A-L-M.left-M.right;else if(m.align==="right")L+=F-E.lineWidths[G];else if(m.align==="center")L+=(F-E.lineWidths[G])/2;else if(m.align==="justify"){var z=.85;
2119if(E.lineWidths[G]/E.width>=z){var Y=E.width-E.lineWidths[G],X=v.measureText(" ").width,I=S[G].trim(),U=I.split(" ");Y+=(S[G].length-I.length)*X;for(var D=Math.floor(Y/X),V=0;D>0;)U[V]+=" ",V=(V+1)%(U.length-1||1),--D;S[G]=U.join(" ")}}this.autoRound&&(L=Math.round(L),O=Math.round(O));var B=this.letterSpacing;if(m.strokeThickness&&B===0&&(m.syncShadow(v,m.shadowStroke),v.strokeText(S[G],L,O)),m.color)if(m.syncShadow(v,m.shadowFill),B!==0)for(var W=0,K=S[G].split(""),J=0;J<K.length;J++)m.strokeThickness&&(m.syncShadow(v,m.shadowStroke),v.strokeText(K[J],L+W,O),m.syncShadow(v,m.shadowFill)),v.fillText(K[J],L+W,O),W+=v.measureText(K[J]).width+B;else v.fillText(S[G],L,O)}v.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(f,this.frame.source.glTexture,!0));var Z=this.input;return Z&&!Z.customHitArea&&(Z.hitArea.width=this.width,Z.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(f){this.setText(f)}},toJSON:function(){var f=n.ToJSON(this),v={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return f.data=v,f},preDestroy:function(){h(this.canvas),p.remove(this.canvas);var f=this.texture;f&&f.destroy()}});c.exports=d},79724:c=>{/**
2120 * @author       Richard Davey <[email protected]>
2121 * @copyright    2013-2025 Phaser Studio Inc.
2122 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2123 */var x=function(t,o,p,a){o.width===0||o.height===0||(p.addToRenderList(o),t.batchSprite(o,o.frame,p,a))};c.exports=x},71259:(c,x,t)=>{/**
2124 * @author       Richard Davey <[email protected]>
2125 * @copyright    2013-2025 Phaser Studio Inc.
2126 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2127 */var o=t(25305),p=t(44603),a=t(23568),n=t(50171);p.register("text",function(r,e){r===void 0&&(r={});var s=a(r,"text",""),h=a(r,"style",null),i=a(r,"padding",null);i!==null&&(h.padding=i);var l=new n(this.scene,0,0,s,h);return e!==void 0&&(r.add=e),o(this.scene,l,r),l.autoRound=a(r,"autoRound",!0),l.resolution=a(r,"resolution",1),l})},68005:(c,x,t)=>{/**
2128 * @author       Richard Davey <[email protected]>
2129 * @copyright    2013-2025 Phaser Studio Inc.
2130 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2131 */var o=t(50171),p=t(39429);p.register("text",function(a,n,r,e){return this.displayList.add(new o(this.scene,a,n,r,e))})},61771:(c,x,t)=>{/**
2132 * @author       Richard Davey <[email protected]>
2133 * @copyright    2013-2025 Phaser Studio Inc.
2134 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2135 */var o=t(29747),p=o,a=o;p=t(34397),a=t(79724),c.exports={renderWebGL:p,renderCanvas:a}},35762:(c,x,t)=>{/**
2136 * @author       Richard Davey <[email protected]>
2137 * @copyright    2013-2025 Phaser Studio Inc.
2138 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2139 */var o=t(83419),p=t(23568),a=t(35154),n=t(79557),r={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 o({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);for(var l in r){var u=i?r[l][1]:this[l];l==="wordWrapCallback"||l==="wordWrapCallbackScope"?this[l]=a(s,r[l][0],u):s&&l==="fontSize"&&typeof s.fontSize=="number"?this[l]=s.fontSize.toString()+"px":this[l]=p(s,r[l][0],u)}var d=a(s,"font",null);d!==null&&this.setFont(d,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var f=a(s,"fill",null);f!==null&&(this.color=f);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=n(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=n(this)),this.parent.updateText()},setFont:function(s,h){h===void 0&&(h=!0);var i=s,l="",u="";
2139if(typeof s!="string")i=a(s,"fontFamily","Courier"),l=a(s,"fontSize","16px"),u=a(s,"fontStyle","");else{var d=s.split(" "),f=0;u=d.length>2?d[f++]:"",l=d[f++]||"16px",i=d[f++]||"Courier"}return(i!==this.fontFamily||l!==this.fontSize||u!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=l,this.fontStyle=u,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,l,u,d){return s===void 0&&(s=0),h===void 0&&(h=0),i===void 0&&(i="#000"),l===void 0&&(l=0),u===void 0&&(u=!1),d===void 0&&(d=!0),this.shadowOffsetX=s,this.shadowOffsetY=h,this.shadowColor=i,this.shadowBlur=l,this.shadowStroke=u,this.shadowFill=d,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 r)s[h]=this[h];return s.metrics=this.getTextMetrics(),s},destroy:function(){this.parent=void 0}});c.exports=e},34397:(c,x,t)=>{/**
2140 * @author       Richard Davey <[email protected]>
2141 * @copyright    2013-2025 Phaser Studio Inc.
2142 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2143 */var o=t(70554),p=function(a,n,r,e){if(!(n.width===0||n.height===0)){r.addToRenderList(n);var s=n.frame,h=s.width,i=s.height,l=o.getTintAppendFloatAlpha,u=a.pipelines.set(n.pipeline,n),d=u.setTexture2D(s.glTexture,n);u.batchTexture(n,s.glTexture,h,i,n.x,n.y,h/n.style.resolution,i/n.style.resolution,n.scaleX,n.scaleY,n.rotation,n.flipX,n.flipY,n.scrollFactorX,n.scrollFactorY,n.displayOriginX,n.displayOriginY,0,0,h,i,l(n.tintTopLeft,r.alpha*n._alphaTL),l(n.tintTopRight,r.alpha*n._alphaTR),l(n.tintBottomLeft,r.alpha*n._alphaBL),l(n.tintBottomRight,r.alpha*n._alphaBR),n.tintFill,0,0,r,e,!1,d)}};c.exports=p},20839:(c,x,t)=>{/**
2144 * @author       Richard Davey <[email protected]>
2145 * @copyright    2013-2025 Phaser Studio Inc.
2146 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2147 */var o=t(27919),p=t(83419),a=t(31401),n=t(95643),r=t(98439),e=t(68703),s=t(56295),h=t(45650),i=t(26099),l=8,u=new p({Extends:n,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(f,v,m,y,g,T,S){var E=f.sys.renderer;n.call(this,f,"TileSprite");var M=f.sys.textures.get(T),F=M.get(S);F.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),M=f.sys.textures.get("__MISSING"),F=M.get()),M.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),M=f.sys.textures.get("__MISSING"),F=M.get()),!y||!g?(y=y||F.width,g=g||F.height):(y=Math.floor(y),g=Math.floor(g)),this._tilePosition=new i,this._tileScale=new i(1,1),this.dirty=!1,this.renderer=E,this.canvas=o.create(this,y,g),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=M,this.displayFrame=F,this._crop=this.resetCropObject(),this._textureKey=h(),this.texture=f.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=r(F.width),this.potHeight=r(F.height),this.fillCanvas=o.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(v,m),this.setSize(y,g),this.setFrame
2147(S),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(d,f){return this.displayTexture=this.scene.sys.textures.get(d),this.setFrame(f)},setFrame:function(d){var f=this.displayTexture.get(d);return this.potWidth=r(f.width),this.potHeight=r(f.height),this.canvas.width=0,!f.cutWidth||!f.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this.displayFrame=f,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(d,f){return d!==void 0&&(this.tilePositionX=d),f!==void 0&&(this.tilePositionY=f),this},setTileScale:function(d,f){return d===void 0&&(d=this.tileScaleX),f===void 0&&(f=d),this.tileScaleX=d,this.tileScaleY=f,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var d=this.displayFrame;if(d.source.isRenderTexture||d.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var f=this.fillContext,v=this.fillCanvas,m=this.potWidth,y=this.potHeight;(!this.renderer||!this.renderer.gl)&&(m=d.cutWidth,y=d.cutHeight),f.clearRect(0,0,m,y),v.width=m,v.height=y,f.drawImage(d.source.image,d.cutX,d.cutY,d.cutWidth,d.cutHeight,0,0,m,y),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(v,this.fillPattern):this.fillPattern=f.createPattern(v,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var d=this.canvas;if((d.width!==this.width||d.height!==this.height)&&(d.width=this.width,d.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 f=this.context;this.scene.sys.game.config.antialias||e.disable(f);var v=this._tileScale.x,m=this._tileScale.y,y=this._tilePosition.x,g=this._tilePosition.y;f.clearRect(0,0,this.width,this.height),f.save(),f.scale(v,m),f.translate(-y,-g),f.fillStyle=this.fillPattern,f.fillRect(y,g,this.width/v,this.height/m),f.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),o.remove(this.canvas),o.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var d=this.texture;d&&d.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(d){this._tilePosition.x=d,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(d){this._tilePosition.y=d,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(d){this._tileScale.x=d,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(d){this._tileScale.y=d,this.dirty=!0}}});c.exports=u},46992:c=>{/**
2148 * @author       Richard Davey <[email protected]>
2149 * @copyright    2013-2025 Phaser Studio Inc.
2150 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2151 */var x=function(t,o,p,a){o.updateCanvas(),p.addToRenderList(o),t.batchSprite(o,o.frame,p,a)};c.exports=x},14167:(c,x,t)=>{/**
2152 * @author       Richard Davey <[email protected]>
2153 * @copyright    2013-2025 Phaser Studio Inc.
2154 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2155 */var o=t(25305),p=t(44603),a=t(23568),n=t(20839);p.register("tileSprite",function(r,e){r===void 0&&(r={});var s=a(r,"x",0),h=a(r,"y",0),i=a(r,"width",512),l=a(r,"height",512),u=a(r,"key",""),d=a(r,"frame",""),f=new n(this.scene,s,h,i,l,u,d);return e!==void 0&&(r.add=e),o(this.scene,f,r),f})},91681:(c,x,t)=>{/**
2156 * @author       Richard Davey <[email protected]>
2157 * @copyright    2013-2025 Phaser Studio Inc.
2158 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2159 */var o=t(20839),p=t(39429);p.register("tileSprite",function(a,n,r,e,s,h){return this.displayList.add(new o(this.scene,a,n,r,e,s,h))})},56295:(c,x,t)=>{/**
2160 * @author       Richard Davey <[email protected]>
2161 * @copyright    2013-2025 Phaser Studio Inc.
2162 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2163 */var o=t(29747),p=o,a=o;p=t(18553),a=t(46992),c.exports={renderWebGL:p,renderCanvas:a}},18553:(c,x,t)=>{/**
2164 * @author       Richard Davey <[email protected]>
2165 * @copyright    2013-2025 Phaser Studio Inc.
2166 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2167 */var o=t(70554),p=function(a,n,r,e){n.updateCanvas();var s=n.width,h=n.height;if(!(s===0||h===0)){r.addToRenderList(n);var i=o.getTintAppendFloatAlpha,l=a.pipelines.set(n.pipeline,n),u=l.setTexture2D(n.fillPattern,n);l.batchTexture(n,n.fillPattern,n.displayFrame.width*n.tileScaleX,n.displayFrame.height*n.tileScaleY,n.x,n.y,s,h,n.scaleX,n.scaleY,n.rotation,n.flipX,n.flipY,n.scrollFactorX,n.scrollFactorY,n.originX*s,n.originY*h,0,0,s,h,i(n.tintTopLeft,r.alpha*n._alphaTL),i(n.tintTopRight,r.alpha*n._alphaTR),i(n.tintBottomLeft,r.alpha*n._alphaBL),i(n.tintBottomRight,r.alpha*n._alphaBR),n.tintFill,n.tilePositionX%n.displayFrame.width/n.displayFrame.width,n.tilePositionY%n.displayFrame.height/n.displayFrame.height,r,e,!1,u)}};c.exports=p},18471:(c,x,t)=>{/**
2168 * @author       Richard Davey <[email protected]>
2169 * @copyright    2013-2025 Phaser Studio Inc.
2170 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2171 */var o=t(45319),p=t(83419),a=t(31401),n=t(51708),r=t(8443),e=t(95643),s=t(36383),h=t(14463),i=t(45650),l=t(10247),u=new p({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,l],initialize:function(f,v,m,y){e.call(this,f,"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._getFrame=!1,this._rfvCallbackId=0;var g=f.sys.game;this._device=g.device.video,this.setPosition(v,m),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),g.events.on(r.PAUSE,this.globalPause,this),g.events.on(r.RESUME,this.globalResume,this);var T=f.sys.sound;T&&T.on(h.GLOBAL_MUTE,this.globalMute,this),y&&this.load(y)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(d){var f=this.scene.sys.cache.video.get(d);return f?(this.cacheKey=d,this.loadHandler(f.url,f.noAudio,f.crossOrigin)):console.warn("No video in cache for key: "+d),this},changeSource:function(d,f,v,m,y){f===void 0&&(f=!0),v===void 0&&(v=!1),this.cacheKey!==d&&(this.load(d),f&&this.play(v,m,y))},getVideoKey:function(){return this.cacheKey},loadURL:function(d,f,v){f===void 0&&(f=!1);var m=this._device.getVideoURL(d);return m?(this.cacheKey="",this.loadHandler(m.url,f,v)):console.warn("No supported video format found for "+d),this},loadMediaStream:function(d,f,v){return this.loadHandler(null,f,v,d)},loadHandler:function(d,f,v,m){f||(f=!1);var y=this.video;
2171if(y?(this.removeLoadEventHandlers(),this.stop()):(y=document.createElement("video"),y.controls=!1,y.setAttribute("playsinline","playsinline"),y.setAttribute("preload","auto"),y.setAttribute("disablePictureInPicture","true")),f?(y.muted=!0,y.defaultMuted=!0,y.setAttribute("autoplay","autoplay")):(y.muted=!1,y.defaultMuted=!1,y.removeAttribute("autoplay")),v?y.setAttribute("crossorigin",v):y.removeAttribute("crossorigin"),m)if("srcObject"in y)try{y.srcObject=m}catch(T){if(T.name!=="TypeError")throw T;y.src=URL.createObjectURL(m)}else y.src=URL.createObjectURL(m);else y.src=d;this.retry=0,this.video=y,this._playCalled=!1,y.load(),this.addLoadEventHandlers();var g=this.scene.sys.textures.get(this._key);return this.setTexture(g),this},requestVideoFrame:function(d,f){var v=this.video;if(v){var m=f.width,y=f.height,g=this.videoTexture,T=this.videoTextureSource,S=!g||T.source!==v;S?(this._codePaused=v.paused,this._codeMuted=v.muted,g?(T.source=v,T.width=m,T.height=y,g.get().setSize(m,y)):(g=this.scene.sys.textures.create(this._key,v,m,y),g.add("__BASE",0,0,0,m,y),this.setTexture(g),this.videoTexture=g,this.videoTextureSource=g.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(n.VIDEO_TEXTURE,this,g)),this.setSizeToFrame(),this.updateDisplayOrigin()):T.update(),this.isStalled=!1,this.metadata=f;var E=f.mediaTime;S&&(this._lastUpdate=E,this.emit(n.VIDEO_CREATED,this,m,y),this.frameReady||(this.frameReady=!0,this.emit(n.VIDEO_PLAY,this))),this._playingMarker?E>=this._markerOut&&(v.loop?(v.currentTime=this._markerIn,this.emit(n.VIDEO_LOOP,this)):(this.stop(!1),this.emit(n.VIDEO_COMPLETE,this))):E<this._lastUpdate&&this.emit(n.VIDEO_LOOP,this),this._lastUpdate=E,this._getFrame?(this.removeEventHandlers(),v.pause(),this._getFrame=!1):this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(d,f,v){f===void 0&&(f=-1),v===void 0&&(v=s.MAX_SAFE_INTEGER);var m=this.video;return!m||this.isPlaying()?(m||console.warn("Video not loaded"),this):(d===void 0&&(d=m.loop),m.loop=d,this._markerIn=f,this._markerOut=v,this._playingMarker=f>-1&&v>f&&v<s.MAX_SAFE_INTEGER,this._playCalled||(this._getFrame=!1,this._rfvCallbackId=m.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},getFirstFrame:function(){var d=this.video;return!d||this.isPlaying()?(d||console.warn("Video not loaded"),this):(this._playCalled||(this._getFrame=!0,this._rfvCallbackId=d.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this.createPlayPromise()),this)},addLoadEventHandlers:function(){var d=this.video;d&&(d.addEventListener("error",this._loadCallbackHandler),d.addEventListener("abort",this._loadCallbackHandler),d.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var d=this.video;d&&(d.removeEventListener("error",this._loadCallbackHandler),d.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var d=this.video;if(d){var f=this._callbacks;for(var v in f)d.addEventListener(v,f[v])}},removeEventHandlers:function(){var d=this.video;if(d){var f=this._callbacks;for(var v in f)d.removeEventListener(v,f[v])}},createPlayPromise:function(d){d===void 0&&(d=!0);var f=this.video,v=f.play();if(v!==void 0){var m=this.playSuccess.bind(this),y=this.playError.bind(this);if(!d){var g=this;y=function(){g.failedPlayAttempts++}}v.then(m).catch(y)}else f.addEventListener("playing",this._callbacks.legacy),d||this.failedPlayAttempts++},addMarker:function(d,f,v){return!isNaN(f)&&f>=0&&!isNaN(v)&&v>f&&(this.markers[d]=[f,v]),this},playMarker:function(d,f){var v=this.markers[d];return v&&this.play(f,v[0],v[1]),this},removeMarker:function(d){return delete this.markers[d],this},snapshot:function(d,f){return d===void 0&&(d=this.width),f===void 0&&(f=this.height),this.snapshotArea(0,0,this.width,this.height,d,f)},snapshotArea:function(d,f,v,m,y,g){d===void 0&&(d=0),f===void 0&&(f=0),v===void 0&&(v=this.width),m===void 0&&(m=this.height),y===void 0&&(y=v),g===void 0&&(g=m);var T=this.video,S=this.snapshotTexture;return S?(S.setSize(y,g),T&&S.context.drawImage(T,d,f,v,m,0,0,y,g)):(S=this.scene.sys.textures.createCanvas(i(),y,g),this.snapshotTexture=S,T&&S.context.drawImage(T,d,f,v,m,0,0,y,g)),S.update()},saveSnapshotTexture:function(d){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,d):this.snapshotTexture=this.scene.sys.textures.createCanvas(d,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit
2171(n.VIDEO_UNLOCKED,this));var d=this.scene.sys.sound;d&&d.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(d){var f=d.name;f==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(n.VIDEO_LOCKED,this)):f==="NotSupportedError"?(this.stop(!1),this.emit(n.VIDEO_UNSUPPORTED,this,d)):(this.stop(!1),this.emit(n.VIDEO_ERROR,this,d))},legacyPlayHandler:function(){var d=this.video;d&&(this.playSuccess(),d.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(n.VIDEO_PLAYING,this)},loadErrorHandler:function(d){this.stop(!1),this.emit(n.VIDEO_ERROR,this,d)},metadataHandler:function(d){this.emit(n.VIDEO_METADATA,this,d)},setSizeToFrame:function(d){d||(d=this.frame),this.width=d.realWidth,this.height=d.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=this.width,f.hitArea.height=this.height),this},stalledHandler:function(d){this.isStalled=!0,this.emit(n.VIDEO_STALLED,this,d)},completeHandler:function(){this._playCalled=!1,this.emit(n.VIDEO_COMPLETE,this)},preUpdate:function(d,f){var v=this.video;!v||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=f,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(d){var f=this.video;if(f){var v=f.duration;if(v!==1/0&&!isNaN(v)){var m=v*d;this.setCurrentTime(m)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(d){var f=this.video;if(f){if(typeof d=="string"){var v=d[0],m=parseFloat(d.substr(1));v==="+"?d=f.currentTime+m:v==="-"&&(d=f.currentTime-m)}f.currentTime=d}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(n.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(n.VIDEO_SEEKED,this)},getProgress:function(){var d=this.video;if(d){var f=d.duration;if(f!==1/0&&!isNaN(f))return d.currentTime/f}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(d){d===void 0&&(d=!0),this._codeMuted=d;var f=this.video;return f&&(f.muted=this._systemMuted?!0:d),this},isMuted:function(){return this._codeMuted},globalMute:function(d,f){this._systemMuted=f;var v=this.video;v&&(v.muted=this._codeMuted?!0:f)},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(d){d===void 0&&(d=!0);var f=this.video;return this._codePaused=d,f&&!f.ended&&(d?f.paused||(this.removeEventHandlers(),f.pause()):d||(this._playCalled?f.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(d){return d===void 0&&(d=1),this.video&&(this.video.volume=o(d,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(d){return this.video&&(this.video.playbackRate=d),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(d){return d===void 0&&(d=!0),this.video&&(this.video.loop=d),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(d,f){return f===void 0&&(f=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,d),this.videoTextureSource.setFlipY(f)),this._key=d,this.flipY=f,!!this.videoTexture},stop:function(d){d===void 0&&(d=!0);var f=this.video;return f&&(this.removeEventHandlers(),f.cancelVideoFrameCallback(this._rfvCallbackId),f.pause()),this.retry=0,this._playCalled=!1,d&&this.emit(n.VIDEO_STOP,this),this},removeVideoElement:function(){var d=this.video;
2171if(d){for(d.parentNode&&d.parentNode.removeChild(d);d.hasChildNodes();)d.removeChild(d.firstChild);d.removeAttribute("autoplay"),d.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var d=this.scene.sys.game.events;d.off(r.PAUSE,this.globalPause,this),d.off(r.RESUME,this.globalResume,this);var f=this.scene.sys.sound;f&&f.off(h.GLOBAL_MUTE,this.globalMute,this)}});c.exports=u},58352:c=>{/**
2172 * @author       Richard Davey <[email protected]>
2173 * @copyright    2013-2025 Phaser Studio Inc.
2174 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2175 */var x=function(t,o,p,a){o.videoTexture&&(p.addToRenderList(o),t.batchSprite(o,o.frame,p,a))};c.exports=x},11511:(c,x,t)=>{/**
2176 * @author       Richard Davey <[email protected]>
2177 * @copyright    2013-2025 Phaser Studio Inc.
2178 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2179 */var o=t(25305),p=t(44603),a=t(23568),n=t(18471);p.register("video",function(r,e){r===void 0&&(r={});var s=a(r,"key",null),h=new n(this.scene,0,0,s);return e!==void 0&&(r.add=e),o(this.scene,h,r),h})},89025:(c,x,t)=>{/**
2180 * @author       Richard Davey <[email protected]>
2181 * @copyright    2013-2025 Phaser Studio Inc.
2182 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2183 */var o=t(18471),p=t(39429);p.register("video",function(a,n,r){return this.displayList.add(new o(this.scene,a,n,r))})},10247:(c,x,t)=>{/**
2184 * @author       Richard Davey <[email protected]>
2185 * @copyright    2013-2025 Phaser Studio Inc.
2186 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2187 */var o=t(29747),p=o,a=o;p=t(29849),a=t(58352),c.exports={renderWebGL:p,renderCanvas:a}},29849:c=>{/**
2188 * @author       Richard Davey <[email protected]>
2189 * @copyright    2013-2025 Phaser Studio Inc.
2190 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2191 */var x=function(t,o,p,a){o.videoTexture&&(p.addToRenderList(o),o.pipeline.batchSprite(o,p,a))};c.exports=x},41481:(c,x,t)=>{/**
2192 * @author       Richard Davey <[email protected]>
2193 * @copyright    2013-2025 Phaser Studio Inc.
2194 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2195 */var o=t(10312),p=t(96503),a=t(87902),n=t(83419),r=t(31401),e=t(95643),s=t(87841),h=t(37303),i=new n({Extends:e,Mixins:[r.Depth,r.GetBounds,r.Origin,r.Transform,r.ScrollFactor,r.Visible],initialize:function(u,d,f,v,m){v===void 0&&(v=1),m===void 0&&(m=v),e.call(this,u,"Zone"),this.setPosition(d,f),this.width=v,this.height=m,this.blendMode=o.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(l){this.scaleX=l/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(l){this.scaleY=l/this.height}},setSize:function(l,u,d){d===void 0&&(d=!0),this.width=l,this.height=u,this.updateDisplayOrigin();var f=this.input;return d&&f&&!f.customHitArea&&(f.hitArea.width=l,f.hitArea.height=u),this},setDisplaySize:function(l,u){return this.displayWidth=l,this.displayHeight=u,this},setCircleDropZone:function(l){return this.setDropZone(new p(0,0,l),a)},setRectangleDropZone:function(l,u){return this.setDropZone(new s(0,0,l,u),h)},setDropZone:function(l,u){return this.input||this.setInteractive(l,u,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(l,u,d){d.addToRenderList(u)},renderWebGL:function(l,u,d){d.addToRenderList(u)}});c.exports=i},95261:(c,x,t)=>{/**
2196 * @author       Richard Davey <[email protected]>
2197 * @copyright    2013-2025 Phaser Studio Inc.
2198 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2199 */var o=t(44603),p=t(23568),a=t(41481);o.register("zone",function(n){var r=p(n,"x",0),e=p(n,"y",0),s=p(n,"width",1),h=p(n,"height",s);return new a(this.scene,r,e,s,h)})},84175:(c,x,t)=>{/**
2200 * @author       Richard Davey <[email protected]>
2201 * @copyright    2013-2025 Phaser Studio Inc.
2202 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2203 */var o=t(41481),p=t(39429);p.register("zone",function(a,n,r,e){return this.displayList.add(new o(this.scene,a,n,r,e))})},95166:c=>{/**
2204 * @author       Richard Davey <[email protected]>
2205 * @copyright    2013-2025 Phaser Studio Inc.
2206 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2207 */var x=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};c.exports=x},96503:(c,x,t)=>{/**
2208 * @author       Richard Davey <[email protected]>
2209 * @copyright    2013-2025 Phaser Studio Inc.
2210 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2211 */var o=t(83419),p=t(87902),a=t(26241),n=t(79124),r=t(23777),e=t
2211(28176),s=new o({initialize:function(i,l,u){i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=0),this.type=r.CIRCLE,this.x=i,this.y=l,this._radius=u,this._diameter=u*2},contains:function(h,i){return p(this,h,i)},getPoint:function(h,i){return a(this,h,i)},getPoints:function(h,i,l){return n(this,h,i,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,i,l){return this.x=h,this.y=i,this._radius=l,this._diameter=l*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}}});c.exports=s},71562:c=>{/**
2212 * @author       Richard Davey <[email protected]>
2213 * @copyright    2013-2025 Phaser Studio Inc.
2214 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2215 */var x=function(t){return 2*(Math.PI*t.radius)};c.exports=x},92110:(c,x,t)=>{/**
2216 * @author       Richard Davey <[email protected]>
2217 * @copyright    2013-2025 Phaser Studio Inc.
2218 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2219 */var o=t(2141),p=function(a,n,r){return r===void 0&&(r=new o),r.x=a.x+a.radius*Math.cos(n),r.y=a.y+a.radius*Math.sin(n),r};c.exports=p},42250:(c,x,t)=>{/**
2220 * @author       Richard Davey <[email protected]>
2221 * @copyright    2013-2025 Phaser Studio Inc.
2222 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2223 */var o=t(96503),p=function(a){return new o(a.x,a.y,a.radius)};c.exports=p},87902:c=>{/**
2224 * @author       Richard Davey <[email protected]>
2225 * @copyright    2013-2025 Phaser Studio Inc.
2226 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2227 */var x=function(t,o,p){if(t.radius>0&&o>=t.left&&o<=t.right&&p>=t.top&&p<=t.bottom){var a=(t.x-o)*(t.x-o),n=(t.y-p)*(t.y-p);return a+n<=t.radius*t.radius}else return!1};c.exports=x},5698:(c,x,t)=>{/**
2228 * @author       Richard Davey <[email protected]>
2229 * @copyright    2013-2025 Phaser Studio Inc.
2230 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2231 */var o=t(87902),p=function(a,n){return o(a,n.x,n.y)};c.exports=p},70588:(c,x,t)=>{/**
2232 * @author       Richard Davey <[email protected]>
2233 * @copyright    2013-2025 Phaser Studio Inc.
2234 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2235 */var o=t(87902),p=function(a,n){return o(a,n.x,n.y)&&o(a,n.right,n.y)&&o(a,n.x,n.bottom)&&o(a,n.right,n.bottom)};c.exports=p},26394:c=>{/**
2236 * @author       Richard Davey <[email protected]>
2237 * @copyright    2013-2025 Phaser Studio Inc.
2238 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2239 */var x=function(t,o){return o.setTo(t.x,t.y,t.radius)};c.exports=x},76278:c=>{/**
2240 * @author       Richard Davey <[email protected]>
2241 * @copyright    2013-2025 Phaser Studio Inc.
2242 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2243 */var x=function(t,o){return t.x===o.x&&t.y===o.y&&t.radius===o.radius};c.exports=x},2074:(c,x,t)=>{/**
2244 * @author       Richard Davey <[email protected]>
2245 * @copyright    2013-2025 Phaser Studio Inc.
2246 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2247 */var o=t(87841),p=function(a,n){return n===void 0&&(n=new o),n.x=a.left,n.y=a.top,n.width=a.diameter,n.height=a.diameter,n};c.exports=p},26241:(c,x,t)=>{/**
2248 * @author       Richard Davey <[email protected]>
2249 * @copyright    2013-2025 Phaser Studio Inc.
2250 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2251 */var o=t(92110),p=t(62945),a=t(36383),n=t(2141),r=function(e,s,h){h===void 0&&(h=new n);var i=p(s,0,a.PI2);return o(e,i,h)};c.exports=r},79124:(c,x,t)=>{/**
2252 * @author       Richard Davey <[email protected]>
2253 * @copyright    2013-2025 Phaser Studio Inc.
2254 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2255 */var o=t(71562),p=t(92110),a=t(62945),n=t(36383),r=function(e,s,h,i){i===void 0&&(i=[]),!s&&h>0&&(s=o(e)/h);for(var l=0;l<s;l++){var u=a(l/s,0,n.PI2);i.push(p(e,u))}return i};c.exports=r},50884:c=>{/**
2256 * @author       Richard Davey <[email protected]>
2257 * @copyright    2013-2025 Phaser Studio Inc.
2258 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2259 */var x=function(t,o,p){return t.x+=o,t.y+=p,t};c.exports=x},39212:c=>{/**
2260 * @author       Richard Davey <[email protected]>
2261 * @copyright    2013-2025 Phaser Studio Inc.
2262 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2263 */var x=function(t,o){return t.x+=o.x,t.y+=o.y,t};c.exports=x},28176:(c,x,t)=>{/**
2264 * @author       Richard Davey <[email protected]>
2265 * @copyright    2013-2025 Phaser Studio Inc.
2266 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2267 */var o=t(2141),p=function(a,n){n===void 0&&(n=new o);var r=2*Math.PI*Math.random(),e=Math.random()+Math.random(),s=e>1?2-e:e,h=s*Math.cos(r),i=s*Math.sin(r);return n.x=a.x+h*a.radius,n.y=a.y+i*a.radius,n};c.exports=p},88911:(c,x,t)=>{/**
2268 * @author       Richard Davey <[email protected]>
2269 * @copyright    2013-2025 Phaser Studio Inc.
2270 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2271 */var o=t(96503);o.Area=t(95166),o.Circumference=t(71562),o.CircumferencePoint=t(92110),o.Clone=t(42250),o.C
2271ontains=t(87902),o.ContainsPoint=t(5698),o.ContainsRect=t(70588),o.CopyFrom=t(26394),o.Equals=t(76278),o.GetBounds=t(2074),o.GetPoint=t(26241),o.GetPoints=t(79124),o.Offset=t(50884),o.OffsetPoint=t(39212),o.Random=t(28176),c.exports=o},23777:c=>{/**
2272 * @author       Richard Davey <[email protected]>
2273 * @copyright    2013-2025 Phaser Studio Inc.
2274 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2275 */var x={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};c.exports=x},78874:c=>{/**
2276 * @author       Richard Davey <[email protected]>
2277 * @copyright    2013-2025 Phaser Studio Inc.
2278 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2279 */var x=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};c.exports=x},92990:c=>{/**
2280 * @author       Richard Davey <[email protected]>
2281 * @copyright    2013-2025 Phaser Studio Inc.
2282 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2283 */var x=function(t){var o=t.width/2,p=t.height/2,a=Math.pow(o-p,2)/Math.pow(o+p,2);return Math.PI*(o+p)*(1+3*a/(10+Math.sqrt(4-3*a)))};c.exports=x},79522:(c,x,t)=>{/**
2284 * @author       Richard Davey <[email protected]>
2285 * @copyright    2013-2025 Phaser Studio Inc.
2286 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2287 */var o=t(2141),p=function(a,n,r){r===void 0&&(r=new o);var e=a.width/2,s=a.height/2;return r.x=a.x+e*Math.cos(n),r.y=a.y+s*Math.sin(n),r};c.exports=p},58102:(c,x,t)=>{/**
2288 * @author       Richard Davey <[email protected]>
2289 * @copyright    2013-2025 Phaser Studio Inc.
2290 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2291 */var o=t(8497),p=function(a){return new o(a.x,a.y,a.width,a.height)};c.exports=p},81154:c=>{/**
2292 * @author       Richard Davey <[email protected]>
2293 * @copyright    2013-2025 Phaser Studio Inc.
2294 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2295 */var x=function(t,o,p){if(t.width<=0||t.height<=0)return!1;var a=(o-t.x)/t.width,n=(p-t.y)/t.height;return a*=a,n*=n,a+n<.25};c.exports=x},46662:(c,x,t)=>{/**
2296 * @author       Richard Davey <[email protected]>
2297 * @copyright    2013-2025 Phaser Studio Inc.
2298 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2299 */var o=t(81154),p=function(a,n){return o(a,n.x,n.y)};c.exports=p},1632:(c,x,t)=>{/**
2300 * @author       Richard Davey <[email protected]>
2301 * @copyright    2013-2025 Phaser Studio Inc.
2302 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2303 */var o=t(81154),p=function(a,n){return o(a,n.x,n.y)&&o(a,n.right,n.y)&&o(a,n.x,n.bottom)&&o(a,n.right,n.bottom)};c.exports=p},65534:c=>{/**
2304 * @author       Richard Davey <[email protected]>
2305 * @copyright    2013-2025 Phaser Studio Inc.
2306 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2307 */var x=function(t,o){return o.setTo(t.x,t.y,t.width,t.height)};c.exports=x},8497:(c,x,t)=>{/**
2308 * @author       Richard Davey <[email protected]>
2309 * @copyright    2013-2025 Phaser Studio Inc.
2310 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2311 */var o=t(83419),p=t(81154),a=t(90549),n=t(48320),r=t(23777),e=t(24820),s=new o({initialize:function(i,l,u,d){i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=0),this.type=r.ELLIPSE,this.x=i,this.y=l,this.width=u,this.height=d},contains:function(h,i){return p(this,h,i)},getPoint:function(h,i){return a(this,h,i)},getPoints:function(h,i,l){return n(this,h,i,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,i,l,u){return this.x=h,this.y=i,this.width=l,this.height=u,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}}});c.exports=s},36146:c=>{/**
2312 * @author       Richard Davey <[email protected]>
2313 * @copyright    2013-2025 Phaser Studio Inc.
2314 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2315 */var x=function(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height};c.exports=x},23694:(c,x,t)=>{/**
2316 * @author       Richard Davey <[email protected]>
2317 * @copyright    2013-2025 Phaser Studio Inc.
2318 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2319 */var o=t(87841),p=function(a,n){return n===void 0&&(n=new o),n.x=a.left,n.y=a.top,n.width=a.width,n.height=a.height,n};c.exports=p},90549:(c,x,t)=>{/**
2320 * @author       Richard Davey <[email protected]>
2321 * @copyright    2013-2025 Phaser Studio Inc.
2322 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2323 */var o=t(79522),p=t(62945),a=t(36383),n=t(2141),r=function(e,s,h){h===void 0&&(h=new n);var i=p(s,0,a.PI2);return o(e,i,h)};c.exports=r},48320:(c,x,t)=>{/**
2324 * @author       Richard Davey <[email protected]>
2325 * @copyright    2013-2025 Phaser Studio Inc.
2326 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2327 */var o=t(92990),p=t(79522),a=t(62945),n=t(36383),r=function(e,s,h,i){i===void 0&&(i=[]),!s&&h>0&&(s=o(e)/h);for(var l=0;l<s;l++){var u=a(l/s,0,n.PI2);i.push(p(e,u))}return i};c.exports=r},73424:c=>{/**
2328 * @author       Richard Davey <[email protected]>
2329 * @copyright    2013-2025 Phaser Studio Inc.
2330 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2331 */var x=function(t,o,p){return t.x+=o,t.y+=p,t};c.exports=x},44808:c=>{/**
2332 * @author       Richard Davey <[email protected]>
2333 * @copyright    2013-2025 Phaser Studio Inc.
2334 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2335 */var x=function(t,o){return t.x+=o.x,t.y+=o.y,t};c.exports=x},24820:(c,x,t)=>{/**
2336 * @author       Richard Davey <[email protected]>
2337 * @copyright    2013-2025 Phaser Studio Inc.
2338 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2339 */var o=t(2141),p=function(a,n){n===void 0&&(n=new o);var r=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return n.x=a.x+e*Math.cos(r)*a.width/2,n.y=a.y+e*Math.sin(r)*a.height/2,n};c.exports=p},49203:(c,x,t)=>{/**
2340 * @author       Richard Davey <[email protected]>
2341 * @copyright    2013-2025 Phaser Studio Inc.
2342 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2343 */var o=t(8497);o.Area=t(78874),o.Circumference=t(92990),o.CircumferencePoint=t(79522),o.Clone=t(58102),o.Contains=t(81154),o.ContainsPoint=t(46662),o.ContainsRect=t(1632),o.CopyFrom=t(65534),o.Equals=t(36146),o.GetBounds=t(23694),o.GetPoint=t(90549),o.GetPoints=t(48320),o.Offset=t(73424),o.OffsetPoint=t(44808),o.Random=t(24820),c.exports=o},55738:(c,x,t)=>{/**
2344 * @author       Richard Davey <[email protected]>
2345 * @copyright    2013-2025 Phaser Studio Inc.
2346 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2347 */var o=t(23777),p=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=p(!1,a,o),c.exports=a},2044:(c,x,t)=>{/**
2348 * @author       Richard Davey <[email protected]>
2349 * @copyright    2013-2025 Phaser Studio Inc.
2350 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2351 */var o=t(20339),p=function(a,n){return o(a.x,a.y,n.x,n.y)<=a.radius+n.radius};c.exports=p},81491:c=>{/**
2352 * @author       Richard Davey <[email protected]>
2353 * @copyright    2013-2025 Phaser Studio Inc.
2354 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2355 */var x=function(t,o){var p=o.width/2,a=o.height/2,n=Math.abs(t.x-o.x-p),r=Math.abs(t.y-o.y-a),e=p+t.radius,s=a+t.radius;if(n>e||r>s)return!1;if(n<=p||r<=a)return!0;var h=n-p,i=r-a,l=h*h,u=i*i,d=t.radius*t.radius;return l+u<=d};c.exports=x},63376:(c,x,t)=>{/**
2356 * @author       Florian Vazelle
2357 * @author       Geoffrey Glaive
2358 * @copyright    2013-2025 Phaser Studio Inc.
2359 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2360 */var o=t(2141),p=t(2044),a=function(n,r,e){if(e===void 0&&(e=[]),p(n,r)){var s=n.x,h=n.y,i=n.radius,l=r.x,u=r.y,d=r.radius,f,v,m,y,g;if(h===u)g=(d*d-i*i-l*l+s*s)/(2*(s-l)),f=1,v=-2*u,m=l*l+g*g-2*l*g+u*u-d*d,y=v*v-4*f*m,y===0?e.push(new o(g,-v/(2*f))):y>0&&(e.push(new o(g,(-v+Math.sqrt(y))/(2*f))),e.push(new o(g,(-v-Math.sqrt(y))/(2*f))));else{var T=(s-l)/(h-u),S=(d*d-i*i-l*l+s*s-u*u+h*h)/(2*(h-u));f=T*T+1,v=2*h*T-2*S*T-2*s,m=s*s+h*h+S*S-i*i-2*h*S,y=v*v-4*f*m,y===0?(g=-v/(2*f),e.push(new o(g,S-g*T))):y>0&&(g=(-v+Math.sqrt(y))/(2*f),e.push(new o(g,S-g*T)),g=(-v-Math.sqrt(y))/(2*f),e.push(new o(g,S-g*T)))}}return e};c.exports=a},97439:(c,x,t)=>{/**
2361 * @author       Florian Vazelle
2362 * @author       Geoffrey Glaive
2363 * @copyright    2013-2025 Phaser Studio Inc.
2364 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2365 */var o=t(4042),p=t(81491),a=function(n,r,e){if(e===void 0&&(e=[]),p(n,r)){var s=r.getLineA(),h=r.getLineB(),i=r.getLineC(),l=r.getLineD();o(s,n,e),o(h,n,e),o(i,n,e),o(l,n,e)}return e};c.exports=a},4042:(c,x,t)=>{/**
2366 * @author       Florian Vazelle
2367 * @author       Geoffrey Glaive
2368 * @copyright    2013-2025 Phaser Studio Inc.
2369 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2370 */var o=t(2141),p=t(80462),a=function(n,r,e){if(e===void 0&&(e=[]),p(n,r)){var s=n.x1,h=n.y1,i=n.x2,l=n.y2,u=r.x,d=r.y,f=r.radius,v=i-s,m=l-h,y=s-u,g=h-d,T=v*v+m*m,S=2*(v*y+m*g),E=y*y+g*g-f*f,M=S*S-4*T*E,F,A;if(M===0){var P=-S/(2*T);F=s+P*v,A=h+P*m,P>=0&&P<=1&&e.push(new o(F,A))}else if(M>0){var L=(-S-Math.sqrt(M))/(2*T);F=s+L*v,A=h+L*m,L>=0&&L<=1&&e.push(new o(F,A));var O=(-S+Math.sqrt(M))/(2*T);F=s+O*v,A=h+O*m,O>=0&&O<=1&&e.push(new o(F,A))}}return e};c.exports=a},36100:(c,x,t)=>{/**
2371 * @author       Richard Davey
2372 * @copyright    2013-2025 Phaser Studio Inc.
2373 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2374 */var o=t(25836),p=function(a,n,r,e){r===void 0&&(r=!1);var s=a.x1,h=a.y1,i=a.x2,l=a.y2,u=n.x1,d=n.y1,f=n.x2,v=n.y2,m=i-s,y=l-h,g=f-u,T=v-d,S=m*T-y*g;if(S===0)return null;var E,M,F;if(r){if(E=(m*(d-h)+y*(s-u))/(g*y-T*m),m!==0)M=(u+g*E-s)/m;else if(y!==0)M=(d+T*E-h)/y;else return null;if(M<0||E<0||E>1)return null;F=M}else{if(E=((u-s)*T-(d-h)*g)/S,M=((h-d)*m-(s-u)*y)/S,E<0||E>1||M<0||M>1)return null;F=E}return e===void 0&&(e=new o),e.set(s+m*F,h+y*F,F)};c.exports=p},3073:(c,x,t)=>{/**
2375 * @author       Richard Davey
2376 * @copyright    2013-2025 Phaser Studio Inc.
2377 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2378 */var o=t(36100),p=t(23031),a=t(25836),n=new p,r=new a,e=function(s,h,i,l){i===void 0&&(i=!1),l===void 0&&(l=new a);var u=!1;l.set(),r.set();for(var d=h[h.length-1],f=0;f<h.length;f++){var v=h[f];n.setTo(d.x,d.y,v.x,v.y),d=v,o(s,n,i,r)&&(!u||r.z<l.z)&&(l.copy(r),u=!0)}return u?l:null};c.exports=e},56362:(c,x,t)=>{/**
2379 * @author       Richard Davey
2380 * @copyright    2013-2025 Phaser Studio Inc.
2381 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2382 */var o=t(25836),p=t(61369),a=t(3073),n=new o,r=function(e,s,h,i){i===void 0&&(i=new p),Array.isArray(s)||(s=[s]);var l=!1;i.set(),n.set();for(var u=0;u<s.length;u++)a(e,s[u].points,h,n)&&(!l||n.z<i.z)&&(i.set(n.x,n.y,n.z,u),l=!0);return l?i:null};c.exports=r},60646:(c,x,t)=>{/**
2383 * @author       Florian Vazelle
2384 * @author       Geoffrey Glaive
2385 * @copyright    2013-2025 Phaser Studio Inc.
2386 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2387 */var o=t(2141),p=t(76112),a=t(92773),n=function(r,e,s){if(s===void 0&&(s=[]),a(r,e))for(var h=e.getLineA(),i=e.getLineB(),l=e.getLineC(),u=e.getLineD(),d=[new o,new o,new o,new o],f=[p(h,r,d[0]),p(i,r,d[1]),p(l,r,d[2]),p(u,r,d[3])],v=0;v<4;v++)f[v]&&s.push(d[v]);return s};c.exports=n},71147:(c,x,t)=>{/**
2388 * @author       Richard Davey
2389 * @copyright    2013-2025 Phaser Studio Inc.
2390 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2391 */var o=t(61369),p=t(56362),a=t(23031),n=new a;function r(h,i,l,u,d){var f=Math.cos(h),v=Math.sin(h);n.setTo(i,l,i+f,l+v);var m=p(n,u,!0);
2391m&&d.push(new o(m.x,m.y,h,m.w))}function e(h,i){return h.z-i.z}var s=function(h,i,l){Array.isArray(l)||(l=[l]);for(var u=[],d=[],f=0;f<l.length;f++)for(var v=l[f].points,m=0;m<v.length;m++){var y=Math.atan2(v[m].y-i,v[m].x-h);d.indexOf(y)===-1&&(r(y,h,i,l,u),r(y-1e-5,h,i,l,u),r(y+1e-5,h,i,l,u),d.push(y))}return u.sort(e)};c.exports=s},68389:(c,x,t)=>{/**
2392 * @author       Richard Davey <[email protected]>
2393 * @copyright    2013-2025 Phaser Studio Inc.
2394 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2395 */var o=t(87841),p=t(59996),a=function(n,r,e){return e===void 0&&(e=new o),p(n,r)&&(e.x=Math.max(n.x,r.x),e.y=Math.max(n.y,r.y),e.width=Math.min(n.right,r.right)-e.x,e.height=Math.min(n.bottom,r.bottom)-e.y),e};c.exports=a},52784:(c,x,t)=>{/**
2396 * @author       Florian Vazelle
2397 * @author       Geoffrey Glaive
2398 * @copyright    2013-2025 Phaser Studio Inc.
2399 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2400 */var o=t(60646),p=t(59996),a=function(n,r,e){if(e===void 0&&(e=[]),p(n,r)){var s=n.getLineA(),h=n.getLineB(),i=n.getLineC(),l=n.getLineD();o(s,r,e),o(h,r,e),o(i,r,e),o(l,r,e)}return e};c.exports=a},26341:(c,x,t)=>{/**
2401 * @author       Florian Vazelle
2402 * @author       Geoffrey Glaive
2403 * @copyright    2013-2025 Phaser Studio Inc.
2404 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2405 */var o=t(89265),p=t(60646),a=function(n,r,e){if(e===void 0&&(e=[]),o(n,r)){var s=r.getLineA(),h=r.getLineB(),i=r.getLineC();p(s,n,e),p(h,n,e),p(i,n,e)}return e};c.exports=a},38720:(c,x,t)=>{/**
2406 * @author       Florian Vazelle
2407 * @author       Geoffrey Glaive
2408 * @copyright    2013-2025 Phaser Studio Inc.
2409 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2410 */var o=t(4042),p=t(67636),a=function(n,r,e){if(e===void 0&&(e=[]),p(n,r)){var s=n.getLineA(),h=n.getLineB(),i=n.getLineC();o(s,r,e),o(h,r,e),o(i,r,e)}return e};c.exports=a},13882:(c,x,t)=>{/**
2411 * @author       Florian Vazelle
2412 * @author       Geoffrey Glaive
2413 * @copyright    2013-2025 Phaser Studio Inc.
2414 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2415 */var o=t(2141),p=t(2822),a=t(76112),n=function(r,e,s){if(s===void 0&&(s=[]),p(r,e))for(var h=r.getLineA(),i=r.getLineB(),l=r.getLineC(),u=[new o,new o,new o],d=[a(h,e,u[0]),a(i,e,u[1]),a(l,e,u[2])],f=0;f<3;f++)d[f]&&s.push(u[f]);return s};c.exports=n},75636:(c,x,t)=>{/**
2416 * @author       Florian Vazelle
2417 * @author       Geoffrey Glaive
2418 * @copyright    2013-2025 Phaser Studio Inc.
2419 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2420 */var o=t(82944),p=t(13882),a=function(n,r,e){if(e===void 0&&(e=[]),o(n,r)){var s=r.getLineA(),h=r.getLineB(),i=r.getLineC();p(n,s,e),p(n,h,e),p(n,i,e)}return e};c.exports=a},80462:(c,x,t)=>{/**
2421 * @author       Richard Davey <[email protected]>
2422 * @copyright    2013-2025 Phaser Studio Inc.
2423 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2424 */var o=t(87902),p=t(2141),a=new p,n=function(r,e,s){if(s===void 0&&(s=a),o(e,r.x1,r.y1))return s.x=r.x1,s.y=r.y1,!0;if(o(e,r.x2,r.y2))return s.x=r.x2,s.y=r.y2,!0;var h=r.x2-r.x1,i=r.y2-r.y1,l=e.x-r.x1,u=e.y-r.y1,d=h*h+i*i,f=h,v=i;if(d>0){var m=(l*h+u*i)/d;f*=m,v*=m}s.x=r.x1+f,s.y=r.y1+v;var y=f*f+v*v;return y<=d&&f*h+v*i>=0&&o(e,s.x,s.y)};c.exports=n},76112:c=>{/**
2425 * @author       Richard Davey <[email protected]>
2426 * @copyright    2013-2025 Phaser Studio Inc.
2427 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2428 */var x=function(t,o,p){var a=t.x1,n=t.y1,r=t.x2,e=t.y2,s=o.x1,h=o.y1,i=o.x2,l=o.y2;if(a===r&&n===e||s===i&&h===l)return!1;var u=(l-h)*(r-a)-(i-s)*(e-n);if(u===0)return!1;var d=((i-s)*(n-h)-(l-h)*(a-s))/u,f=((r-a)*(n-h)-(e-n)*(a-s))/u;return d<0||d>1||f<0||f>1?!1:(p&&(p.x=a+d*(r-a),p.y=n+d*(e-n)),!0)};c.exports=x},92773:c=>{/**
2429 * @author       Richard Davey <[email protected]>
2430 * @copyright    2013-2025 Phaser Studio Inc.
2431 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2432 */var x=function(t,o){var p=t.x1,a=t.y1,n=t.x2,r=t.y2,e=o.x,s=o.y,h=o.right,i=o.bottom,l=0;if(p>=e&&p<=h&&a>=s&&a<=i||n>=e&&n<=h&&r>=s&&r<=i)return!0;
2432if(p<e&&n>=e){if(l=a+(r-a)*(e-p)/(n-p),l>s&&l<=i)return!0}else if(p>h&&n<=h&&(l=a+(r-a)*(h-p)/(n-p),l>=s&&l<=i))return!0;if(a<s&&r>=s){if(l=p+(n-p)*(s-a)/(r-a),l>=e&&l<=h)return!0}else if(a>i&&r<=i&&(l=p+(n-p)*(i-a)/(r-a),l>=e&&l<=h))return!0;return!1};c.exports=x},16204:c=>{/**
2433 * @author       Richard Davey <[email protected]>
2434 * @author       Florian Mertens
2435 * @copyright    2013-2025 Phaser Studio Inc.
2436 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2437 */var x=function(t,o,p){p===void 0&&(p=1);var a=o.x1,n=o.y1,r=o.x2,e=o.y2,s=t.x,h=t.y,i=(r-a)*(r-a)+(e-n)*(e-n);if(i===0)return!1;var l=((s-a)*(r-a)+(h-n)*(e-n))/i;if(l<0)return Math.sqrt((a-s)*(a-s)+(n-h)*(n-h))<=p;if(l>=0&&l<=1){var u=((n-h)*(r-a)-(a-s)*(e-n))/i;return Math.abs(u)*Math.sqrt(i)<=p}else return Math.sqrt((r-s)*(r-s)+(e-h)*(e-h))<=p};c.exports=x},14199:(c,x,t)=>{/**
2438 * @author       Richard Davey <[email protected]>
2439 * @copyright    2013-2025 Phaser Studio Inc.
2440 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2441 */var o=t(16204),p=function(a,n){if(!o(a,n))return!1;var r=Math.min(n.x1,n.x2),e=Math.max(n.x1,n.x2),s=Math.min(n.y1,n.y2),h=Math.max(n.y1,n.y2);return a.x>=r&&a.x<=e&&a.y>=s&&a.y<=h};c.exports=p},59996:c=>{/**
2442 * @author       Richard Davey <[email protected]>
2443 * @copyright    2013-2025 Phaser Studio Inc.
2444 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2445 */var x=function(t,o){return t.width<=0||t.height<=0||o.width<=0||o.height<=0?!1:!(t.right<o.x||t.bottom<o.y||t.x>o.right||t.y>o.bottom)};c.exports=x},89265:(c,x,t)=>{/**
2446 * @author       Richard Davey <[email protected]>
2447 * @copyright    2013-2025 Phaser Studio Inc.
2448 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2449 */var o=t(76112),p=t(37303),a=t(48653),n=t(77493),r=function(e,s){if(s.left>e.right||s.right<e.left||s.top>e.bottom||s.bottom<e.top)return!1;var h=s.getLineA(),i=s.getLineB(),l=s.getLineC();if(p(e,h.x1,h.y1)||p(e,h.x2,h.y2)||p(e,i.x1,i.y1)||p(e,i.x2,i.y2)||p(e,l.x1,l.y1)||p(e,l.x2,l.y2))return!0;var u=e.getLineA(),d=e.getLineB(),f=e.getLineC(),v=e.getLineD();if(o(h,u)||o(h,d)||o(h,f)||o(h,v)||o(i,u)||o(i,d)||o(i,f)||o(i,v)||o(l,u)||o(l,d)||o(l,f)||o(l,v))return!0;var m=n(e),y=a(s,m,!0);return y.length>0};c.exports=r},84411:c=>{/**
2450 * @author       Richard Davey <[email protected]>
2451 * @copyright    2013-2025 Phaser Studio Inc.
2452 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2453 */var x=function(t,o,p,a,n,r){return r===void 0&&(r=0),!(o>t.right+r||p<t.left-r||a>t.bottom+r||n<t.top-r)};c.exports=x},67636:(c,x,t)=>{/**
2454 * @author       Richard Davey <[email protected]>
2455 * @copyright    2013-2025 Phaser Studio Inc.
2456 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2457 */var o=t(80462),p=t(10690),a=function(n,r){return n.left>r.right||n.right<r.left||n.top>r.bottom||n.bottom<r.top?!1:!!(p(n,r.x,r.y)||o(n.getLineA(),r)||o(n.getLineB(),r)||o(n.getLineC(),r))};c.exports=a},2822:(c,x,t)=>{/**
2458 * @author       Richard Davey <[email protected]>
2459 * @copyright    2013-2025 Phaser Studio Inc.
2460 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2461 */var o=t(76112),p=function(a,n){return!!(a.contains(n.x1,n.y1)||a.contains(n.x2,n.y2)||o(a.getLineA(),n)||o(a.getLineB(),n)||o(a.getLineC(),n))};c.exports=p},82944:(c,x,t)=>{/**
2462 * @author       Richard Davey <[email protected]>
2463 * @copyright    2013-2025 Phaser Studio Inc.
2464 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2465 */var o=t(48653),p=t(71694),a=t(76112),n=function(r,e){if(r.left>e.right||r.right<e.left||r.top>e.bottom||r.bottom<e.top)return!1;var s=r.getLineA(),h=r.getLineB(),i=r.getLineC(),l=e.getLineA(),u=e.getLineB(),d=e.getLineC();if(a(s,l)||a(s,u)||a(s,d)||a(h,l)||a(h,u)||a(h,d)||a(i,l)||a(i,u)||a(i,d))return!0;var f=p(r),v=o(e,f,!0);return v.length>0||(f=p(e),v=o(r,f,!0),v.length>0)};c.exports=n},91865:(c,x,t)=>{/**
2466 * @author       Richard Davey <[email protected]>
2467 * @copyright    2013-2025 Phaser Studio Inc.
2468 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2469 */c.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:c=>{/**
2470 * @author       Richard Davey <[email protected]>
2471 * @copyright    2013-2025 Phaser Studio Inc.
2472 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2473 */var x=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};c.exports=x},84993:c=>{/**
2474 * @author       Richard Davey <[email protected]>
2475 * @copyright    2013-2025 Phaser Studio Inc.
2476 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2477 */var x=function(t,o,p){o===void 0&&(o=1),p===void 0&&(p=[]);var a=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),e=Math.round(t.y2),s=Math.abs(r-a),h=Math.abs(e-n),i=a<r?1:-1,l=n<e?1:-1,u=s-h;p.push({x:a,y:n});for(var d=1;!(a===r&&n===e);){var f=u<<1;f>-h&&(u-=h,a+=i),f<s&&(u+=s,n+=l),d%o===0&&p.push({x:a,y:n}),d++}return p};c.exports=x},36469:c=>
2477{/**
2478 * @author       Richard Davey <[email protected]>
2479 * @copyright    2013-2025 Phaser Studio Inc.
2480 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2481 */var x=function(t,o,p){var a=o-(t.x1+t.x2)/2,n=p-(t.y1+t.y2)/2;return t.x1+=a,t.y1+=n,t.x2+=a,t.y2+=n,t};c.exports=x},31116:(c,x,t)=>{/**
2482 * @author       Richard Davey <[email protected]>
2483 * @copyright    2013-2025 Phaser Studio Inc.
2484 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2485 */var o=t(23031),p=function(a){return new o(a.x1,a.y1,a.x2,a.y2)};c.exports=p},59944:c=>{/**
2486 * @author       Richard Davey <[email protected]>
2487 * @copyright    2013-2025 Phaser Studio Inc.
2488 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2489 */var x=function(t,o){return o.setTo(t.x1,t.y1,t.x2,t.y2)};c.exports=x},59220:c=>{/**
2490 * @author       Richard Davey <[email protected]>
2491 * @copyright    2013-2025 Phaser Studio Inc.
2492 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2493 */var x=function(t,o){return t.x1===o.x1&&t.y1===o.y1&&t.x2===o.x2&&t.y2===o.y2};c.exports=x},78177:(c,x,t)=>{/**
2494 * @author       Richard Davey <[email protected]>
2495 * @copyright    2013-2025 Phaser Studio Inc.
2496 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2497 */var o=t(35001),p=function(a,n,r){r===void 0&&(r=n);var e=o(a),s=a.x2-a.x1,h=a.y2-a.y1;return n&&(a.x1=a.x1-s/e*n,a.y1=a.y1-h/e*n),r&&(a.x2=a.x2+s/e*r,a.y2=a.y2+h/e*r),a};c.exports=p},26708:(c,x,t)=>{/**
2498 * @author       Richard Davey <[email protected]>
2499 * @copyright    2013-2025 Phaser Studio Inc.
2500 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2501 */var o=t(52816),p=t(6113),a=t(2141),n=function(r,e,s,h,i){h===void 0&&(h=0),i===void 0&&(i=[]);var l=[],u=r.x1,d=r.y1,f=r.x2-u,v=r.y2-d,m=p(e,i),y,g,T=s-1;for(y=0;y<T;y++)g=m(y/T),l.push(new a(u+f*g,d+v*g));if(g=m(1),l.push(new a(u+f*g,d+v*g)),h>0){var S=l[0],E=[S];for(y=1;y<l.length-1;y++){var M=l[y];o(S,M)>=h&&(E.push(M),S=M)}var F=l[l.length-1];return o(S,F)<h&&E.pop(),E.push(F),E}else return l};c.exports=n},32125:(c,x,t)=>{/**
2502 * @author       Richard Davey <[email protected]>
2503 * @copyright    2013-2025 Phaser Studio Inc.
2504 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2505 */var o=t(2141),p=function(a,n){return n===void 0&&(n=new o),n.x=(a.x1+a.x2)/2,n.y=(a.y1+a.y2)/2,n};c.exports=p},99569:(c,x,t)=>{/**
2506 * @author       Richard Davey <[email protected]>
2507 * @author       Florian Mertens
2508 * @copyright    2013-2025 Phaser Studio Inc.
2509 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2510 */var o=t(2141),p=function(a,n,r){r===void 0&&(r=new o);var e=a.x1,s=a.y1,h=a.x2,i=a.y2,l=(h-e)*(h-e)+(i-s)*(i-s);if(l===0)return r;var u=((n.x-e)*(h-e)+(n.y-s)*(i-s))/l;return r.x=e+u*(h-e),r.y=s+u*(i-s),r};c.exports=p},34638:(c,x,t)=>{/**
2511 * @author       Richard Davey <[email protected]>
2512 * @copyright    2013-2025 Phaser Studio Inc.
2513 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2514 */var o=t(36383),p=t(91938),a=t(2141),n=function(r,e){e===void 0&&(e=new a);var s=p(r)-o.TAU;return e.x=Math.cos(s),e.y=Math.sin(s),e};c.exports=n},13151:(c,x,t)=>{/**
2515 * @author       Richard Davey <[email protected]>
2516 * @copyright    2013-2025 Phaser Studio Inc.
2517 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2518 */var o=t(2141),p=function(a,n,r){return r===void 0&&(r=new o),r.x=a.x1+(a.x2-a.x1)*n,r.y=a.y1+(a.y2-a.y1)*n,r};c.exports=p},15258:(c,x,t)=>{/**
2519 * @author       Richard Davey <[email protected]>
2520 * @copyright    2013-2025 Phaser Studio Inc.
2521 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2522 */var o=t(35001),p=t(2141),a=function(n,r,e,s){s===void 0&&(s=[]),!r&&e>0&&(r=o(n)/e);for(var h=n.x1,i=n.y1,l=n.x2,u=n.y2,d=0;d<r;d++){var f=d/r,v=h+(l-h)*f,m=i+(u-i)*f;s.push(new p(v,m))}return s};c.exports=a},26408:c=>{/**
2523 * @author       Richard Davey <[email protected]>
2524 * @author       Florian Mertens
2525 * @copyright    2013-2025 Phaser Studio Inc.
2526 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2527 */var x=function(t,o){var p=t.x1,a=t.y1,n=t.x2,r=t.y2,e=(n-p)*(n-p)+(r-a)*(r-a);if(e===0)return!1;var s=((a-o.y)*(n-p)-(p-o.x)*(r-a))/e;return Math.abs(s)*Math.sqrt(e)};c.exports=x},98770:c=>{/**
2528 * @author       Richard Davey <[email protected]>
2529 * @copyright    2013-2025 Phaser Studio Inc.
2530 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2531 */var x=function(t){return Math.abs(t.y1-t.y2)};c.exports=x},35001:c=>{/**
2532 * @author       Richard Davey <[email protected]>
2533 * @copyright    2013-2025 Phaser Studio Inc.
2534 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2535 */var x=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};c.exports=x},23031:(c,x,t)=>{/**
2536 * @author       Richard Davey <[email protected]>
2537 * @copyright    2013-2025 Phaser Studio Inc.
2538 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2539 */var o=t(83419),p=t(13151),a=t(15258),n=t(23777),r=t(65822),e=t(26099),s=new o({initialize:function(i,l,u,d){i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=0),this.type=n.LINE,this.x1=i,this.y1=l,this.x2=u,this.y2=d},getPoint:function(h,i){return p(this,h,i)},getPoints:function(h,i,l){return a(this,h,i,l)},getRandomPoint:function(h){return r(this,h)},setTo:function(h,i,l,u){return h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=0),this.x1=h,this.y1=i,this.x2=l,this.y2=u,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}}});c.exports=s},64795:(c,x,t)=>{/**
2540 * @author       Richard Davey <[email protected]>
2541 * @copyright    2013-2025 Phaser Studio Inc.
2542 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2543 */var o=t(36383),p=t(15994),a=t(91938),n=function(r){var e=a(r)-o.TAU;
2543return p(e,-Math.PI,Math.PI)};c.exports=n},52616:(c,x,t)=>{/**
2544 * @author       Richard Davey <[email protected]>
2545 * @copyright    2013-2025 Phaser Studio Inc.
2546 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2547 */var o=t(36383),p=t(91938),a=function(n){return Math.cos(p(n)-o.TAU)};c.exports=a},87231:(c,x,t)=>{/**
2548 * @author       Richard Davey <[email protected]>
2549 * @copyright    2013-2025 Phaser Studio Inc.
2550 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2551 */var o=t(36383),p=t(91938),a=function(n){return Math.sin(p(n)-o.TAU)};c.exports=a},89662:c=>{/**
2552 * @author       Richard Davey <[email protected]>
2553 * @copyright    2013-2025 Phaser Studio Inc.
2554 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2555 */var x=function(t,o,p){return t.x1+=o,t.y1+=p,t.x2+=o,t.y2+=p,t};c.exports=x},71165:c=>{/**
2556 * @author       Richard Davey <[email protected]>
2557 * @copyright    2013-2025 Phaser Studio Inc.
2558 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2559 */var x=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};c.exports=x},65822:(c,x,t)=>{/**
2560 * @author       Richard Davey <[email protected]>
2561 * @copyright    2013-2025 Phaser Studio Inc.
2562 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2563 */var o=t(2141),p=function(a,n){n===void 0&&(n=new o);var r=Math.random();return n.x=a.x1+r*(a.x2-a.x1),n.y=a.y1+r*(a.y2-a.y1),n};c.exports=p},69777:(c,x,t)=>{/**
2564 * @author       Richard Davey <[email protected]>
2565 * @copyright    2013-2025 Phaser Studio Inc.
2566 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2567 */var o=t(91938),p=t(64795),a=function(n,r){return 2*p(r)-Math.PI-o(n)};c.exports=a},39706:(c,x,t)=>{/**
2568 * @author       Richard Davey <[email protected]>
2569 * @copyright    2013-2025 Phaser Studio Inc.
2570 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2571 */var o=t(64400),p=function(a,n){var r=(a.x1+a.x2)/2,e=(a.y1+a.y2)/2;return o(a,r,e,n)};c.exports=p},82585:(c,x,t)=>{/**
2572 * @author       Richard Davey <[email protected]>
2573 * @copyright    2013-2025 Phaser Studio Inc.
2574 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2575 */var o=t(64400),p=function(a,n,r){return o(a,n.x,n.y,r)};c.exports=p},64400:c=>{/**
2576 * @author       Richard Davey <[email protected]>
2577 * @copyright    2013-2025 Phaser Studio Inc.
2578 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2579 */var x=function(t,o,p,a){var n=Math.cos(a),r=Math.sin(a),e=t.x1-o,s=t.y1-p;return t.x1=e*n-s*r+o,t.y1=e*r+s*n+p,e=t.x2-o,s=t.y2-p,t.x2=e*n-s*r+o,t.y2=e*r+s*n+p,t};c.exports=x},62377:c=>{/**
2580 * @author       Richard Davey <[email protected]>
2581 * @copyright    2013-2025 Phaser Studio Inc.
2582 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2583 */var x=function(t,o,p,a,n){return t.x1=o,t.y1=p,t.x2=o+Math.cos(a)*n,t.y2=p+Math.sin(a)*n,t};c.exports=x},71366:c=>{/**
2584 * @author       Richard Davey <[email protected]>
2585 * @copyright    2013-2025 Phaser Studio Inc.
2586 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2587 */var x=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};c.exports=x},10809:c=>{/**
2588 * @author       Richard Davey <[email protected]>
2589 * @copyright    2013-2025 Phaser Studio Inc.
2590 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2591 */var x=function(t){return Math.abs(t.x1-t.x2)};c.exports=x},2529:(c,x,t)=>{/**
2592 * @author       Richard Davey <[email protected]>
2593 * @copyright    2013-2025 Phaser Studio Inc.
2594 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2595 */var o=t(23031);o.Angle=t(91938),o.BresenhamPoints=t(84993),o.CenterOn=t(36469),o.Clone=t(31116),o.CopyFrom=t(59944),o.Equals=t(59220),o.Extend=t(78177),o.GetEasedPoints=t(26708),o.GetMidPoint=t(32125),o.GetNearestPoint=t(99569),o.GetNormal=t(34638),o.GetPoint=t(13151),o.GetPoints=t(15258),o.GetShortestDistance=t(26408),o.Height=t(98770),o.Length=t(35001),o.NormalAngle=t(64795),o.NormalX=t(52616),o.NormalY=t(87231),o.Offset=t(89662),o.PerpSlope=t(71165),o.Random=t(65822),o.ReflectAngle=t(69777),o.Rotate=t(39706),o.RotateAroun
2595dPoint=t(82585),o.RotateAroundXY=t(64400),o.SetToAngle=t(62377),o.Slope=t(71366),o.Width=t(10809),c.exports=o},83997:(c,x,t)=>{/**
2596 * @author       Richard Davey <[email protected]>
2597 * @copyright    2013-2025 Phaser Studio Inc.
2598 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2599 */var o=t(83419),p=t(87841),a=t(26099);function n(e,s,h,i){var l=e-h,u=s-i,d=l*l+u*u;return Math.sqrt(d)}var r=new o({initialize:function(s,h,i){this.vertex1=s,this.vertex2=h,this.vertex3=i,this.bounds=new p,this._inCenter=new a},getInCenter:function(e){e===void 0&&(e=!0);var s=this.vertex1,h=this.vertex2,i=this.vertex3,l,u,d,f,v,m;e?(l=s.x,u=s.y,d=h.x,f=h.y,v=i.x,m=i.y):(l=s.vx,u=s.vy,d=h.vx,f=h.vy,v=i.vx,m=i.vy);var y=n(v,m,d,f),g=n(l,u,v,m),T=n(d,f,l,u),S=y+g+T;return this._inCenter.set((l*y+d*g+v*T)/S,(u*y+f*g+m*T)/S)},contains:function(e,s,h){var i=this.vertex1,l=this.vertex2,u=this.vertex3,d=i.vx,f=i.vy,v=l.vx,m=l.vy,y=u.vx,g=u.vy;if(h){var T=h.a,S=h.b,E=h.c,M=h.d,F=h.e,A=h.f;d=i.vx*T+i.vy*E+F,f=i.vx*S+i.vy*M+A,v=l.vx*T+l.vy*E+F,m=l.vx*S+l.vy*M+A,y=u.vx*T+u.vy*E+F,g=u.vx*S+u.vy*M+A}var P=y-d,L=g-f,O=v-d,G=m-f,z=e-d,Y=s-f,X=P*P+L*L,I=P*O+L*G,U=P*z+L*Y,D=O*O+G*G,V=O*z+G*Y,B=X*D-I*I,W=B===0?0:1/B,K=(D*U-I*V)*W,J=(X*V-I*U)*W;return K>=0&&J>=0&&K+J<1},isCounterClockwise:function(e){var s=this.vertex1,h=this.vertex2,i=this.vertex3,l=(h.vx-s.vx)*(i.vy-s.vy)-(h.vy-s.vy)*(i.vx-s.vx);return e<=0?l>=0:l<0},load:function(e,s,h,i,l){return h=this.vertex1.load(e,s,h,i,l),h=this.vertex2.load(e,s,h,i,l),h=this.vertex3.load(e,s,h,i,l),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,l,u,d,f,v,m,y){this.update(i,l,u,d,f,v,m,y);var g=this.vertex1,T=this.vertex2,S=this.vertex3;if(g.ta<=0&&T.ta<=0&&S.ta<=0||s&&!this.isCounterClockwise(h))return!1;var E=this.bounds;E.x=Math.min(g.tx,T.tx,S.tx),E.y=Math.min(g.ty,T.ty,S.ty),E.width=Math.max(g.tx,T.tx,S.tx)-E.x,E.height=Math.max(g.ty,T.ty,S.ty)-E.y;var M=e.x+e.width,F=e.y+e.height;return E.width<=0||E.height<=0||e.width<=0||e.height<=0?!1:!(E.right<e.x||E.bottom<e.y||E.x>M||E.y>F)},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,l,u,d,f){return this.vertex1.update(s,h,i,l,u,d,f,e),this.vertex2.update(s,h,i,l,u,d,f,e),this.vertex3.update(s,h,i,l,u,d,f,e),this},translate:function(e,s){s===void 0&&(s=0);var h=this.vertex1,i=this.vertex2,l=this.vertex3;return h.x+=e,h.y+=s,i.x+=e,i.y+=s,l.x+=e,l.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}});c.exports=r},48803:(c,x,t)=>{/**
2600 * @author       Richard Davey <[email protected]>
2601 * @copyright    2013-2025 Phaser Studio Inc.
2602 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2603 */var o=t(83997),p=t(95540),a=t(37867),n=t(25836),r=t(39318),e=new n,s=new n,h=new a,i=function(l){var u=p(l,"mesh"),d=p(l,"texture",null),f=p(l,"frame"),v=p(l,"width",1),m=p(l,"height",v),y=p(l,"widthSegments",1),g=p(l,"heightSegments",y),T=p(l,"x",0),S=p(l,"y",0),E=p(l,"z",0),M=p(l,"rotateX",0),F=p(l,"rotateY",0),A=p(l,"rotateZ",0),P=p(l,"zIsUp",!0),L=p(l,"isOrtho",u?u.dirtyCache[11]:!1),O
2603=p(l,"colors",[16777215]),G=p(l,"alphas",[1]),z=p(l,"tile",!1),Y=p(l,"flipY",!1),X=p(l,"width",null),I={faces:[],verts:[]};e.set(T,S,E),s.set(M,F,A),h.fromRotationXYTranslation(s,e,P);var U;if(!d&&u)d=u.texture,f||(U=u.frame);else if(u&&typeof d=="string")d=u.scene.sys.textures.get(d);else if(!d)return I;U||(U=d.get(f)),!X&&L&&d&&u&&(v=U.width/u.height,m=U.height/u.height);var D=v/2,V=m/2,B=Math.floor(y),W=Math.floor(g),K=B+1,J=W+1,Z=v/B,j=m/W,k=[],_=[],q,et,nt=0,tt=1,ot=0,ht=1;U&&(nt=U.u0,tt=U.u1,Y?(ot=U.v1,ht=U.v0):(ot=U.v0,ht=U.v1));var lt=tt-nt,it=ht-ot;for(et=0;et<J;et++){var rt=et*j-V;for(q=0;q<K;q++){var at=q*Z-D;_.push(at,-rt);var ct=nt+lt*(q/B),Tt=ot+it*(et/W);k.push(ct,Tt)}}Array.isArray(O)||(O=[O]),Array.isArray(G)||(G=[G]);var Mt=0,mt=0;for(et=0;et<W;et++)for(q=0;q<B;q++){var gt=(q+K*et)*2,Rt=(q+K*(et+1))*2,Bt=(q+1+K*(et+1))*2,Ct=(q+1+K*et)*2,wt=O[mt],Lt=G[Mt],Ut=new r(_[gt],_[gt+1],0,k[gt],k[gt+1],wt,Lt).transformMat4(h),ge=new r(_[Rt],_[Rt+1],0,k[Rt],k[Rt+1],wt,Lt).transformMat4(h),xe=new r(_[Ct],_[Ct+1],0,k[Ct],k[Ct+1],wt,Lt).transformMat4(h),ye=new r(_[Rt],_[Rt+1],0,k[Rt],k[Rt+1],wt,Lt).transformMat4(h),Te=new r(_[Bt],_[Bt+1],0,k[Bt],k[Bt+1],wt,Lt).transformMat4(h),Se=new r(_[Ct],_[Ct+1],0,k[Ct],k[Ct+1],wt,Lt).transformMat4(h);z&&(Ut.setUVs(nt,ht),ge.setUVs(nt,ot),xe.setUVs(tt,ht),ye.setUVs(nt,ot),Te.setUVs(tt,ot),Se.setUVs(tt,ht)),mt++,mt===O.length&&(mt=0),Mt++,Mt===G.length&&(Mt=0),I.verts.push(Ut,ge,xe,ye,Te,Se),I.faces.push(new o(Ut,ge,xe),new o(ye,Te,Se))}return u&&(u.faces=u.faces.concat(I.faces),u.vertices=u.vertices.concat(I.verts)),I};c.exports=i},34684:(c,x,t)=>{/**
2604 * @author       Richard Davey <[email protected]>
2605 * @copyright    2013-2025 Phaser Studio Inc.
2606 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2607 */var o=t(83997),p=t(37867),a=t(25836),n=t(39318),r=new a,e=new a,s=new p,h=function(i,l,u,d,f,v,m,y,g,T){u===void 0&&(u=1),d===void 0&&(d=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),y===void 0&&(y=0),g===void 0&&(g=0),T===void 0&&(T=!0);var S={faces:[],verts:[]},E=i.materials;r.set(d,f,v),e.set(m,y,g),s.fromRotationXYTranslation(e,r,T);for(var M=0;M<i.models.length;M++)for(var F=i.models[M],A=F.vertices,P=F.textureCoords,L=F.faces,O=0;O<L.length;O++){var G=L[O],z=G.vertices[0],Y=G.vertices[1],X=G.vertices[2],I=A[z.vertexIndex],U=A[Y.vertexIndex],D=A[X.vertexIndex],V=z.textureCoordsIndex,B=Y.textureCoordsIndex,W=X.textureCoordsIndex,K=V===-1?{u:0,v:1}:P[V],J=B===-1?{u:0,v:0}:P[B],Z=W===-1?{u:1,v:1}:P[W],j=16777215;G.material!==""&&E[G.material]&&(j=E[G.material]);var k=new n(I.x*u,I.y*u,I.z*u,K.u,K.v,j).transformMat4(s),_=new n(U.x*u,U.y*u,U.z*u,J.u,J.v,j).transformMat4(s),q=new n(D.x*u,D.y*u,D.z*u,Z.u,Z.v,j).transformMat4(s);S.verts.push(k,_,q),S.faces.push(new o(k,_,q))}return l&&(l.faces=l.faces.concat(S.faces),l.vertices=l.vertices.concat(S.verts)),S};c.exports=h},92515:(c,x,t)=>{/**
2608 * @author       Richard Davey <[email protected]>
2609 * @copyright    2013-2025 Phaser Studio Inc.
2610 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2611 */var o=t(83997),p=t(39318),a=function(n,r,e,s,h,i,l,u){if(s===void 0&&(s=!1),i===void 0&&(i=16777215),l===void 0&&(l=1),u===void 0&&(u=!1),n.length!==r.length&&!s){console.warn("GenerateVerts: vertices and uvs count not equal");return}var d={faces:[],vertices:[]},f,v,m,y,g,T,S,E,M,F,A,P=s?3:2,L=Array.isArray(i),O=Array.isArray(l);if(Array.isArray(e)&&e.length>0)for(f=0;f<e.length;f++){var G=e[f],z=e[f]*2,Y=e[f]*P;v=n[Y],m=n[Y+1],y=s?n[Y+2]:0,g=r[z],T=r[z+1],u&&(T=1-T),S=L?i[G]:i,E=O?l[G]:l,M=0,F=0,A=0,h&&(M=h[Y],F=h[Y+1],A=s?h[Y+2]:0),d.vertices.push(new p(v,m,y,g,T,S,E,M,F,A))}else{var X=0,I=0;for(f=0;f<n.length;f+=P)v=n[f],m=n[f+1],y=s?n[f+2]:0,g=r[X],T=r[X+1],S=L?i[I]:i,E=O?l[I]:l,M=0,F=0,A=0,h&&(M=h[f],F=h[f+1],A=s?h[f+2]:0),d.vertices.push(new p(v,m,y,g,T,S,E,M,F,A)),X+=2,I++}for(f=0;f<d.vertices.length;f+=3){var U=d.vertices[f],D=d.vertices[f+1],V=d.vertices[f+2];d.faces.push(new o(U,D,V))}return d};c.exports=a},85048:c=>{/**
2612 * @author       Richard Davey <[email protected]>
2613 * @copyright    2013-2025 Phaser Studio Inc.
2614 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2615 */var x=!0,t="untitled",o="",p="";function a(v){var m=v.indexOf("#");return m>-1?v.substring(0,m):v}function n(v){return v.models.length===0&&v.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),o="",v.models[v.models.length-1]}function r(v,m){var y=v.length>=2?v[1]:t;m.models.push({faces:[],name:y,textureCoords:[],vertexNormals:[],vertices:[]}),o=""}function e(v){v.length===2&&(o=v[1])}function s(v,m){var y=v.length,g=y>=2?parseFloat(v[1]):0,T=y>=3?parseFloat(v[2]):0,S=y>=4?parseFloat(v[3]):0;n(m).vertices.push({x:g,y:T,z:S})}function h(v,m){var y=v.length,g=y>=2?parseFloat(v[1]):0,T=y>=3?parseFloat(v[2]):0,S=y>=4?parseFloat(v[3]):0;isNaN(g)&&(g=0),isNaN(T)&&(T=0),isNaN(S)&&(S=0),x&&(T=1-T),n(m).textureCoords.push({u:g,v:T,w:S})}function i(v,m){var y=v.length,g=y>=2?parseFloat(v[1]):0,T=y>=3?parseFloat(v[2]):0,S=y>=4?parseFloat(v[3]):0;n(m).vertexNormals.push({x:g,y:T,z:S})}function l(v,m){var y=v.length-1;if(!(y<3)){for(var g={group:o,material:p,vertices:[]},T=0;T<y;T++){var S=v[T+1],E=S.split("/"),M=E.length;if(!(M<1||M>3)){var F=0,A=0,P=0;F=parseInt(E[0],10),M>1&&E[1]!==""&&(A=parseInt(E[1],10)),M>2&&(P=parseInt(E[2],10)),F!==0&&(F<0&&(F=n(m).vertices.length+1+F),A-=1,F-=1,P-=1,g.vertices.push({textureCoordsIndex:A,vertexIndex:F,vertexNormalIndex:P}))}}n(m).faces.push(g)}}function u(v,m){v.length>=2&&m.materialLibraries.push(v[1])}function d(v){v.length>=2&&(p=v[1])}var f=function(v,m){m===void 0&&(m=!0),x=m;var y={materials:{},materialLibraries:[],models:[]};o="",p="";for(var g=v.split(`
2616`),T=0;T<g.length;T++){var S=a(g[T]),E=S.replace(/\s\s+/g," ").trim().split(" ");switch(E[0].toLowerCase()){case"o":r(E,y);break;case"g":e(E);break;case"v":s(E,y);break;case"vt":h(E,y);break;case"vn":i(E,y);break;case"f":l(E,y);break;case"mtllib":u(E,y);break;case"usemtl":d(E);break}}return y};c.exports=f},61485:(c,x,t)=>{/**
2617 * @author       Richard Davey <[email protected]>
2618 * @copyright    2013-2025 Phaser Studio Inc.
2619 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2620 */var o=t(37589),p=function(a){for(var n={},r=a.split(`
2621`),e="",s=0;s<r.length;s++){var h=r[s].trim();if(!(h.indexOf("#")===0||h==="")){var i=h.replace(/\s\s+/g," ").trim().split(" ");switch(i[0].toLowerCase()){case"newmtl":{e=i[1];break}case"kd":{var l=Math.floor(i[1]*255),u=i.length>
2621=2?Math.floor(i[2]*255):l,d=i.length>=3?Math.floor(i[3]*255):l;n[e]=o(l,u,d);break}}}}return n};c.exports=p},92570:c=>{/**
2622 * @author       Richard Davey <[email protected]>
2623 * @copyright    2013-2025 Phaser Studio Inc.
2624 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2625 */var x=function(t,o,p,a){var n,r;if(p===void 0&&a===void 0){var e=t.getInCenter();n=e.x,r=e.y}var s=Math.cos(o),h=Math.sin(o),i=t.vertex1,l=t.vertex2,u=t.vertex3,d=i.x-n,f=i.y-r;i.set(d*s-f*h+n,d*h+f*s+r),d=l.x-n,f=l.y-r,l.set(d*s-f*h+n,d*h+f*s+r),d=u.x-n,f=u.y-r,u.set(d*s-f*h+n,d*h+f*s+r)};c.exports=x},39318:(c,x,t)=>{/**
2626 * @author       Richard Davey <[email protected]>
2627 * @copyright    2013-2025 Phaser Studio Inc.
2628 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2629 */var o=t(83419),p=t(70554),a=t(25836),n=new o({Extends:a,initialize:function(e,s,h,i,l,u,d,f,v,m){u===void 0&&(u=16777215),d===void 0&&(d=1),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),a.call(this,e,s,h),this.vx=0,this.vy=0,this.vz=0,this.nx=f,this.ny=v,this.nz=m,this.u=i,this.v=l,this.color=u,this.alpha=d,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=l},setUVs:function(r,e){return this.u=r,this.v=e,this.tu=r,this.tv=e,this},scrollUV:function(r,e){return this.tu+=r,this.tv+=e,this},scaleUV:function(r,e){return this.tu=this.u*r,this.tv=this.v*e,this},transformCoordinatesLocal:function(r,e,s,h){var i=this.x,l=this.y,u=this.z,d=r.val,f=i*d[0]+l*d[4]+u*d[8]+d[12],v=i*d[1]+l*d[5]+u*d[9]+d[13],m=i*d[2]+l*d[6]+u*d[10]+d[14],y=i*d[3]+l*d[7]+u*d[11]+d[15];this.vx=f/y*e,this.vy=-(v/y)*s,h<=0?this.vz=m/y:this.vz=-(m/y)},resize:function(r,e,s,h,i,l){return this.x=r,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)),l<.5?this.vy+=h*(.5-l):l>.5&&(this.vy-=h*(l-.5)),this},update:function(r,e,s,h,i,l,u,d){var f=this.vx*r+this.vy*s+i,v=this.vx*e+this.vy*h+l;return u&&(f=Math.round(f),v=Math.round(v)),this.tx=f,this.ty=v,this.ta=this.alpha*d,this},load:function(r,e,s,h,i){return r[++s]=this.tx,r[++s]=this.ty,r[++s]=this.tu,r[++s]=this.tv,r[++s]=h,r[++s]=i,e[++s]=p.getTintAppendFloatAlpha(this.color,this.ta),s}});c.exports=n},73090:(c,x,t)=>{/**
2630 * @author       Richard Davey <[email protected]>
2631 * @copyright    2013-2025 Phaser Studio Inc.
2632 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2633 */var o={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};c.exports=o},96550:c=>{/**
2634 * @author       Richard Davey <[email protected]>
2635 * @copyright    2013-2025 Phaser Studio Inc.
2636 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2637 */var x=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};c.exports=x},99706:(c,x,t)=>{/**
2638 * @author       Richard Davey <[email protected]>
2639 * @copyright    2013-2025 Phaser Studio Inc.
2640 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2641 */var o=t(2141),p=function(a){return new o(a.x,a.y)};c.exports=p},68010:c=>{/**
2642 * @author       Richard Davey <[email protected]>
2643 * @copyright    2013-2025 Phaser Studio Inc.
2644 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2645 */var x=function(t,o){return o.setTo(t.x,t.y)};c.exports=x},27814:c=>{/**
2646 * @author       Richard Davey <[email protected]>
2647 * @copyright    2013-2025 Phaser Studio Inc.
2648 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2649 */var x=function(t,o){return t.x===o.x&&t.y===o.y};c.exports=x},73565:c=>{/**
2650 * @author       Richard Davey <[email protected]>
2651 * @copyright    2013-2025 Phaser Studio Inc.
2652 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2653 */var x=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};c.exports=x},87555:(c,x,t)=>{/**
2654 * @author       Richard Davey <[email protected]>
2655 * @copyright    2013-2025 Phaser Studio Inc.
2656 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2657 */var o=t(2141),p=function(a,n){if(n===void 0&&(n=new o),!Array.isArray(a))throw new Error("GetCentroid points argument must be an array");var r=a.length;if(r<1)throw new Error("GetCentroid points array must not be empty");if(r===1)n.x=a[0].x,n.y=a[0].y;else{for(var e=0;e<r;e++)n.x+=a[e].x,n.y+=a[e].y;n.x/=r,n.y/=r}return n};c.exports=p},28793:c=>{/**
2658 * @author       Richard Davey <[email protected]>
2659 * @copyright    2013-2025 Phaser Studio Inc.
2660 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2661 */var x=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};c.exports=x},44405:c=>{/**
2662 * @author       Richard Davey <[email protected]>
2663 * @copyright    2013-2025 Phaser Studio Inc.
2664 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2665 */var x=function(t){return t.x*t.x+t.y*t.y};c.exports=x},20873:(c,x,t)=>{/**
2666 * @author       Richard Davey <[email protected]>
2667 * @copyright    2013-2025 Phaser Studio Inc.
2668 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2669 */var o=t(87841),p=function(a,n){n===void 0&&(n=new o);for(var r=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,i=0;i<a.length;i++){var l=a[i];l.x>r&&(r=l.x),l.x<e&&(e=l.x),l.y>s&&(s=l.y),l.y<h&&(h=l.y)}return n.x=e,n.y=h,n.width=r-e,n.height=s-h,n};c.exports=p},26152:(c,x,t)=>{/**
2670 * @author       Richard Davey <[email protected]>
2671 * @copyright    2013-2025 Phaser Studio Inc.
2672 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2673 */var o=t(2141),p=function(a,n,r,e){return r===void 0&&(r=0),e===void 0&&(e=new o),e.x=a.x+(n.x-a.x)*r,e.y=a.y+(n.y-a.y)*r,e};c.exports=p},55767:c=>{/**
2674 * @author       Richard Davey <[email protected]>
2675 * @copyright    2013-2025 Phaser Studio Inc.
2676 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2677 */var x=function(t){return t.setTo(t.y,t.x)};c.exports=x},79432:(c,x,t)=>{/**
2678 * @author       Richard Davey <[email protected]>
2679 * @copyright    2013-2025 Phaser Studio Inc.
2680 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2681 */var o=t(2141),p=function(a,n){return n===void 0&&(n=new o),n.setTo(-a.x,-a.y)};c.exports=p},2141:(c,x,t)=>{/**
2682 * @author       Richard Davey <[email protected]>
2683 * @copyright    2013-2025 Phaser Studio Inc.
2684 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2685 */var o=t(83419),p=t(23777),a=new o({initialize:function(r,e){r===void 0&&(r=0),e===void 0&&(e=r),this.type=p.POINT,this.x=r,this.y=e},setTo:function(n,r){return n===void 0&&(n=0),r===void 0&&(r=n),this.x=n,this.y=r,this}});c.exports=a},72930:(c,x,t)=>{/**
2686 * @author       Richard Davey <[email protected]>
2687 * @copyright    2013-2025 Phaser Studio Inc.
2688 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2689 */var o=t(2141),p=t(44405),a=function(n,r,e){e===void 0&&(e=new o);var s=n.x*r.x+n.y*r.y,h=s/p(r);return h!==0&&(e.x=h*r.x,e.y=h*r.y),e};c.exports=a},62880:(c,x,t)=>{/**
2690 * @author       Richard Davey <[email protected]>
2691 * @copyright    2013-2025 Phaser Studio Inc.
2692 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2693 */var o=t(2141),p=function(a,n,r){r===void 0&&(r=new o);var e=a.x*n.x+a.y*n.y;return e!==0&&(r.x=e*n.x,r.y=e*n.y),r};c.exports=p},15093:(c,x,t)=>{/**
2694 * @author       Richard Davey <[email protected]>
2695 * @copyright    2013-2025 Phaser Studio Inc.
2696 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2697 */var o=t(28793),p=function(a,n){if(a.x!==0||a.y!==0){var r=o(a);a.x/=r,a.y/=r}return a.x*=n,a.y*=n,a};c.exports=p},43711:(c,x,t)=>{/**
2698 * @author       Richard Davey <[email protected]>
2699 * @copyright    2013-2025 Phaser Studio Inc.
2700 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2701 */var o=t(2141);
2701o.Ceil=t(96550),o.Clone=t(99706),o.CopyFrom=t(68010),o.Equals=t(27814),o.Floor=t(73565),o.GetCentroid=t(87555),o.GetMagnitude=t(28793),o.GetMagnitudeSq=t(44405),o.GetRectangleFromPoints=t(20873),o.Interpolate=t(26152),o.Invert=t(55767),o.Negative=t(79432),o.Project=t(72930),o.ProjectUnit=t(62880),o.SetMagnitude=t(15093),c.exports=o},12306:(c,x,t)=>{/**
2702 * @author       Richard Davey <[email protected]>
2703 * @copyright    2013-2025 Phaser Studio Inc.
2704 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2705 */var o=t(25717),p=function(a){return new o(a.points)};c.exports=p},63814:c=>{/**
2706 * @author       Richard Davey <[email protected]>
2707 * @copyright    2013-2025 Phaser Studio Inc.
2708 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2709 */var x=function(t,o,p){for(var a=!1,n=-1,r=t.points.length-1;++n<t.points.length;r=n){var e=t.points[n].x,s=t.points[n].y,h=t.points[r].x,i=t.points[r].y;(s<=p&&p<i||i<=p&&p<s)&&o<(h-e)*(p-s)/(i-s)+e&&(a=!a)}return a};c.exports=x},99338:(c,x,t)=>{/**
2710 * @author       Richard Davey <[email protected]>
2711 * @copyright    2013-2025 Phaser Studio Inc.
2712 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2713 */var o=t(63814),p=function(a,n){return o(a,n.x,n.y)};c.exports=p},94811:c=>{/**
2714 * @author       Richard Davey <[email protected]>
2715 * @copyright    2013-2025 Phaser Studio Inc.
2716 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2717 */function x(I,U,D){D=D||2;var V=U&&U.length,B=V?U[0]*D:I.length,W=t(I,0,B,D,!0),K=[];if(!W||W.next===W.prev)return K;var J,Z,j,k,_,q,et;if(V&&(W=s(I,U,W,D)),I.length>80*D){J=j=I[0],Z=k=I[1];for(var nt=D;nt<B;nt+=D)_=I[nt],q=I[nt+1],_<J&&(J=_),q<Z&&(Z=q),_>j&&(j=_),q>k&&(k=q);et=Math.max(j-J,k-Z),et=et!==0?32767/et:0}return p(W,K,D,J,Z,et,0),K}function t(I,U,D,V,B){var W,K;if(B===X(I,U,D,V)>0)for(W=U;W<D;W+=V)K=G(W,I[W],I[W+1],K);else for(W=D-V;W>=U;W-=V)K=G(W,I[W],I[W+1],K);return K&&S(K,K.next)&&(z(K),K=K.next),K}function o(I,U){if(!I)return I;U||(U=I);var D=I,V;do if(V=!1,!D.steiner&&(S(D,D.next)||T(D.prev,D,D.next)===0)){if(z(D),D=U=D.prev,D===D.next)break;V=!0}else D=D.next;while(V||D!==U);return U}function p(I,U,D,V,B,W,K){if(I){!K&&W&&d(I,V,B,W);for(var J=I,Z,j;I.prev!==I.next;){if(Z=I.prev,j=I.next,W?n(I,V,B,W):a(I)){U.push(Z.i/D|0),U.push(I.i/D|0),U.push(j.i/D|0),z(I),I=j.next,J=j.next;continue}if(I=j,I===J){K?K===1?(I=r(o(I),U,D),p(I,U,D,V,B,W,2)):K===2&&e(I,U,D,V,B,W):p(o(I),U,D,V,B,W,1);break}}}}function a(I){var U=I.prev,D=I,V=I.next;if(T(U,D,V)>=0)return!1;for(var B=U.x,W=D.x,K=V.x,J=U.y,Z=D.y,j=V.y,k=B<W?B<K?B:K:W<K?W:K,_=J<Z?J<j?J:j:Z<j?Z:j,q=B>W?B>K?B:K:W>K?W:K,et=J>Z?J>j?J:j:Z>j?Z:j,nt=V.next;nt!==U;){if(nt.x>=k&&nt.x<=q&&nt.y>=_&&nt.y<=et&&y(B,J,W,Z,K,j,nt.x,nt.y)&&T(nt.prev,nt,nt.next)>=0)return!1;nt=nt.next}return!0}function n(I,U,D,V){var B=I.prev,W=I,K=I.next;if(T(B,W,K)>=0)return!1;for(var J=B.x,Z=W.x,j=K.x,k=B.y,_=W.y,q=K.y,et=J<Z?J<j?J:j:Z<j?Z:j,nt=k<_?k<q?k:q:_<q?_:q,tt=J>Z?J>j?J:j:Z>j?Z:j,ot=k>_?k>q?k:q:_>q?_:q,ht=v(et,nt,U,D,V),lt=v(tt,ot,U,D,V),it=I.prevZ,rt=I.nextZ;it&&it.z>=ht&&rt&&rt.z<=lt;){if(it.x>=et&&it.x<=tt&&it.y>=nt&&it.y<=ot&&it!==B&&it!==K&&y(J,k,Z,_,j,q,it.x,it.y)&&T(it.prev,it,it.next)>=0||(it=it.prevZ,rt.x>
vendor: 4,351 bytes, line 2717
2717=et&&rt.x<=tt&&rt.y>=nt&&rt.y<=ot&&rt!==B&&rt!==K&&y(J,k,Z,_,j,q,rt.x,rt.y)&&T(rt.prev,rt,rt.next)>=0))return!1;rt=rt.nextZ}for(;it&&it.z>=ht;){if(it.x>=et&&it.x<=tt&&it.y>=nt&&it.y<=ot&&it!==B&&it!==K&&y(J,k,Z,_,j,q,it.x,it.y)&&T(it.prev,it,it.next)>=0)return!1;it=it.prevZ}for(;rt&&rt.z<=lt;){if(rt.x>=et&&rt.x<=tt&&rt.y>=nt&&rt.y<=ot&&rt!==B&&rt!==K&&y(J,k,Z,_,j,q,rt.x,rt.y)&&T(rt.prev,rt,rt.next)>=0)return!1;rt=rt.nextZ}return!0}function r(I,U,D){var V=I;do{var B=V.prev,W=V.next.next;!S(B,W)&&E(B,V,V.next,W)&&P(B,W)&&P(W,B)&&(U.push(B.i/D|0),U.push(V.i/D|0),U.push(W.i/D|0),z(V),z(V.next),V=I=W),V=V.next}while(V!==I);return o(V)}function e(I,U,D,V,B,W){var K=I;do{for(var J=K.next.next;J!==K.prev;){if(K.i!==J.i&&g(K,J)){var Z=O(K,J);K=o(K,K.next),Z=o(Z,Z.next),p(K,U,D,V,B,W,0),p(Z,U,D,V,B,W,0);return}J=J.next}K=K.next}while(K!==I)}function s(I,U,D,V){var B=[],W,K,J,Z,j;for(W=0,K=U.length;W<K;W++)J=U[W]*V,Z=W<K-1?U[W+1]*V:I.length,j=t(I,J,Z,V,!1),j===j.next&&(j.steiner=!0),B.push(m(j));for(B.sort(h),W=0;W<B.length;W++)D=i(B[W],D);return D}function h(I,U){return I.x-U.x}function i(I,U){var D=l(I,U);if(!D)return U;var V=O(D,I);return o(V,V.next),o(D,D.next)}function l(I,U){var D=U,V=I.x,B=I.y,W=-1/0,K;do{if(B<=D.y&&B>=D.next.y&&D.next.y!==D.y){var J=D.x+(B-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(J<=V&&J>W&&(W=J,K=D.x<D.next.x?D:D.next,J===V))return K}D=D.next}while(D!==U);if(!K)return null;var Z=K,j=K.x,k=K.y,_=1/0,q;D=K;do V>=D.x&&D.x>=j&&V!==D.x&&y(B<k?V:W,B,j,k,B<k?W:V,B,D.x,D.y)&&(q=Math.abs(B-D.y)/(V-D.x),P(D,I)&&(q<_||q===_&&(D.x>K.x||D.x===K.x&&u(K,D)))&&(K=D,_=q)),D=D.next;while(D!==Z);return K}function u(I,U){return T(I.prev,I,U.prev)<0&&T(U.next,I,I.next)<0}function d(I,U,D,V){var B=I;do B.z===0&&(B.z=v(B.x,B.y,U,D,V)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==I);B.prevZ.nextZ=null,B.prevZ=null,f(B)}function f(I){var U,D,V,B,W,K,J,Z,j=1;do{for(D=I,I=null,W=null,K=0;D;){for(K++,V=D,J=0,U=0;U<j&&(J++,V=V.nextZ,!!V);U++);for(Z=j;J>0||Z>0&&V;)J!==0&&(Z===0||!V||D.z<=V.z)?(B=D,D=D.nextZ,J--):(B=V,V=V.nextZ,Z--),W?W.nextZ=B:I=B,B.prevZ=W,W=B;D=V}W.nextZ=null,j*=2}while(K>1);return I}function v(I,U,D,V,B){return I=(I-D)*B|0,U=(U-V)*B|0,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,U=(U|U<<8)&16711935,U=(U|U<<4)&252645135,U=(U|U<<2)&858993459,U=(U|U<<1)&1431655765,I|U<<1}function m(I){var U=I,D=I;do(U.x<D.x||U.x===D.x&&U.y<D.y)&&(D=U),U=U.next;while(U!==I);return D}function y(I,U,D,V,B,W,K,J){return(B-K)*(U-J)>=(I-K)*(W-J)&&(I-K)*(V-J)>=(D-K)*(U-J)&&(D-K)*(W-J)>=(B-K)*(V-J)}function g(I,U){return I.next.i!==U.i&&I.prev.i!==U.i&&!A(I,U)&&(P(I,U)&&P(U,I)&&L(I,U)&&(T(I.prev,I,U.prev)||T(I,U.prev,U))||S(I,U)&&T(I.prev,I,I.next)>0&&T(U.prev,U,U.next)>0)}function T(I,U,D){return(U.y-I.y)*(D.x-U.x)-(U.x-I.x)*(D.y-U.y)}function S(I,U){return I.x===U.x&&I.y===U.y}function E(I,U,D,V){var B=F(T(I,U,D)),W=F(T(I,U,V)),K=F(T(D,V,I)),J=F(T(D,V,U));return!!(B!==W&&K!==J||B===0&&M(I,D,U)||W===0&&M(I,V,U)||K===0&&M(D,I,V)||J===0&&M(D,U,V))}function M(I,U,D){return U.x<=Math.max(I.x,D.x)&&U.x>=Math.min(I.x,D.x)&&U.y<=Math.max(I.y,D.y)&&U.y>=Math.min(I.y,D.y)}function F(I){return I>0?1:I<0?-1:0}function A(I,U){var D=I;do{if(D.i!==I.i&&D.next.i!==I.i&&D.i!==U.i&&D.next.i!==U.i&&E(D,D.next,I,U))return!0;D=D.next}while(D!==I);return!1}function P(I,U){return T(I.prev,I,I.next)<0?T(I,U,I.next)>=0&&T(I,I.prev,U)>=0:T(I,U,I.prev)<0||T(I,I.next,U)<0}function L(I,U){var D=I,V=!1,B=(I.x+U.x)/2,W=(I.y+U.y)/2;do D.y>W!=D.next.y>W&&D.next.y!==D.y&&B<(D.next.x-D.x)*(W-D.y)/(D.next.y-D.y)+D.x&&(V=!V),D=D.next;while(D!==I);return V}function O(I,U){var D=new Y(I.i,I.x,I.y),V=new Y(U.i,U.x,U.y),B=I.next,W=U.prev;return I.next=U,U.prev=I,D.next=B,B.prev=D,V.next=D,D.prev=V,W.next=V,V.prev=W,V}function G(I,U,D,V){var B=new Y(I,U,D);return V?(B.next=V.next,B.prev=V,V.next.prev=B,V.next=B):(B.prev=B,B.next=B),B}function z(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function Y(I,U,D){this.i=I,this.x=U,this.y=D,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}x.deviation=function(I,U,D,V){var B=U&&U.length,W=B?U[0]*D:I.length,K=Math.abs(X(I,0,W,D));if(B)for(var J=0,Z=U.length;J<Z;J++){var j=U[J]*D,k=J<Z-1?U[J+1]*D:I.length;K-=Math.abs(X(I,j,k,D))}var _=0;for(J=0;J<V.length;
2717J+=3){var q=V[J]*D,et=V[J+1]*D,nt=V[J+2]*D;_+=Math.abs((I[q]-I[nt])*(I[et+1]-I[q+1])-(I[q]-I[et])*(I[nt+1]-I[q+1]))}return K===0&&_===0?0:Math.abs((_-K)/K)};function X(I,U,D,V){for(var B=0,W=U,K=D-V;W<D;W+=V)B+=(I[K]-I[W])*(I[W+1]+I[K+1]),K=W;return B}x.flatten=function(I){for(var U=I[0][0].length,D={vertices:[],holes:[],dimensions:U},V=0,B=0;B<I.length;B++){for(var W=0;W<I[B].length;W++)for(var K=0;K<U;K++)D.vertices.push(I[B][W][K]);B>0&&(V+=I[B-1].length,D.holes.push(V))}return D},c.exports=x},13829:(c,x,t)=>{/**
2718 * @author       Richard Davey <[email protected]>
2719 * @copyright    2013-2025 Phaser Studio Inc.
2720 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2721 */var o=t(87841),p=function(a,n){n===void 0&&(n=new o);for(var r=1/0,e=1/0,s=-r,h=-e,i,l=0;l<a.points.length;l++)i=a.points[l],r=Math.min(r,i.x),e=Math.min(e,i.y),s=Math.max(s,i.x),h=Math.max(h,i.y);return n.x=r,n.y=e,n.width=s-r,n.height=h-e,n};c.exports=p},26173:c=>{/**
2722 * @author       Richard Davey <[email protected]>
2723 * @copyright    2013-2025 Phaser Studio Inc.
2724 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2725 */var x=function(t,o){o===void 0&&(o=[]);for(var p=0;p<t.points.length;p++)o.push(t.points[p].x),o.push(t.points[p].y);return o};c.exports=x},9564:(c,x,t)=>{/**
2726 * @author       Richard Davey <[email protected]>
2727 * @copyright    2013-2025 Phaser Studio Inc.
2728 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2729 */var o=t(35001),p=t(23031),a=t(30052),n=function(r,e,s,h){h===void 0&&(h=[]);var i=r.points,l=a(r);!e&&s>0&&(e=l/s);for(var u=0;u<e;u++)for(var d=l*(u/e),f=0,v=0;v<i.length;v++){var m=i[v],y=i[(v+1)%i.length],g=new p(m.x,m.y,y.x,y.y),T=o(g);if(d<f||d>f+T){f+=T;continue}var S=g.getPoint((d-f)/T);h.push(S);break}return h};c.exports=n},30052:(c,x,t)=>{/**
2730 * @author       Richard Davey <[email protected]>
2731 * @copyright    2013-2025 Phaser Studio Inc.
2732 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2733 */var o=t(35001),p=t(23031),a=function(n){for(var r=n.points,e=0,s=0;s<r.length;s++){var h=r[s],i=r[(s+1)%r.length],l=new p(h.x,h.y,i.x,i.y);e+=o(l)}return e};c.exports=a},25717:(c,x,t)=>{/**
2734 * @author       Richard Davey <[email protected]>
2735 * @copyright    2013-2025 Phaser Studio Inc.
2736 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2737 */var o=t(83419),p=t(63814),a=t(9564),n=t(23777),r=new o({initialize:function(s){this.type=n.POLYGON,this.area=0,this.points=[],s&&this.setTo(s)},contains:function(e,s){return p(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<e.length;h++)s={x:0,y:0},typeof e[h]=="number"||typeof e[h]=="string"?(s.x=parseFloat(e[h]),s.y=parseFloat(e[h+1]),h++):Array.isArray(e[h])?(s.x=e[h][0],s.y=e[h][1]):(s.x=e[h].x,s.y=e[h].y),this.points.push(s);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var e=0,s,h,i=0;i<this.points.length-1;i++)s=this.points[i],h=this.points[i+1],e+=(h.x-s.x)*(s.y+h.y);return s=this.points[0],h=this.points[this.points.length-1],e+=(s.x-h.x)*(h.y+s.y),this.area=-e*.5,this.area},getPoints:function(e,s,h){return a(this,e,s,h)}});c.exports=r},8133:c=>{/**
2738 * @author       Richard Davey <[email protected]>
2739 * @copyright    2013-2025 Phaser Studio Inc.
2740 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2741 */var x=function(t){return t.points.reverse(),t};c.exports=x},29524:c=>{function x(r,e){var s=r.x-e.x,h=r.y-e.y;return s*s+h*h}function t(r,e,s){var h=e.x,i=e.y,l=s.x-h,u=s.y-i;if(l!==0||u!==0){var d=((r.x-h)*l+(r.y-i)*u)/(l*l+u*u);d>1?(h=s.x,i=s.y):d>0&&(h+=l*d,i+=u*d)}return l=r.x-h,u=r.y-i,l*l+u*u}function o(r,e){for(var s=r[0],h=[s],i,l=1,u=r.length;l<u;l++)i=r[l],x(i,s)>e&&(h.push(i),s=i);return s!==i&&h.push(i),h}function p(r,e,s,h,i){for(var l=h,u,d=e+1;d<s;d++){var f=t(r[d],r[e],r[s]);f>l&&(u=d,l=f)}l>h&&(u-e>1&&p(r,e,u,h,i),i.push(r[u]),s-u>1&&p(r,u,s,h,i))}function a(r,e){var s=r.length-1,h=[r[0]];return p(r,0,s,e,h),h.push(r[s]),h}var n=function(r,e,s){e===void 0&&(e=1),s===void 0&&(s=!1);var h=r.points;if(h.length>2){var i=e*e;s||(h=o(h,i)),r.setTo(a(h,i))}return r};c.exports=n},5469:c=>{/**
2742 * @author       Richard Davey <[email protected]>
2743 * @author       Igor Ognichenko <[email protected]>
2744 * @copyright    2013-2025 Phaser Studio Inc.
2745 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2746 */var x=function(o,p){return o[0]=p[0],o[1]=p[1],o},t=function(o){var p,a=[],n=o.points;for(p=0;p<n.length;p++)a.push([n[p].x,n[p].y]);var r=[];for(a.length>0&&r.push(x([0,0],a[0])),p=0;p<a.length-1;p++){var e=a[p],s=a[p+1],h=e[0],i=e[1],l=s[0],u=s[1];
2746r.push([.85*h+.15*l,.85*i+.15*u]),r.push([.15*h+.85*l,.15*i+.85*u])}return a.length>1&&r.push(x([0,0],a[a.length-1])),o.setTo(r)};c.exports=t},24709:c=>{/**
2747 * @author       Richard Davey <[email protected]>
2748 * @copyright    2013-2025 Phaser Studio Inc.
2749 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2750 */var x=function(t,o,p){for(var a=t.points,n=0;n<a.length;n++)a[n].x+=o,a[n].y+=p;return t};c.exports=x},58423:(c,x,t)=>{/**
2751 * @author       Richard Davey <[email protected]>
2752 * @copyright    2013-2025 Phaser Studio Inc.
2753 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2754 */var o=t(25717);o.Clone=t(12306),o.Contains=t(63814),o.ContainsPoint=t(99338),o.Earcut=t(94811),o.GetAABB=t(13829),o.GetNumberArray=t(26173),o.GetPoints=t(9564),o.Perimeter=t(30052),o.Reverse=t(8133),o.Simplify=t(29524),o.Smooth=t(5469),o.Translate=t(24709),c.exports=o},62224:c=>{/**
2755 * @author       Richard Davey <[email protected]>
2756 * @copyright    2013-2025 Phaser Studio Inc.
2757 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2758 */var x=function(t){return t.width*t.height};c.exports=x},98615:c=>{/**
2759 * @author       Richard Davey <[email protected]>
2760 * @copyright    2013-2025 Phaser Studio Inc.
2761 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2762 */var x=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};c.exports=x},31688:c=>{/**
2763 * @author       Richard Davey <[email protected]>
2764 * @copyright    2013-2025 Phaser Studio Inc.
2765 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2766 */var x=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};c.exports=x},67502:c=>{/**
2767 * @author       Richard Davey <[email protected]>
2768 * @copyright    2013-2025 Phaser Studio Inc.
2769 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2770 */var x=function(t,o,p){return t.x=o-t.width/2,t.y=p-t.height/2,t};c.exports=x},65085:(c,x,t)=>{/**
2771 * @author       Richard Davey <[email protected]>
2772 * @copyright    2013-2025 Phaser Studio Inc.
2773 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2774 */var o=t(87841),p=function(a){return new o(a.x,a.y,a.width,a.height)};c.exports=p},37303:c=>{/**
2775 * @author       Richard Davey <[email protected]>
2776 * @copyright    2013-2025 Phaser Studio Inc.
2777 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2778 */var x=function(t,o,p){return t.width<=0||t.height<=0?!1:t.x<=o&&t.x+t.width>=o&&t.y<=p&&t.y+t.height>=p};c.exports=x},96553:(c,x,t)=>{/**
2779 * @author       Richard Davey <[email protected]>
2780 * @copyright    2013-2025 Phaser Studio Inc.
2781 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2782 */var o=t(37303),p=function(a,n){return o(a,n.x,n.y)};c.exports=p},70273:c=>{/**
2783 * @author       Richard Davey <[email protected]>
2784 * @copyright    2013-2025 Phaser Studio Inc.
2785 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2786 */var x=function(t,o){return o.width*o.height>t.width*t.height?!1:o.x>t.x&&o.x<t.right&&o.right>t.x&&o.right<t.right&&o.y>t.y&&o.y<t.bottom&&o.bottom>t.y&&o.bottom<t.bottom};c.exports=x},43459:c=>{/**
2787 * @author       Richard Davey <[email protected]>
2788 * @copyright    2013-2025 Phaser Studio Inc.
2789 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2790 */var x=function(t,o){return o.setTo(t.x,t.y,t.width,t.height)};c.exports=x},77493:c=>{/**
2791 * @author       Richard Davey <[email protected]>
2792 * @copyright    2013-2025 Phaser Studio Inc.
2793 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2794 */var x=function(t,o){return o===void 0&&(o=[]),o.push({x:t.x,y:t.y}),o.push({x:t.right,y:t.y}),o.push({x:t.right,y:t.bottom}),o.push({x:t.x,y:t.bottom}),o};c.exports=x},9219:c=>{/**
2795 * @author       Richard Davey <[email protected]>
2796 * @copyright    2013-2025 Phaser Studio Inc.
2797 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2798 */var x=function(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height};c.exports=x},53751:(c,x,t)=>{/**
2799 * @author       Richard Davey <[email protected]>
2800 * @copyright    2013-2025 Phaser Studio Inc.
2801 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2802 */var o=t(8249),p=function(a,n){var r=o(a);return r<o(n)?a.setSize(n.height*r,n.height):a.setSize(n.width,n.width/r),a.setPosition(n.centerX-a.width/2,n.centerY-a.height/2)};c.exports=p},16088:(c,x,t)=>{/**
2803 * @author       Richard Davey <[email protected]>
2804 * @copyright    2013-2025 Phaser Studio Inc.
2805 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2806 */var o=t(8249),p=function(a,n){var r=o(a);return r>o(n)?a.setSize(n.height*r,n.height):a.setSize(n.width,n.width/r),a.setPosition(n.centerX-a.width/2,n.centerY-a.height/2)};c.exports=p},80774:c=>{/**
2807 * @author       Richard Davey <[email protected]>
2808 * @copyright    2013-2025 Phaser Studio Inc.
2809 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2810 */var x=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};c.exports=x},83859:c=>{/**
2811 * @author       Richard Davey <[email protected]>
2812 * @copyright    2013-2025 Phaser Studio Inc.
2813 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2814 */var x=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};c.exports=x},19217:(c,x,t)=>{/**
2815 * @author       Richard Davey <[email protected]>
2816 * @copyright    2013-2025 Phaser Studio Inc.
2817 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2818 */var o=t(87841),p=t(36383),a=function(n,r){if(r===void 0&&(r=new o),n.length===0)return r;for(var e=Number.MAX_VALUE,s=Number.MAX_VALUE,h=p.MIN_SAFE_INTEGER,i=p.MIN_SAFE_INTEGER,l,u,d,f=0;f<n.length;f++)l=n[f],Array.isArray(l)?(u=l[0],d=l[1]):(u=l.x,d=l.y),e=Math.min(e,u),s=Math.min(s,d),h=Math.max(h,u),i=Math.max(i,d);return r.x=e,r.y=s,r.width=h-e,r.height=i-s,r};c.exports=a},9477:(c,x,t)=>{/**
2819 * @author       samme
2820 * @copyright    2013-2025 Phaser Studio Inc.
2821 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2822 */var o=t(87841),p=function(a,n,r,e,s){return s===void 0&&(s=new o),s.setTo(Math.min(a,r),Math.min(n,e),Math.abs(a-r),Math.abs(n-e))};c.exports=p},8249:c=>{/**
2823 * @author       Richard Davey <[email protected]>
2824 * @copyright    2013-2025 Phaser Studio Inc.
2825 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2826 */var x=function(t){return t.height===0?NaN:t.width/t.height};c.exports=x},27165:(c,x,t)=>{/**
2827 * @author       Richard Davey <[email protected]>
2828 * @copyright    2013-2025 Phaser Studio Inc.
2829 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2830 */var o=t(2141),p=function(a,n){return n===void 0&&(n=new o),n.x=a.centerX,n.y=a.centerY,n};c.exports=p},20812:(c,x,t)=>{/**
2831 * @author       Richard Davey <[email protected]>
2832 * @copyright    2013-2025 Phaser Studio Inc.
2833 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2834 */var o=t(13019),p=t(2141),a=function(n,r,e){if(e===void 0&&(e=new p),r<=0||r>=1)return e.x=n.x,e.y=n.y,e;var s=o(n)*r;return r>.5?(s-=n.width+n.height,s<=n.width?(e.x=n.right-s,e.y=n.bottom):(e.x=n.x,e.y=n.bottom-(s-n.width))):s<=n.width?(e.x=n.x+s,e.y=n.y):(e.x=n.right,e.y=n.y+(s-n.width)),e};c.exports=a},34819:(c,x,t)=>{/**
2835 * @author       Richard Davey <[email protected]>
2836 * @copyright    2013-2025 Phaser Studio Inc.
2837 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2838 */var o=t(20812),p=t(13019),a=function(n,r,e,s){s===void 0&&(s=[]),!r&&e>0&&(r=p(n)/e);for(var h=0;h<r;h++){var i=h/r;s.push(o(n,i))}return s};c.exports=a},51313:(c,x,t)=>{/**
2839 * @author       Richard Davey <[email protected]>
2840 * @copyright    2013-2025 Phaser Studio Inc.
2841 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2842 */var o=t(2141),p=function(a,n){return n===void 0&&(n=new o),n.x=a.width,n.y=a.height,n};c.exports=p},86091:(c,x,t)=>{/**
2843 * @author       Richard Davey <[email protected]>
2844 * @copyright    2013-2025 Phaser Studio Inc.
2845 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2846 */var o=t(67502),p=function(a,n,r){var e=a.centerX,s=a.centerY;return a.setSize(a.width+n*2,a.height+r*2),o(a,e,s)};c.exports=p},53951:(c,x,t)=>{/**
2847 * @author       Richard Davey <[email protected]>
2848 * @copyright    2013-2025 Phaser Studio Inc.
2849 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2850 */var o=t(87841),p=t(59996),a=function(n,r,e){return e===void 0&&(e=new o),p(n,r)?(e.x=Math.max(n.x,r.x),e.y=Math.max(n.y,r.y),e.width=Math.min(n.right,r.right)-e.x,e.height=Math.min(n.bottom,r.bottom)-e.y):e.setEmpty(),e};c.exports=a},14649:(c,x,t)=>{/**
2851 * @author       Richard Davey <[email protected]>
2852 * @copyright    2013-2025 Phaser Studio Inc.
2853 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2854 */var o=t(13019),p=t(2141),a=function(n,r,e,s){if(s===void 0&&(s=[]),!r&&!e)return s;r?e=Math.round(o(n)/r):r=o(n)/e;for(var h=n.x,i=n.y,l=0,u=0;u<e;u++)switch(s.push(new p(h,i)),l){case 0:h+=r,h>=n.right&&(l=1,i+=h-n.right,h=n.right);break;case 1:i+=r,i>=n.bottom&&(l=2,h-=i-n.bottom,i=n.bottom);break;case 2:h-=r,h<=n.left&&(l=3,i-=n.left-h,h=n.left);break;case 3:i-=r,i<=n.top&&(l=0,i=n.top);break}return s};c.exports=a},33595:c=>{/**
2855 * @author       Richard Davey <[email protected]>
2856 * @copyright    2013-2025 Phaser Studio Inc.
2857 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2858 */var x=function(t,o){for(var p=t.x,a=t.right,n=t.y,r=t.bottom,e=0;e<o.length;e++)p=Math.min(p,o[e].x),a=Math.max(a,o[e].x),n=Math.min(n,o[e].y),r=Math.max(r,o[e].y);return t.x=p,t.y=n,t.width=a-p,t.height=r-n,t};c.exports=x},20074:c=>{/**
2859 * @author       Richard Davey <[email protected]>
2860 * @copyright    2013-2025 Phaser Studio Inc.
2861 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2862 */var x=function(t,o){var p=Math.min(t.x,o.x),a=Math.max(t.right,o.right);t.x=p,t.width=a-p;var n=Math.min(t.y,o.y),r=Math.max(t.bottom,o.bottom);return t.y=n,t.height=r-n,t};c.exports=x},92171:c=>{/**
2863 * @author       Richard Davey <[email protected]>
2864 * @copyright    2013-2025 Phaser Studio Inc.
2865 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2866 */var x=function(t,o,p){var a=Math.min(t.x,o),n=Math.max(t.right,o);t.x=a,t.width=n-a;var r=Math.min(t.y,p),e=Math.max(t.bottom,p);
2866return t.y=r,t.height=e-r,t};c.exports=x},42981:c=>{/**
2867 * @author       Richard Davey <[email protected]>
2868 * @copyright    2013-2025 Phaser Studio Inc.
2869 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2870 */var x=function(t,o,p){return t.x+=o,t.y+=p,t};c.exports=x},46907:c=>{/**
2871 * @author       Richard Davey <[email protected]>
2872 * @copyright    2013-2025 Phaser Studio Inc.
2873 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2874 */var x=function(t,o){return t.x+=o.x,t.y+=o.y,t};c.exports=x},60170:c=>{/**
2875 * @author       Richard Davey <[email protected]>
2876 * @copyright    2013-2025 Phaser Studio Inc.
2877 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2878 */var x=function(t,o){return t.x<o.right&&t.right>o.x&&t.y<o.bottom&&t.bottom>o.y};c.exports=x},13019:c=>{/**
2879 * @author       Richard Davey <[email protected]>
2880 * @copyright    2013-2025 Phaser Studio Inc.
2881 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2882 */var x=function(t){return 2*(t.width+t.height)};c.exports=x},85133:(c,x,t)=>{/**
2883 * @author       Richard Davey <[email protected]>
2884 * @copyright    2013-2025 Phaser Studio Inc.
2885 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2886 */var o=t(2141),p=t(39506),a=function(n,r,e){e===void 0&&(e=new o),r=p(r);var s=Math.sin(r),h=Math.cos(r),i=h>0?n.width/2:n.width/-2,l=s>0?n.height/2:n.height/-2;return Math.abs(i*s)<Math.abs(l*h)?l=i*s/h:i=l*h/s,e.x=i+n.centerX,e.y=l+n.centerY,e};c.exports=a},26597:(c,x,t)=>{/**
2887 * @author       Richard Davey <[email protected]>
2888 * @copyright    2013-2025 Phaser Studio Inc.
2889 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2890 */var o=t(2141),p=function(a,n){return n===void 0&&(n=new o),n.x=a.x+Math.random()*a.width,n.y=a.y+Math.random()*a.height,n};c.exports=p},86470:(c,x,t)=>{/**
2891 * @author       Richard Davey <[email protected]>
2892 * @copyright    2013-2025 Phaser Studio Inc.
2893 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2894 */var o=t(30976),p=t(70273),a=t(2141),n=function(r,e,s){if(s===void 0&&(s=new a),p(r,e))switch(o(0,3)){case 0:s.x=r.x+Math.random()*(e.right-r.x),s.y=r.y+Math.random()*(e.top-r.y);break;case 1:s.x=e.x+Math.random()*(r.right-e.x),s.y=e.bottom+Math.random()*(r.bottom-e.bottom);break;case 2:s.x=r.x+Math.random()*(e.x-r.x),s.y=e.y+Math.random()*(r.bottom-e.y);break;case 3:s.x=e.right+Math.random()*(r.right-e.right),s.y=r.y+Math.random()*(e.bottom-r.y);break}return s};c.exports=n},87841:(c,x,t)=>{/**
2895 * @author       Richard Davey <[email protected]>
2896 * @copyright    2013-2025 Phaser Studio Inc.
2897 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2898 */var o=t(83419),p=t(37303),a=t(20812),n=t(34819),r=t(23777),e=t(23031),s=t(26597),h=new o({initialize:function(l,u,d,f){l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=0),this.type=r.RECTANGLE,this.x=l,this.y=u,this.width=d,this.height=f},contains:function(i,l){return p(this,i,l)},getPoint:function(i,l){return a(this,i,l)},getPoints:function(i,l,u){return n(this,i,l,u)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,l,u,d){return this.x=i,this.y=l,this.width=u,this.height=d,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,l){return l===void 0&&(l=i),this.x=i,this.y=l,this},setSize:function(i,l){return l===void 0&&(l=i),this.width=i,this.height=l,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}}});c.exports=h},94845:c=>{/**
2899 * @author       Richard Davey <[email protected]>
2900 * @copyright    2013-2025 Phaser Studio Inc.
2901 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2902 */var x=function(t,o){return t.width===o.width&&t.height===o.height};c.exports=x},31730:c=>{/**
2903 * @author       Richard Davey <[email protected]>
2904 * @copyright    2013-2025 Phaser Studio Inc.
2905 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2906 */var x=function(t,o,p){return p===void 0&&(p=o),t.width*=o,t.height*=p,t};c.exports=x},36899:(c,x,t)=>{/**
2907 * @author       Richard Davey <[email protected]>
2908 * @copyright    2013-2025 Phaser Studio Inc.
2909 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2910 */var o=t(87841),p=function(a,n,r){r===void 0&&(r=new o);var e=Math.min(a.x,n.x),s=Math.min(a.y,n.y),h=Math.max(a.right,n.right)-e,i=Math.max(a.bottom,n.bottom)-s;return r.setTo(e,s,h,i)};c.exports=p},93232:(c,x,t)=>{/**
2911 * @author       Richard Davey <[email protected]>
2912 * @copyright    2013-2025 Phaser Studio Inc.
2913 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2914 */var o=t(87841);o.Area=t(62224),o.Ceil=t(98615),o.CeilAll=t(31688),o.CenterOn=t(67502),o.Clone=t(65085),o.Contains=t(37303),o.ContainsPoint=t(96553),o.ContainsRect=t(70273),o.CopyFrom=t(43459),o.Decompose=t(77493),o.Equals=t(9219),o.FitInside=t(53751),o.FitOutside=t(16088),o.Floor=t(80774),o.FloorAll=t(83859),o.FromPoints=t(19217),o.FromXY=t(9477),o.GetAspectRatio=t(8249),o.GetCenter=t(27165),o.GetPoint=t(20812),o.GetPoints=t(34819),o.GetSize=t(51313),o.Inflate=t(86091),o.Intersection=t(53951),o.MarchingAnts=t(14649),o.MergePoints=t(33595),o.MergeRect=t(20074),o.MergeXY=t(92171),o.Offset=t(42981),o.OffsetPoint=t(46907),o.Overlaps=t(60170),o.Perimeter=t(13019),o.PerimeterPoint=t(85133),o.Random=t(26597),o.RandomOutside=t(86470),o.SameDimensions=t(94845),o.Scale=t(31730),o.Union=t(36899),c.exports=o},41658:c=>{/**
2915 * @author       Richard Davey <[email protected]>
2916 * @copyright    2013-2025 Phaser Studio Inc.
2917 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2918 */var x=function(t){var o=t.x1,p=t.y1,a=t.x2,n=t.y2,r=t.x3,e=t.y3;return Math.abs(((r-o)*(n-p)-(a-o)*(e-p))/2)};c.exports=x},39208:(c,x,t)=>{/**
2919 * @author       Richard Davey <[email protected]>
2920 * @copyright    2013-2025 Phaser Studio Inc.
2921 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2922 */var o=t(16483),p=function(a,n,r){var e=r*(Math.sqrt(3)/2),s=a,h=n,i=a+r/2,l=n+e,u=a-r/2,d=n+e;return new o(s,h,i,l,u,d)};c.exports=p},39545:(c,x,t)=>{/**
2923 * @author       Richard Davey <[email protected]>
2924 * @copyright    2013-2025 Phaser Studio Inc.
2925 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2926 */var o=t(94811),p=t(16483),a=function(n,r,e,s,h){r===void 0&&(r=null),e===void 0&&(e=1),s===void 0&&(s=1),h===void 0&&(h=[]);for(var i=o(n,r),l,u,d,f,v,m,y,g,T,S=0;S<i.length;S+=3)l=i[S],u=i[S+1],d=i[S+2],f=n[l*2]*e,v=n[l*2+1]*s,m=n[u*2]*e,y=n[u*2
2926+1]*s,g=n[d*2]*e,T=n[d*2+1]*s,h.push(new p(f,v,m,y,g,T));return h};c.exports=a},90301:(c,x,t)=>{/**
2927 * @author       Richard Davey <[email protected]>
2928 * @copyright    2013-2025 Phaser Studio Inc.
2929 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2930 */var o=t(16483),p=function(a,n,r,e){e===void 0&&(e=r);var s=a,h=n,i=a,l=n-e,u=a+r,d=n;return new o(s,h,i,l,u,d)};c.exports=p},23707:(c,x,t)=>{/**
2931 * @author       Richard Davey <[email protected]>
2932 * @copyright    2013-2025 Phaser Studio Inc.
2933 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2934 */var o=t(97523),p=t(13584),a=function(n,r,e,s){s===void 0&&(s=o);var h=s(n),i=r-h.x,l=e-h.y;return p(n,i,l)};c.exports=a},97523:(c,x,t)=>{/**
2935 * @author       Richard Davey <[email protected]>
2936 * @copyright    2013-2025 Phaser Studio Inc.
2937 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2938 */var o=t(2141),p=function(a,n){return n===void 0&&(n=new o),n.x=(a.x1+a.x2+a.x3)/3,n.y=(a.y1+a.y2+a.y3)/3,n};c.exports=p},24951:(c,x,t)=>{/**
2939 * @author       Richard Davey <[email protected]>
2940 * @copyright    2013-2025 Phaser Studio Inc.
2941 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2942 */var o=t(26099);function p(n,r,e,s){return n*s-r*e}var a=function(n,r){r===void 0&&(r=new o);var e=n.x3,s=n.y3,h=n.x1-e,i=n.y1-s,l=n.x2-e,u=n.y2-s,d=2*p(h,i,l,u),f=p(i,h*h+i*i,u,l*l+u*u),v=p(h,h*h+i*i,l,l*l+u*u);return r.x=e-f/d,r.y=s+v/d,r};c.exports=a},85614:(c,x,t)=>{/**
2943 * @author       Richard Davey <[email protected]>
2944 * @copyright    2013-2025 Phaser Studio Inc.
2945 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2946 */var o=t(96503),p=function(a,n){n===void 0&&(n=new o);var r=a.x1,e=a.y1,s=a.x2,h=a.y2,i=a.x3,l=a.y3,u=s-r,d=h-e,f=i-r,v=l-e,m=u*(r+s)+d*(e+h),y=f*(r+i)+v*(e+l),g=2*(u*(l-h)-d*(i-s)),T,S;if(Math.abs(g)<1e-6){var E=Math.min(r,s,i),M=Math.min(e,h,l);T=(Math.max(r,s,i)-E)*.5,S=(Math.max(e,h,l)-M)*.5,n.x=E+T,n.y=M+S,n.radius=Math.sqrt(T*T+S*S)}else n.x=(v*m-d*y)/g,n.y=(u*y-f*m)/g,T=n.x-r,S=n.y-e,n.radius=Math.sqrt(T*T+S*S);return n};c.exports=p},74422:(c,x,t)=>{/**
2947 * @author       Richard Davey <[email protected]>
2948 * @copyright    2013-2025 Phaser Studio Inc.
2949 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2950 */var o=t(16483),p=function(a){return new o(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)};c.exports=p},10690:c=>{/**
2951 * @author       Richard Davey <[email protected]>
2952 * @copyright    2013-2025 Phaser Studio Inc.
2953 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2954 */var x=function(t,o,p){var a=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,e=t.y2-t.y1,s=o-t.x1,h=p-t.y1,i=a*a+n*n,l=a*r+n*e,u=a*s+n*h,d=r*r+e*e,f=r*s+e*h,v=i*d-l*l,m=v===0?0:1/v,y=(d*u-l*f)*m,g=(i*f-l*u)*m;return y>=0&&g>=0&&y+g<1};c.exports=x},48653:c=>{/**
2955 * @author       Richard Davey <[email protected]>
2956 * @copyright    2013-2025 Phaser Studio Inc.
2957 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2958 */var x=function(t,o,p,a){p===void 0&&(p=!1),a===void 0&&(a=[]);for(var n=t.x3-t.x1,r=t.y3-t.y1,e=t.x2-t.x1,s=t.y2-t.y1,h=n*n+r*r,i=n*e+r*s,l=e*e+s*s,u=h*l-i*i,d=u===0?0:1/u,f,v,m,y,g,T,S=t.x1,E=t.y1,M=0;M<o.length&&(m=o[M].x-S,y=o[M].y-E,g=n*m+r*y,T=e*m+s*y,f=(l*g-i*T)*d,v=(h*T-i*g)*d,!(f>=0&&v>=0&&f+v<1&&(a.push({x:o[M].x,y:o[M].y}),p)));M++);return a};c.exports=x},96006:(c,x,t)=>{/**
2959 * @author       Richard Davey <[email protected]>
2960 * @copyright    2013-2025 Phaser Studio Inc.
2961 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2962 */var o=t(10690),p=function(a,n){return o(a,n.x,n.y)};c.exports=p},71326:c=>{/**
2963 * @author       Richard Davey <[email protected]>
2964 * @copyright    2013-2025 Phaser Studio Inc.
2965 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2966 */var x=function(t,o){return o.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};c.exports=x},71694:c=>{/**
2967 * @author       Richard Davey <[email protected]>
2968 * @copyright    2013-2025 Phaser Studio Inc.
2969 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2970 */var x=function(t,o){return o===void 0&&(o=[]),o.push({x:t.x1,y:t.y1}),o.push({x:t.x2,y:t.y2}),o.push({x:t.x3,y:t.y3}),o};c.exports=x},33522:c=>{/**
2971 * @author       Richard Davey <[email protected]>
2972 * @copyright    2013-2025 Phaser Studio Inc.
2973 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2974 */var x=function(t,o){return t.x1===o.x1&&t.y1===o.y1&&t.x2===o.x2&&t.y2===o.y2&&t.x3===o.x3&&t.y3===o.y3};c.exports=x},20437:(c,x,t)=>{/**
2975 * @author       Richard Davey <[email protected]>
2976 * @copyright    2013-2025 Phaser Studio Inc.
2977 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2978 */var o=t(2141),p=t(35001),a=function(n,r,e){e===void 0&&(e=new o);var s=n.getLineA(),h=n.getLineB(),i=n.getLineC();if(r<=0||r>=1)return e.x=s.x1,e.y=s.y1,e;var l=p(s),u=p(h),d=p(i),f=l+u+d,v=f*r,m=0;return v<l?(m=v/l,e.x=s.x1+(s.x2-s.x1)*m,e.y=s.y1+(s.y2-s.y1)*m):v>l+u?(v-=l+u,m=v/d,e.x=i.x1+(i.x2-i.x1)*m,e.y=i.y1+(i.y2-i.y1)*m):(v-=l,m=v/u,e.x=h.x1+(h.x2-h.x1)*m,e.y=h.y1+(h.y2-h.y1)*m),e};c.exports=a},80672:(c,x,t)=>{/**
2979 * @author       Richard Davey <[email protected]>
2980 * @copyright    2013-2025 Phaser Studio Inc.
2981 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2982 */var o=t(35001),p=t(2141),a=function(n,r,e,s){s===void 0&&(s=[]);var h=n.getLineA(),i=n.getLineB(),l=n.getLineC(),u=o(h),d=o(i),f=o(l),v=u+d+f;!r&&e>0&&(r=v/e);for(var m=0;m<r;m++){var y=v*(m/r),g=0,T=new p;y<u?(g=y/u,T.x=h.x1+(h.x2-h.x1)*g,T.y=h.y1+(h.y2-h.y1)*g):y>u+d?(y-=u+d,g=y/f,T.x=l.x1+(l.x2-l.x1)*g,T.y=l.y1+(l.y2-l.y1)*g):(y-=u,g=y/d,T.x=i.x1+(i.x2-i.x1)*g,T.y=i.y1+(i.y2-i.y1)*g),s.push(T)}return s};c.exports=a},39757:(c,x,t)=>{/**
2983 * @author       Richard Davey <[email protected]>
2984 * @copyright    2013-2025 Phaser Studio Inc.
2985 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2986 */var o=t(2141);function p(n,r,e,s){var h=n-e,i=r-s,l=h*h+i*i;return Math.sqrt(l)}var a=function(n,r){r===void 0&&(r=new o);var e=n.x1,s=n.y1,h=n.x2,i=n.y2,l=n.x3,u=n.y3,d=p(l,u,h,i),f=p(e,s,l,u),v=p(h,i,e,s),m=d+f+v;return r.x=(e*d+h*f+l*v)/m,r.y=(s*d+i*f+u*v)/m,r};c.exports=a},13584:c=>{/**
2987 * @author       Richard Davey <[email protected]>
2988 * @copyright    2013-2025 Phaser Studio Inc.
2989 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2990 */var x=function(t,o,p){return t.x1+=o,t.y1+=p,t.x2+=o,t.y2+=p,t.x3+=o,t.y3+=p,t};c.exports=x},1376:(c,x,t)=>{/**
2991 * @author       Richard Davey <[email protected]>
2992 * @copyright    2013-2025 Phaser Studio Inc.
2993 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2994 */var o=t(35001),p=function(a){var n=a.getLineA(),r=a.getLineB(),e=a.getLineC();return o(n)+o(r)+o(e)};c.exports=p},90260:(c,x,t)=>{/**
2995 * @author       Richard Davey <[email protected]>
2996 * @copyright    2013-2025 Phaser Studio Inc.
2997 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
2998 */var o=t(2141),p=function(a,n){n===void 0&&(n=new o);var r=a.x2-a.x1,e=a.y2-a.y1,s=a.x3-a.x1,h=a.y3-a.y1,i=Math.random(),l=Math.random();return i+l>=1&&(i=1-i,l=1-l),n.x=a.x1+(r*i+s*l),n.y=a.y1+(e*i+h*l),n};c.exports=p},52172:(c,x,t)=>{/**
2999 * @author       Richard Davey <[email protected]>
3000 * @copyright    2013-2025 Phaser Studio Inc.
3001 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3002 */var o=t(99614),p=t(39757),a=function(n,r){var e=p(n);return o(n,e.x,e.y,r)};c.exports=a},49907:(c,x,t)=>{/**
3003 * @author       Richard Davey <[email protected]>
3004 * @copyright    2013-2025 Phaser Studio Inc.
3005 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3006 */var o=t(99614),p=function(a,n,r){return o(a,n.x,n.y,r)};c.exports=p},99614:c=>{/**
3007 * @author       Richard Davey <[email protected]>
3008 * @copyright    2013-2025 Phaser Studio Inc.
3009 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3010 */var x=function(t,o,p,a){var n=Math.cos(a),r=Math.sin(a),e=t.x1-o,s=t.y1-p;return t.x1=e*n-s*r+o,t.y1=e*r+s*n+p,e=t.x2-o,s=t.y2-p,t.x2=e*n-s*r+o,t.y2=e*r+s*n+p,e=t.x3-o,s=t.y3-p,t.x3=e*n-s*r+o,t.y3=e*r+s*n+p,t};c.exports=x},16483:(c,x,t)=>{/**
3011 * @author       Richard Davey <[email protected]>
3012 * @copyright    2013-2025 Phaser Studio Inc.
3013 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3014 */var o=t(83419),p=t(10690),a=t(20437),n=t(80672),r=t(23777),e=t(23031),s=t(90260),h=new o({initialize:function(l,u,d,f,v,m){l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=r.TRIANGLE,this.x1=l,this.y1=u,this.x2=d,this.y2=f,this.x3=v,this.y3=m},contains:function(i,l){return p(this,i,l)},getPoint:function(i,l){return a(this,i,l)},getPoints:function(i,l,u){return n(this,i,l,u)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,l,u,d,f,v){return i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=0),v===void 0&&(v=0),this.x1=i,this.y1=l,this.x2=u,this.y2=d,this.x3=f,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 l=0;this.x1<=this.x2&&this.x1<=this.x3?l=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?l=this.x2-i:l=this.x3-i,this.x1-=l,this.x2-=l,this.x3-=l}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var l=0;this.x1>=this.x2&&this.x1>=this.x3?l=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?l=this.x2-i:l=this.x3-i,this.x1-=l,this.x2-=l,this.x3-=l}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)}
3014,set:function(i){var l=0;this.y1<=this.y2&&this.y1<=this.y3?l=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?l=this.y2-i:l=this.y3-i,this.y1-=l,this.y2-=l,this.y3-=l}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var l=0;this.y1>=this.y2&&this.y1>=this.y3?l=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?l=this.y2-i:l=this.y3-i,this.y1-=l,this.y2-=l,this.y3-=l}}});c.exports=h},84435:(c,x,t)=>{/**
3015 * @author       Richard Davey <[email protected]>
3016 * @copyright    2013-2025 Phaser Studio Inc.
3017 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3018 */var o=t(16483);o.Area=t(41658),o.BuildEquilateral=t(39208),o.BuildFromPolygon=t(39545),o.BuildRight=t(90301),o.CenterOn=t(23707),o.Centroid=t(97523),o.CircumCenter=t(24951),o.CircumCircle=t(85614),o.Clone=t(74422),o.Contains=t(10690),o.ContainsArray=t(48653),o.ContainsPoint=t(96006),o.CopyFrom=t(71326),o.Decompose=t(71694),o.Equals=t(33522),o.GetPoint=t(20437),o.GetPoints=t(80672),o.InCenter=t(39757),o.Perimeter=t(1376),o.Offset=t(13584),o.Random=t(90260),o.Rotate=t(52172),o.RotateAroundPoint=t(49907),o.RotateAroundXY=t(99614),c.exports=o},74457:c=>{/**
3019 * @author       Richard Davey <[email protected]>
3020 * @copyright    2013-2025 Phaser Studio Inc.
3021 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3022 */var x=function(t,o,p){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:o,hitAreaCallback:p,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};c.exports=x},84409:c=>{/**
3023 * @author       Richard Davey <[email protected]>
3024 * @copyright    2013-2025 Phaser Studio Inc.
3025 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3026 */var x=function(t,o){return function(p,a,n,r){var e=t.getPixelAlpha(a,n,r.texture.key,r.frame.name);return e&&e>=o}};c.exports=x},7003:(c,x,t)=>{/**
3027 * @author       Richard Davey <[email protected]>
3028 * @copyright    2013-2025 Phaser Studio Inc.
3029 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3030 */var o=t(83419),p=t(93301),a=t(50792),n=t(8214),r=t(8443),e=t(78970),s=t(85098),h=t(42515),i=t(36210),l=t(61340),u=t(85955),d=new o({initialize:function(v,m){this.game=v,this.scaleManager,this.canvas,this.config=m,this.enabled=!0,this.events=new a,this.isOver=!0,this.defaultCursor="",this.keyboard=m.inputKeyboard?new e(this):null,this.mouse=m.inputMouse?new s(this):null,this.touch=m.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=m.inputActivePointers;for(var y=0;y<=this.pointersTotal;y++){var g=new h(this,y);g.smoothFactor=m.inputSmoothFactor,this.pointers.push(g)}this.mousePointer=m.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 l,this._tempMatrix2=new l,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],v.events.once(r.BOOT,this.boot,this)},boot:function(){var f=this.game,v=f.events;this.canvas=f.canvas,this.scaleManager=f.scale,this.events.emit(n.MANAGER_BOOT),v.on(r.PRE_RENDER,this.preRender,this),v.once(r.DESTROY,this.destroy,this)},setCanvasOver:function(f){this.isOver=!0,this.events.emit(n.GAME_OVER,f)},setCanvasOut:function(f){this.isOver=!1,this.events.emit(n.GAME_OUT,f)},preRender:function(){var f=this.game.loop.now,v=this.game.loop.delta,m=this.game.scene.getScenes(!0,!0);this.time=f,this.events.emit(n.MANAGER_UPDATE);for(var y=0;y<m.length;y++){var g=m[y];if(g.sys.input&&g.sys.input.updatePoll(f,v)&&this.globalTopOnly)return}},setDefaultCursor:function(f){this.defaultCursor=f,this.canvas.style.cursor!==f&&(this.canvas.style.cursor=f)},setCursor:function(f){f.cursor&&(this.canvas.style.cursor=f.cursor)},resetCursor:function(f,v){(v||f&&f.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(f){f===void 0&&(f=1);var v=[];this.pointersTotal+f>10&&(f=10-this.pointersTotal);for(var m=0;m<f;m++){var y=this.pointers.length,g=new h(this,y);g.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(g),this.pointersTotal++,v.push(g)}return v},updateInputPlugins:function(f,v){var m=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var y=0;y<m.length;y++){var g=m[y];if(g.sys.input){var T=g.sys.input.update(f,v);if(T&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(f){for(var v=this.pointers,m=[],y=0;y<f.changedTouches.length;y++)for(var g=f.changedTouches[y],T=1;T<v.length;T++){var S=v[T];if(!S.active){S.touchstart(g,f),this.activePointer=S,m.push(S);break}}this.updateInputPlugins(p.TOUCH_START,m)},onTouchMove:function(f){for(var v=this.pointers,m=[],y=0;y<f.changedTouches.length;y++)for(var g=f.changedTouches[y],T=1;T<v.length;T++){var S=v[T];
vendor: 1,705 bytes, line 3030
3030if(S.active&&S.identifier===g.identifier){var E=document.elementFromPoint(g.clientX,g.clientY),M=E===this.canvas;!this.isOver&&M?this.setCanvasOver(f):this.isOver&&!M&&this.setCanvasOut(f),this.isOver&&(S.touchmove(g,f),this.activePointer=S,m.push(S));break}}this.updateInputPlugins(p.TOUCH_MOVE,m)},onTouchEnd:function(f){for(var v=this.pointers,m=[],y=0;y<f.changedTouches.length;y++)for(var g=f.changedTouches[y],T=1;T<v.length;T++){var S=v[T];if(S.active&&S.identifier===g.identifier){S.touchend(g,f),m.push(S);break}}this.updateInputPlugins(p.TOUCH_END,m)},onTouchCancel:function(f){for(var v=this.pointers,m=[],y=0;y<f.changedTouches.length;y++)for(var g=f.changedTouches[y],T=1;T<v.length;T++){var S=v[T];if(S.active&&S.identifier===g.identifier){S.touchcancel(g,f),m.push(S);break}}this.updateInputPlugins(p.TOUCH_CANCEL,m)},onMouseDown:function(f){var v=this.mousePointer;v.down(f),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(p.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(f){var v=this.mousePointer;v.move(f),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(p.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(f){var v=this.mousePointer;v.up(f),v.updateMotion(),this.activePointer=v,this.updateInputPlugins(p.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(f){var v=this.mousePointer;v.wheel(f),this.activePointer=v,this.updateInputPlugins(p.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(f){var v=this.mouse.locked;this.mousePointer.locked=v,this.events.emit(n.POINTERLOCK_CHANGE,f,v)},inputCandidate:function(f,v){var m=f.input;if(!m||!m.enabled||!f.willRender(v))return!1;var y=!0,g=f.parentContainer;
3030if(g)do{if(!g.willRender(v)){y=!1;break}g=g.parentContainer}while(g);return y},hitTest:function(f,v,m,y){y===void 0&&(y=this._tempHitTest);var g=this._tempPoint,T=m.scrollX,S=m.scrollY;y.length=0;var E=f.x,M=f.y;m.getWorldPoint(E,M,g),f.worldX=g.x,f.worldY=g.y;for(var F={x:0,y:0},A=this._tempMatrix,P=this._tempMatrix2,L=0;L<v.length;L++){var O=v[L];if(this.inputCandidate(O,m)){var G=g.x+T*O.scrollFactorX-T,z=g.y+S*O.scrollFactorY-S;O.parentContainer?(O.getWorldTransformMatrix(A,P),A.applyInverse(G,z,F)):u(G,z,O.x,O.y,O.rotation,O.scaleX,O.scaleY,F),this.pointWithinHitArea(O,F.x,F.y)&&y.push(O)}}return y},pointWithinHitArea:function(f,v,m){v+=f.displayOriginX,m+=f.displayOriginY;var y=f.input;return y&&y.hitAreaCallback(y.hitArea,v,m,f)?(y.localX=v,y.localY=m,!0):!1},pointWithinInteractiveObject:function(f,v,m){return f.hitArea?(v+=f.gameObject.displayOriginX,m+=f.gameObject.displayOriginY,f.localX=v,f.localY=m,f.hitAreaCallback(f.hitArea,v,m,f)):!1},transformPointer:function(f,v,m,y){var g=f.position,T=f.prevPosition;T.x=g.x,T.y=g.y;var S=this.scaleManager.transformX(v),E=this.scaleManager.transformY(m),M=f.smoothFactor;!y||M===0?(g.x=S,g.y=E):(g.x=S*M+T.x*(1-M),g.y=E*M+T.y*(1-M))},destroy:function(){this.events.removeAllListeners(),this.game.events.off(r.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var f=0;f<this.pointers.length;f++)this.pointers[f].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});c.exports=d},48205:(c,x,t)=>{/**
3031 * @author       Richard Davey <[email protected]>
3032 * @copyright    2013-2025 Phaser Studio Inc.
3033 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3034 */var o=t(96503),p=t(87902),a=t(83419),n=t(93301),r=t(74457),e=t(84409),s=t(20339),h=t(8497),i=t(81154),l=t(8214),u=t(50792),d=t(95540),f=t(23777),v=t(89639),m=t(41212),y=t(37277),g=t(87841),T=t(37303),S=t(44594),E=t(16483),M=t(10690),F=new a({Extends:u,initialize:function(P){u.call(this),this.scene=P,this.systems=P.sys,this.settings=P.sys.settings,this.manager=P.sys.game.input,this.pluginEvents=new u,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 L={cancelled:!1};this._eventContainer={stopPropagation:function(){L.cancelled=!0}},this._eventData=L,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,P.sys.events.once(S.BOOT,this.boot,this),P.sys.events.on(S.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(S.DESTROY,this.destroy,this),this.pluginEvents.emit(l.BOOT)},start:function(){var A=this.systems.events;A.on(S.TRANSITION_START,this.transitionIn,this),A.on(S.TRANSITION_OUT,this.transitionOut,this),A.on(S.TRANSITION_COMPLETE,this.transitionComplete,this),A.on(S.PRE_UPDATE,this.preUpdate,this),A.once(S.SHUTDOWN,this.shutdown,this),this.manager.events.on(l.GAME_OUT,this.onGameOut,this),this.manager.events.on(l.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(l.START)},onGameOver:function(A){this.isActive()&&this.emit(l.GAME_OVER,A.timeStamp,A)},onGameOut:function(A){this.isActive()&&this.emit(l.GAME_OUT,A.timeStamp,A)},preUpdate:function(){this.pluginEvents.emit(l.PRE_UPDATE);var A=this._pendingRemoval,P=this._pendingInsertion,L=A.length,O=P.length;if(!(L===0&&O===0)){for(var G=this._list,z=0;z<L;z++){var Y=A[z],X=G.indexOf(Y);X>-1&&(G.splice(X,1),this.clear(Y,!0))}this._pendingRemoval.length=0,this._list=G.concat(P.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(A){this.manager&&this.manager.setCursor(A)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(A,P){if(!this.isActive())return!1;if(this.pluginEvents.emit(l.UPDATE,A,P),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var L,O=this.manager,G=O.pointers;for(L=0;L<G.length;L++)G[L].updateMotion();if(this._list.length===0)return!1;var z=this.pollRate;if(z===-1)return!1;if(z>0)if(this._pollTimer-=P,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var Y=!1;for(L=0;L<G.length;L++){var X=0,I=G[L];this._tempZones=[],this._temp=this.hitTestPointer(I),this.sortGameObjects(this._temp,I),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),X+=this.processOverOutEvents(I),this.getDragState(I)===2&&this.processDragThresholdEvent(I,A),X>0&&(Y=!0)}return Y},update:function(A,P){if(!this.isActive())return!1;for(var L=!1,O=0;O<P.length;O++){var G=0,z=P[O];switch(this._tempZones=[],this._temp=this.hitTestPointer(z),this.sortGameObjects(this._temp,z),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),A){case n.MOUSE_DOWN:G+=this.processDragDownEvent(z),G+=this.processDownEvents(z),G+=this.processOverOutEvents(z);break;case n.MOUSE_UP:G+=this.processDragUpEvent(z),G+=this.processUpEvents(z),G+=this.processOverOutEvents(z);break;case n.TOUCH_START:G+=this.processDragDownEvent(z),G+=this.processDownEvents(z),G+=this.processOverEvents(z);break;case n.TOUCH_END:case n.TOUCH_CANCEL:G+=this.processDragUpEvent(z),G+=this.processUpEvents(z),G+=this.processOutEvents(z);break;case n.MOUSE_MOVE:case n.TOUCH_MOVE:G+=this.processDragMoveEvent(z),G+=this.processMoveEvents(z),G+=this.processOverOutEvents(z);break;case n.MOUSE_WHEEL:G+=this.processWheelEvent(z);break}G>0&&(L=!0)}return this._updatedThisFrame=!0,L},clear:function(A,P){P===void 0&&(P=!1),this.disable(A);var L=A.input;L&&(this.removeDebug(A),this.manager.resetCursor(L),L.gameObject=void 0,L.target=void 0,L.hitArea=void 0,L.hitAreaCallback=void 0,L.callbackContext=void 0,A.input=null),P||this.queueForRemoval(A);var O=this._draggable.indexOf(A);return O>-1&&this._draggable.splice(O,1),A},disable:function(A,P){P===void 0&&(P=!1);var L=A.input;L&&(L.enabled=!1,L.dragState=0);for(var O=this._drag,G=this._over,z=this.manager,Y=0,X;Y<z.pointers.length;Y++)X=O[Y].indexOf(A),X>-1&&O[Y].splice(X,1),X=G[Y].indexOf(A),X>-1&&G[Y].splice(X,1);return P&&this.resetCursor(),this},enable:function(A,P,L,O){return O===void 0&&(O=!1),A.input?A.input.enabled=!0:this.setHitArea(A,P,L),A.input&&O&&!A.input.dropZone&&(A.input.dropZone=O),this},hitTestPointer:function(A){for(var P=this.cameras.getCamerasBelowPointer(A),L=0;L<P.length;L++){for(var O=P[L],G=this.manager.hitTest(A,this._list,O),z=0;z<G.length;z++){var Y=G[z];Y.input.dropZone&&this._tempZones.push(Y)}if(G.length>0)return A.camera=O,G}return A.camera=P[0],[]},processDownEvents:function(A){var P=0,L=this._temp,O=this._eventData,G=this._eventContainer;O.cancelled=!1;for(var z=0;z<L.length;z++){var Y=L[z];if(!(!Y.input||!Y.input.enabled)&&(P++,Y.emit(l.GAMEOBJECT_POINTER_DOWN,A,Y.input.localX,Y.input.localY,G),O.cancelled||!this.isActive()||Y.input&&Y.input.enabled&&(this.emit
3034(l.GAMEOBJECT_DOWN,A,Y,G),O.cancelled||!this.isActive())))break}return!O.cancelled&&this.isActive()&&(A.downElement===this.manager.game.canvas?this.emit(l.POINTER_DOWN,A,L):this.emit(l.POINTER_DOWN_OUTSIDE,A)),P},getDragState:function(A){return this._dragState[A.id]},setDragState:function(A,P){this._dragState[A.id]=P},processDragThresholdEvent:function(A,P){var L=!1,O=this.dragTimeThreshold,G=this.dragDistanceThreshold;if((G>0&&s(A.x,A.y,A.downX,A.downY)>=G||O>0&&P>=A.downTime+O)&&(L=!0),L)return this.setDragState(A,3),this.processDragStartList(A)},processDragStartList:function(A){if(this.getDragState(A)!==3)return 0;var P=this._drag[A.id];P.length>1&&(P=P.slice(0));for(var L=0;L<P.length;L++){var O=P[L],G=O.input;G.dragState=2,G.dragStartX=O.x,G.dragStartY=O.y,G.dragStartXGlobal=A.worldX,G.dragStartYGlobal=A.worldY,G.dragStartCamera=A.camera,G.dragX=G.dragStartXGlobal-G.dragStartX,G.dragY=G.dragStartYGlobal-G.dragStartY,O.emit(l.GAMEOBJECT_DRAG_START,A,G.dragX,G.dragY),this.emit(l.DRAG_START,A,O)}return this.setDragState(A,4),P.length},processDragDownEvent:function(A){var P=this._temp;if(this._draggable.length===0||P.length===0||!A.primaryDown||this.getDragState(A)!==0)return 0;this.setDragState(A,1);for(var L=[],O=0;O<P.length;O++){var G=P[O];G.input.draggable&&G.input.dragState===0&&L.push(G)}return L.length===0?(this.setDragState(A,0),0):(L.length>1&&(this.sortGameObjects(L,A),this.topOnly&&L.splice(1)),this._drag[A.id]=L,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(A,3),this.processDragStartList(A)):(this.setDragState(A,2),0))},processDragMoveEvent:function(A){if(this.getDragState(A)===2&&this.processDragThresholdEvent(A,this.manager.game.loop.now),this.getDragState(A)!==4)return 0;var P=this._tempZones,L=this._drag[A.id];L.length>1&&(L=L.slice(0));for(var O=0;O<L.length;O++){var G=L[O],z=G.input,Y=z.target;if(Y){var X=P.indexOf(Y);X===0?(G.emit(l.GAMEOBJECT_DRAG_OVER,A,Y),this.emit(l.DRAG_OVER,A,G,Y)):X>0?(G.emit(l.GAMEOBJECT_DRAG_LEAVE,A,Y),this.emit(l.DRAG_LEAVE,A,G,Y),z.target=P[0],Y=z.target,G.emit(l.GAMEOBJECT_DRAG_ENTER,A,Y),this.emit(l.DRAG_ENTER,A,G,Y)):(G.emit(l.GAMEOBJECT_DRAG_LEAVE,A,Y),this.emit(l.DRAG_LEAVE,A,G,Y),P[0]?(z.target=P[0],Y=z.target,G.emit(l.GAMEOBJECT_DRAG_ENTER,A,Y),this.emit(l.DRAG_ENTER,A,G,Y)):z.target=null)}else!Y&&P[0]&&(z.target=P[0],Y=z.target,G.emit(l.GAMEOBJECT_DRAG_ENTER,A,Y),this.emit(l.DRAG_ENTER,A,G,Y));var I,U,D=A.positionToCamera(z.dragStartCamera);if(!G.parentContainer)I=D.x-z.dragX,U=D.y-z.dragY;else{var V=D.x-z.dragStartXGlobal,B=D.y-z.dragStartYGlobal,W=G.getParentRotation(),K=V*Math.cos(W)+B*Math.sin(W),J=B*Math.cos(W)-V*Math.sin(W);K*=1/G.parentContainer.scaleX,J*=1/G.parentContainer.scaleY,I=K+z.dragStartX,U=J+z.dragStartY}G.emit(l.GAMEOBJECT_DRAG,A,I,U),this.emit(l.DRAG,A,G,I,U)}return L.length},processDragUpEvent:function(A){var P=this._drag[A.id];P.length>1&&(P=P.slice(0));for(var L=0;L<P.length;L++){var O=P[L],G=O.input;if(G&&G.dragState===2){G.dragState=0,G.dragX=G.localX-O.displayOriginX,G.dragY=G.localY-O.displayOriginY,G.dragStartCamera=null;var z=!1,Y=G.target;Y&&(O.emit(l.GAMEOBJECT_DROP,A,Y),this.emit(l.DROP,A,O,Y),G.target=null,z=!0),O.input&&O.input.enabled&&(O.emit(l.GAMEOBJECT_DRAG_END,A,G.dragX,G.dragY,z),this.emit(l.DRAG_END,A,O,z))}}return this.setDragState(A,0),P.splice(0),0},processMoveEvents:function(A){var P=0,L=this._temp,O=this._eventData,G=this._eventContainer;O.cancelled=!1;for(var z=0;z<L.length;z++){var Y=L[z];if(!(!Y.input||!Y.input.enabled)&&(P++,Y.emit(l.GAMEOBJECT_POINTER_MOVE,A,Y.input.localX,Y.input.localY,G),O.cancelled||!this.isActive()||Y.input&&Y.input.enabled&&(this.emit(l.GAMEOBJECT_MOVE,A,Y,G),O.cancelled||!this.isActive()||this.topOnly)))break}return!O.cancelled&&this.isActive()&&this.emit(l.POINTER_MOVE,A,L),P},processWheelEvent:function(A){var P=0,L=this._temp,O=this._eventData,G=this._eventContainer;O.cancelled=!1;for(var z=A.deltaX,Y=A.deltaY,X=A.deltaZ,I=0;I<L.length;I++){var U=L[I];if(!(!U.input||!U.input.enabled)&&(P++,U.emit(l.GAMEOBJECT_POINTER_WHEEL,A,z,Y,X,G),O.cancelled||!this.isActive()||U.input&&U.input.enabled&&(this.emit
3034(l.GAMEOBJECT_WHEEL,A,U,z,Y,X,G),O.cancelled||!this.isActive())))break}return!O.cancelled&&this.isActive()&&this.emit(l.POINTER_WHEEL,A,L,z,Y,X),P},processOverEvents:function(A){var P=this._temp,L=0,O=P.length,G=[];if(O>0){var z=this.manager,Y=this._eventData,X=this._eventContainer;Y.cancelled=!1;for(var I=0;I<O;I++){var U=P[I];if(!(!U.input||!U.input.enabled)&&(G.push(U),z.setCursor(U.input),U.emit(l.GAMEOBJECT_POINTER_OVER,A,U.input.localX,U.input.localY,X),L++,Y.cancelled||!this.isActive()||U.input&&U.input.enabled&&(this.emit(l.GAMEOBJECT_OVER,A,U,X),Y.cancelled||!this.isActive())))break}!Y.cancelled&&this.isActive()&&this.emit(l.POINTER_OVER,A,G)}return this._over[A.id]=G,L},processOutEvents:function(A){var P=this._over[A.id],L=0,O=P.length;if(O>0){var G=this.manager,z=this._eventData,Y=this._eventContainer;z.cancelled=!1,this.sortGameObjects(P,A);for(var X=0;X<O;X++){var I=P[X];if(I=P[X],!(!I.input||!I.input.enabled)&&(G.resetCursor(I.input),I.emit(l.GAMEOBJECT_POINTER_OUT,A,Y),L++,z.cancelled||!this.isActive()||I.input&&I.input.enabled&&(this.emit(l.GAMEOBJECT_OUT,A,I,Y),z.cancelled||!this.isActive())))break}!z.cancelled&&this.isActive()&&this.emit(l.POINTER_OUT,A,P),this._over[A.id]=[]}return L},processOverOutEvents:function(A){var P=this._temp,L,O,G=[],z=[],Y=[],X=this._over[A.id],I=this._drag[A.id],U=this.manager;for(L=0;L<X.length;L++)O=X[L],P.indexOf(O)===-1&&I.indexOf(O)===-1?G.push(O):Y.push(O);for(L=0;L<P.length;L++)O=P[L],X.indexOf(O)===-1&&z.push(O);var D=G.length,V=0,B=this._eventData,W=this._eventContainer;if(B.cancelled=!1,D>0){for(this.sortGameObjects(G,A),L=0;L<D&&(O=G[L],!(!(!O.input||!O.input.enabled)&&(U.resetCursor(O.input),O.emit(l.GAMEOBJECT_POINTER_OUT,A,W),V++,B.cancelled||!this.isActive()||O.input&&O.input.enabled&&(this.emit(l.GAMEOBJECT_OUT,A,O,W),B.cancelled||!this.isActive()))));L++);(!B.cancelled||this.isActive())&&this.emit(l.POINTER_OUT,A,G)}if(D=z.length,B.cancelled=!1,D>0){for(this.sortGameObjects(z,A),L=0;L<D&&(O=z[L],!(!(!O.input||!O.input.enabled)&&(U.setCursor(O.input),O.emit(l.GAMEOBJECT_POINTER_OVER,A,O.input.localX,O.input.localY,W),V++,B.cancelled||!this.isActive()||O.input&&O.input.enabled&&(this.emit(l.GAMEOBJECT_OVER,A,O,W),B.cancelled||!this.isActive()))));L++);!B.cancelled&&this.isActive()&&this.emit(l.POINTER_OVER,A,z)}return X=Y.concat(z),this._over[A.id]=this.sortGameObjects(X,A),V},processUpEvents:function(A){var P=this._temp,L=this._eventData,O=this._eventContainer;L.cancelled=!1;for(var G=0;G<P.length;G++){var z=P[G];if(!(!z.input||!z.input.enabled)&&(z.emit(l.GAMEOBJECT_POINTER_UP,A,z.input.localX,z.input.localY,O),L.cancelled||!this.isActive()||z.input&&z.input.enabled&&(this.emit(l.GAMEOBJECT_UP,A,z,O),L.cancelled||!this.isActive())))break}return!L.cancelled&&this.isActive()&&(A.upElement===this.manager.game.canvas?this.emit(l.POINTER_UP,A,P):this.emit(l.POINTER_UP_OUTSIDE,A)),P.length},forceDownState:function(A,P){this.forceState(A,P,l.GAMEOBJECT_POINTER_DOWN,l.GAMEOBJECT_DOWN,!1)}
3034,forceUpState:function(A,P){this.forceState(A,P,l.GAMEOBJECT_POINTER_UP,l.GAMEOBJECT_UP,!1)},forceOverState:function(A,P){this.forceState(A,P,l.GAMEOBJECT_POINTER_OVER,l.GAMEOBJECT_OVER,!0)},forceOutState:function(A,P){this.forceState(A,P,l.GAMEOBJECT_POINTER_OUT,l.GAMEOBJECT_OUT,!1)},forceState:function(A,P,L,O,G){var z=this._eventData,Y=this._eventContainer;z.cancelled=!1,P.input&&P.input.enabled&&(P.emit(L,A,P.input.localX,P.input.localY,Y),G&&this.setCursor(P.input),!z.cancelled&&this.isActive()&&P.input&&P.input.enabled&&this.emit(O,A,P,Y))},queueForInsertion:function(A){return this._pendingInsertion.indexOf(A)===-1&&this._list.indexOf(A)===-1&&this._pendingInsertion.push(A),this},queueForRemoval:function(A){return this._pendingRemoval.push(A),this},setDraggable:function(A,P){P===void 0&&(P=!0),Array.isArray(A)||(A=[A]);for(var L=0;L<A.length;L++){var O=A[L];O.input.draggable=P;var G=this._draggable.indexOf(O);P&&G===-1?this._draggable.push(O):!P&&G>-1&&this._draggable.splice(G,1)}return this},makePixelPerfect:function(A){A===void 0&&(A=1);var P=this.systems.textures;return e(P,A)},setHitArea:function(A,P,L){if(P===void 0)return this.setHitAreaFromTexture(A);Array.isArray(A)||(A=[A]);var O=!1,G=!1,z=!1,Y=!1,X=!1,I=!0;if(m(P)&&Object.keys(P).length){var U=P,D=A.some(function(J){return J.hasOwnProperty("faces")});if(!D){P=d(U,"hitArea",null),L=d(U,"hitAreaCallback",null),X=d(U,"pixelPerfect",!1);var V=d(U,"alphaTolerance",1);X&&(P={},L=this.makePixelPerfect(V))}O=d(U,"draggable",!1),G=d(U,"dropZone",!1),z=d(U,"cursor",!1),Y=d(U,"useHandCursor",!1),(!P||!L)&&(this.setHitAreaFromTexture(A),I=!1)}else typeof P=="function"&&!L&&(L=P,P={});for(var B=0;B<A.length;B++){var W=A[B];if(X&&W.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var K=W.input?W.input:r(W,P,L);K.customHitArea=I,K.dropZone=G,K.cursor=Y?"pointer":z,W.input=K,O&&this.setDraggable(W),this.queueForInsertion(W)}return this},setHitAreaCircle:function(A,P,L,O,G){G===void 0&&(G=p);var z=new o(P,L,O);return this.setHitArea(A,z,G)},setHitAreaEllipse:function(A,P,L,O,G,z){z===void 0&&(z=i);var Y=new h(P,L,O,G);return this.setHitArea(A,Y,z)},setHitAreaFromTexture:function(A,P){P===void 0&&(P=T),Array.isArray(A)||(A=[A]);for(var L=0;L<A.length;L++){var O=A[L],G=O.frame,z=0,Y=0;if(O.width?(z=O.width,Y=O.height):G&&(z=G.realWidth,Y=G.realHeight),O.type==="Container"&&(z===0||Y===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}z!==0&&Y!==0&&(O.input=r(O,new g(0,0,z,Y),P),this.queueForInsertion(O))}return this},setHitAreaRectangle:function(A,P,L,O,G,z){z===void 0&&(z=T);var Y=new g(P,L,O,G);return this.setHitArea(A,Y,z)},setHitAreaTriangle:function(A,P,L,O,G,z,Y,X){X===void 0&&(X=M);var I=new E(P,L,O,G,z,Y);return this.setHitArea(A,I,X)},enableDebug:function(A,P){P===void 0&&(P=65280);var L=A.input;if(!L||!L.hitArea)return this;var O=L.hitArea,G=O.type,z=L.hitAreaDebug,Y=this.systems.add,X=this.systems.updateList;z&&(X.remove(z),z.destroy(),z=null);var I=0,U=0;switch(G){case f.CIRCLE:z=Y.arc(0,0,O.radius),I=O.x-O.radius,U=O.y-O.radius;break;case f.ELLIPSE:z=Y.ellipse(0,0,O.width,O.height),I=O.x-O.width/2,U=O.y-O.height/2;break;case f.LINE:z=Y.line(0,0,O.x1,O.y1,O.x2,O.y2);break;case f.POLYGON:z=Y.polygon(0,0,O.points);break;case f.RECTANGLE:z=Y.rectangle(0,0,O.width,O.height),I=O.x,U=O.y;break;case f.TRIANGLE:z=Y.triangle(0,0,O.x1,O.y1,O.x2,O.y2,O.x3,O.y3);break}return z&&(z.isFilled=!1,z.strokeColor=P,z.preUpdate=function(){z.setVisible(A.visible),z.setStrokeStyle(1/A.scale,z.strokeColor),z.setDisplayOrigin(A.displayOriginX,A.displayOriginY);var D=A.x,V=A.y,B=A.rotation,W=A.scaleX,K=A.scaleY;if(A.parentContainer){var J=A.getWorldTransformMatrix();D=J.tx,V=J.ty,B=J.rotation,W=J.scaleX,K=J.scaleY}z.setRotation(B),z.setScale(W,K),z.setPosition(D+I*W,V+U*K),z.setScrollFactor(A.scrollFactorX,A.scrollFactorY),z.setDepth(A.depth)},X.add(z),L.hitAreaDebug=z),this},removeDebug:function(A){var P=A.input;if(P&&P.hitAreaDebug){var L=P.hitAreaDebug;L.destroy(),P.hitAreaDebug=null}return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(A){return this.pollRate=A,this._pollTimer=0,this},setGlobalTopOnly:function(A){return this.manager.globalTopOnly=A,this},setTopOnly:function(A){return this.topOnly=A,this},sortGameObjects:function(A,P){if(A.length<2||!P.camera)return A;var L=P.camera.renderList;
vendor: 10,178 bytes, lines 3034-3046
3034return A.sort(function(O,G){var z=Math.max(L.indexOf(O),0),Y=Math.max(L.indexOf(G),0);return Y-z})},sortDropZones:function(A){return A.length<2?A:(this.scene.sys.depthSort(),A.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(A,P){if(!A.parentContainer&&!P.parentContainer)return this.displayList.getIndex(P)-this.displayList.getIndex(A);if(A.parentContainer===P.parentContainer)return P.parentContainer.getIndex(P)-A.parentContainer.getIndex(A);if(A.parentContainer===P)return-1;if(P.parentContainer===A)return 1;for(var L=A.getIndexList(),O=P.getIndexList(),G=Math.min(L.length,O.length),z=0;z<G;z++){var Y=L[z],X=O[z];if(Y!==X)return X-Y}return O.length-L.length},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(A){return this.manager.addPointer(A)},setDefaultCursor:function(A){return this.manager.setDefaultCursor(A),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(l.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var A=0;A<10;A++)this._drag[A]=[],this._over[A]=[];this.removeAllListeners();var P=this.manager;P.canvas.style.cursor=P.defaultCursor;var L=this.systems.events;L.off(S.TRANSITION_START,this.transitionIn,this),L.off(S.TRANSITION_OUT,this.transitionOut,this),L.off(S.TRANSITION_COMPLETE,this.transitionComplete,this),L.off(S.PRE_UPDATE,this.preUpdate,this),P.events.off(l.GAME_OUT,this.onGameOut,this),P.events.off(l.GAME_OVER,this.onGameOver,this),L.off(S.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var A=this.manager.pointers,P=0;P<A.length;P++)A[P].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(l.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(S.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});y.register("InputPlugin",F,"input"),c.exports=F},89639:(c,x,t)=>{/**
3035 * @author       Richard Davey <[email protected]>
3036 * @copyright    2013-2025 Phaser Studio Inc.
3037 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3038 */var o=t(35154),p={},a={};a.register=function(n,r,e,s,h){p[n]={plugin:r,mapping:e,settingsKey:s,configKey:h}},a.getPlugin=function(n){return p[n]},a.install=function(n){var r=n.scene.sys,e=r.settings.input,s=r.game.config;for(var h in p){var i=p[h].plugin,l=p[h].mapping,u=p[h].settingsKey,d=p[h].configKey;o(e,u,s[d])&&(n[l]=new i(n))}},a.remove=function(n){p.hasOwnProperty(n)&&delete p[n]},c.exports=a},42515:(c,x,t)=>{/**
3039 * @author       Richard Davey <[email protected]>
3040 * @copyright    2013-2025 Phaser Studio Inc.
3041 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3042 */var o=t(31040),p=t(83419),a=t(20339),n=t(43855),r=t(47235),e=t(26099),s=t(25892),h=new p({initialize:function(l,u){this.manager=l,this.id=u,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=u===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var l=i.getWorldPoint(this.x,this.y);return this.worldX=l.x,this.worldY=l.y,this},positionToCamera:function(i,l){return i.getWorldPoint(this.x,this.y,l)},updateMotion:function(){var i=this.position.x,l=this.position.y,u=this.midPoint.x,d=this.midPoint.y;if(!(i===u&&l===d)){var f=r(this.motionFactor,u,i),v=r(this.motionFactor,d,l);n(f,i,.1)&&(f=i),n(v,l,.1)&&(v=l),this.midPoint.set(f,v);var m=i-f,y=l-v;this.velocity.set(m,y),this.angle=o(f,v,i,l),this.distance=Math.sqrt(m*m+y*y)}},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,l){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=l,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=l.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,l){this.event=l,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=l.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,l){this.buttons=0,this.event=l,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=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,l){this.buttons=0,this.event=l,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=l.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.buttons===0?this.button===0&&!this.isDown:this.button===0},rightButtonReleased:function(){return this.buttons===0?this.button===2&&!this.isDown:this.button===2},middleButtonReleased:function(){return this.buttons===0?this.button===1&&!this.isDown:this.button===1},backButtonReleased:function(){return this.buttons===0?this.button===3&&!this.isDown:this.button===3},forwardButtonReleased:function(){return this.buttons===0?this.button===4&&!this.isDown:this.button===4},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?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,l){i===void 0&&(i=10),l===void 0&&(l=[]);for(var u=this.prevPosition.x,d=this.prevPosition.y,f=this.position.x,v=this.position.y,m=0;m<i;m++){var y=1/i*m;l[m]={x:r(y,u,f),y:r(y,d,v)}}return l},reset:function(){this.event=null,this.downElement=null,this.upElement=null,this.button=0,this.buttons=0,this.position.set(0,0),this.prevPosition.set(0,0),this.midPoint.set(-1,-1),this.velocity.set(0,0),this.angle=0,this.distance=0,this.worldX=0,this.worldY=0,this.downX=0,this.downY=0,this.upX=0,this.upY=0,this.moveTime=0,this.upTime=0,this.downTime=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.deltaX=0,this.deltaY=0,this.deltaZ=0,this.active=this.id===0},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(i){this.position.x=i}},y:{get:function(){return this.position.y},set:function(i){this.position.y=i}},time:{get:function(){return this.event?this.event.timeStamp:0}}});c.exports=h},93301:c=>{/**
3043 * @author       Richard Davey <[email protected]>
3044 * @copyright    2013-2025 Phaser Studio Inc.
3045 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3046 */var x={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUC
3046H_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};c.exports=x},7179:c=>{/**
3047 * @author       Richard Davey <[email protected]>
3048 * @copyright    2013-2025 Phaser Studio Inc.
3049 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3050 */c.exports="boot"},85375:c=>{/**
3051 * @author       Richard Davey <[email protected]>
3052 * @copyright    2013-2025 Phaser Studio Inc.
3053 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3054 */c.exports="destroy"},39843:c=>{/**
3055 * @author       Richard Davey <[email protected]>
3056 * @copyright    2013-2025 Phaser Studio Inc.
3057 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3058 */c.exports="dragend"},23388:c=>{/**
3059 * @author       Richard Davey <[email protected]>
3060 * @copyright    2013-2025 Phaser Studio Inc.
3061 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3062 */c.exports="dragenter"},16133:c=>{/**
3063 * @author       Richard Davey <[email protected]>
3064 * @copyright    2013-2025 Phaser Studio Inc.
3065 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3066 */c.exports="drag"},27829:c=>{/**
3067 * @author       Richard Davey <[email protected]>
3068 * @copyright    2013-2025 Phaser Studio Inc.
3069 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3070 */c.exports="dragleave"},53904:c=>{/**
3071 * @author       Richard Davey <[email protected]>
3072 * @copyright    2013-2025 Phaser Studio Inc.
3073 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3074 */c.exports="dragover"},56058:c=>{/**
3075 * @author       Richard Davey <[email protected]>
3076 * @copyright    2013-2025 Phaser Studio Inc.
3077 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3078 */c.exports="dragstart"},2642:c=>{/**
3079 * @author       Richard Davey <[email protected]>
3080 * @copyright    2013-2025 Phaser Studio Inc.
3081 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3082 */c.exports="drop"},88171:c=>{/**
3083 * @author       Richard Davey <[email protected]>
3084 * @copyright    2013-2025 Phaser Studio Inc.
3085 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3086 */c.exports="gameobjectdown"},36147:c=>{/**
3087 * @author       Richard Davey <[email protected]>
3088 * @copyright    2013-2025 Phaser Studio Inc.
3089 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3090 */c.exports="dragend"},71692:c=>{/**
3091 * @author       Richard Davey <[email protected]>
3092 * @copyright    2013-2025 Phaser Studio Inc.
3093 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3094 */c.exports="dragenter"},96149:c=>{/**
3095 * @author       Richard Davey <[email protected]>
3096 * @copyright    2013-2025 Phaser Studio Inc.
3097 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3098 */c.exports="drag"},81285:c=>{/**
3099 * @author       Richard Davey <[email protected]>
3100 * @copyright    2013-2025 Phaser Studio Inc.
3101 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3102 */c.exports="dragleave"},74048:c=>{/**
3103 * @author       Richard Davey <[email protected]>
3104 * @copyright    2013-2025 Phaser Studio Inc.
3105 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3106 */c.exports="dragover"},21322:c=>{/**
3107 * @author       Richard Davey <[email protected]>
3108 * @copyright    2013-2025 Phaser Studio Inc.
3109 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3110 */c.exports="dragstart"},49378:c=>{/**
3111 * @author       Richard Davey <[email protected]>
3112 * @copyright    2013-2025 Phaser Studio Inc.
3113 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3114 */c.exports="drop"},86754:c=>{/**
3115 * @author       Richard Davey <[email protected]>
3116 * @copyright    2013-2025 Phaser Studio Inc.
3117 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3118 */c.exports="gameobjectmove"},86433:c=>{/**
3119 * @author       Richard Davey <[email protected]>
3120 * @copyright    2013-2025 Phaser Studio Inc.
3121 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3122 */c.exports="gameobjectout"},60709:c=>{/**
3123 * @author       Richard Davey <[email protected]>
3124 * @copyright    2013-2025 Phaser Studio Inc.
3125 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3126 */c.exports="gameobjectover"},24081:c=>{/**
3127 * @author       Richard Davey <[email protected]>
3128 * @copyright    2013-2025 Phaser Studio Inc.
3129 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3130 */c.exports="pointerdown"},11172:c=>{/**
3131 * @author       Richard Davey <[email protected]>
3132 * @copyright    2013-2025 Phaser Studio Inc.
3133 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3134 */c.exports="pointermove"},18907:c=>{/**
3135 * @author       Richard Davey <[email protected]>
3136 * @copyright    2013-2025 Phaser Studio Inc.
3137 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3138 */c.exports="pointerout"},95579:c=>{/**
3139 * @author       Richard Davey <[email protected]>
3140 * @copyright    2013-2025 Phaser Studio Inc.
3141 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3142 */c.exports="pointerover"},35368:c=>{/**
3143 * @author       Richard Davey <[email protected]>
3144 * @copyright    2013-2025 Phaser Studio Inc.
3145 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3146 */c.exports="pointerup"},26972:c=>{/**
3147 * @author       Richard Davey <[email protected]>
3148 * @copyright    2013-2025 Phaser Studio Inc.
3149 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3150 */c.exports="wheel"},47078:c=>{/**
3151 * @author       Richard Davey <[email protected]>
3152 * @copyright    2013-2025 Phaser Studio Inc.
3153 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3154 */c.exports="gameobjectup"},73802:c=>{/**
3155 * @author       Richard Davey <[email protected]>
3156 * @copyright    2013-2025 Phaser Studio Inc.
3157 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3158 */c.exports="gameobjectwheel"},56718:c=>
3158{/**
3159 * @author       Richard Davey <[email protected]>
3160 * @copyright    2013-2025 Phaser Studio Inc.
3161 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3162 */c.exports="gameout"},25936:c=>{/**
3163 * @author       Richard Davey <[email protected]>
3164 * @copyright    2013-2025 Phaser Studio Inc.
3165 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3166 */c.exports="gameover"},27503:c=>{/**
3167 * @author       Richard Davey <[email protected]>
3168 * @copyright    2013-2025 Phaser Studio Inc.
3169 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3170 */c.exports="boot"},50852:c=>{/**
3171 * @author       Richard Davey <[email protected]>
3172 * @copyright    2013-2025 Phaser Studio Inc.
3173 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3174 */c.exports="process"},96438:c=>{/**
3175 * @author       Richard Davey <[email protected]>
3176 * @copyright    2013-2025 Phaser Studio Inc.
3177 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3178 */c.exports="update"},59152:c=>{/**
3179 * @author       Richard Davey <[email protected]>
3180 * @copyright    2013-2025 Phaser Studio Inc.
3181 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3182 */c.exports="pointerlockchange"},47777:c=>{/**
3183 * @author       Richard Davey <[email protected]>
3184 * @copyright    2013-2025 Phaser Studio Inc.
3185 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3186 */c.exports="pointerdown"},27957:c=>{/**
3187 * @author       Richard Davey <[email protected]>
3188 * @copyright    2013-2025 Phaser Studio Inc.
3189 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3190 */c.exports="pointerdownoutside"},19444:c=>{/**
3191 * @author       Richard Davey <[email protected]>
3192 * @copyright    2013-2025 Phaser Studio Inc.
3193 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3194 */c.exports="pointermove"},54251:c=>{/**
3195 * @author       Richard Davey <[email protected]>
3196 * @copyright    2013-2025 Phaser Studio Inc.
3197 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3198 */c.exports="pointerout"},18667:c=>{/**
3199 * @author       Richard Davey <[email protected]>
3200 * @copyright    2013-2025 Phaser Studio Inc.
3201 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3202 */c.exports="pointerover"},27192:c=>{/**
3203 * @author       Richard Davey <[email protected]>
3204 * @copyright    2013-2025 Phaser Studio Inc.
3205 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3206 */c.exports="pointerup"},24652:c=>{/**
3207 * @author       Richard Davey <[email protected]>
3208 * @copyright    2013-2025 Phaser Studio Inc.
3209 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3210 */c.exports="pointerupoutside"},45132:c=>{/**
3211 * @author       Richard Davey <[email protected]>
3212 * @copyright    2013-2025 Phaser Studio Inc.
3213 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3214 */c.exports="wheel"},44512:c=>{/**
3215 * @author       Richard Davey <[email protected]>
3216 * @copyright    2013-2025 Phaser Studio Inc.
3217 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3218 */c.exports="preupdate"},15757:c=>{/**
3219 * @author       Richard Davey <[email protected]>
3220 * @copyright    2013-2025 Phaser Studio Inc.
3221 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3222 */c.exports="shutdown"},41637:c=>{/**
3223 * @author       Richard Davey <[email protected]>
3224 * @copyright    2013-2025 Phaser Studio Inc.
3225 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3226 */c.exports="start"},93802:c=>{/**
3227 * @author       Richard Davey <[email protected]>
3228 * @copyright    2013-2025 Phaser Studio Inc.
3229 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3230 */c.exports="update"},8214:(c,x,t)=>{/**
3231 * @author       Richard Davey <[email protected]>
3232 * @copyright    2013-2025 Phaser Studio Inc.
3233 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3234 */c.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_MO
vendor: 7,095 bytes, lines 3234-3250
3234VE: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:(c,x,t)=>{/**
3235 * @author       Richard Davey <[email protected]>
3236 * @copyright    2013-2025 Phaser Studio Inc.
3237 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3238 */var o=t(83419),p=new o({initialize:function(n,r){this.pad=n,this.events=n.events,this.index=r,this.value=0,this.threshold=.1},update:function(a){this.value=a},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});c.exports=p},28884:(c,x,t)=>{/**
3239 * @author       Richard Davey <[email protected]>
3240 * @copyright    2013-2025 Phaser Studio Inc.
3241 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3242 */var o=t(83419),p=t(92734),a=new o({initialize:function(r,e){this.pad=r,this.events=r.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(n){this.value=n;var r=this.pad,e=this.index;n>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(p.BUTTON_DOWN,r,this,n),this.pad.emit(p.GAMEPAD_BUTTON_DOWN,e,n,this)):this.pressed&&(this.pressed=!1,this.events.emit(p.BUTTON_UP,r,this,n),this.pad.emit(p.GAMEPAD_BUTTON_UP,e,n,this))},destroy:function(){this.pad=null,this.events=null}});c.exports=a},99125:(c,x,t)=>{/**
3243 * @author       Richard Davey <[email protected]>
3244 * @copyright    2013-2025 Phaser Studio Inc.
3245 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3246 */var o=t(97421),p=t(28884),a=t(83419),n=t(50792),r=t(26099),e=new a({Extends:n,initialize:function(h,i){n.call(this),this.manager=h,this.pad=i,this.id=i.id,this.index=i.index;for(var l=[],u=0;u<i.buttons.length;u++)l.push(new p(this,u));this.buttons=l;var d=[];for(u=0;u<i.axes.length;u++)d.push(new o(this,u));this.axes=d,this.vibration=i.vibrationActuator;var f={value:0,pressed:!1};this._LCLeft=l[14]?l[14]:f,this._LCRight=l[15]?l[15]:f,this._LCTop=l[12]?l[12]:f,this._LCBottom=l[13]?l[13]:f,this._RCLeft=l[2]?l[2]:f,this._RCRight=l[1]?l[1]:f,this._RCTop=l[3]?l[3]:f,this._RCBottom=l[0]?l[0]:f,this._FBLeftTop=l[4]?l[4]:f,this._FBLeftBottom=l[6]?l[6]:f,this._FBRightTop=l[5]?l[5]:f,this._FBRightBottom=l[7]?l[7]:f;var v={value:0};this._HAxisLeft=d[0]?d[0]:v,this._VAxisLeft=d[1]?d[1]:v,this._HAxisRight=d[2]?d[2]:v,this._VAxisRight=d[3]?d[3]:v,this.leftStick=new r,this.rightStick=new r,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(s){return this.axes[s].getValue()},setAxisThreshold:function(s){for(var h=0;h<this.axes.length;h++)this.axes[h].threshold=s},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(s){return this.buttons[s].value},isButtonDown:function(s){return this.buttons[s].pressed},update:function(s){if(!(s.timestamp<this._created)){var h,i=this.buttons,l=s.buttons,u=i.length;for(h=0;h<u;h++)i[h].update(l[h].value);var d=this.axes,f=s.axes;for(u=d.length,h=0;h<u;h++)d[h].update(f[h]);u>=2&&(this.leftStick.set(d[0].getValue(),d[1].getValue()),u>=4&&this.rightStick.set(d[2].getValue(),d[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var s;for(s=0;s<this.buttons.length;s++)this.buttons[s].destroy();for(s=0;s<this.axes.length;s++)this.axes[s].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});c.exports=e},56654:(c,x,t)=>{/**
3247 * @author       Richard Davey <[email protected]>
3248 * @copyright    2013-2025 Phaser Studio Inc.
3249 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3250 */var o=t(83419),p=t(50792),a=t(92734),n=t(99125),r=t(35154),e=t(89639),s=t(8214),h=new o({Extends:p,initialize:function(l){p.call(this),this.scene=l.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=l,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,l.pluginEvents.once(s.BOOT,this.boot,this),l.pluginEvents.on(s.START,this.start,this)},boot:function(){var i=this.scene.sys.game,l=this.settings.input,u=i.config;this.enabled=r(l,"gamepad",u.inputGamepad)&&i.device.input.gamepads,this.target=r(l,"gamepad.target",u.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,l=this.target,u=function(d){d.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(d))};this.onGamepadHandler=u,l.addEventListener("gamepadconnected",u,!1),l.addEventListener("gamepaddisconnected",u,!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<this.gamepads.length;i++)this.gamepads[i].removeAllListeners()},disconnectAll:function(){for(var i=0;i<this.gamepads.length;i++)this.gamepads[i].pad.connected=!1},refreshPads:function(){var i=navigator.getGamepads();if(!i)this.disconnectAll();else for(var l=this.gamepads,u=0;u<i.length;u++){var d=i[u];if(d){var f=d.id,v=d.index,m=l[v];if(m)m.id!==f?(m.destroy(),l[v]=new n(this,d)):m.update(d);else{var y=new n(this,d);l[v]=y,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=y):this._pad3=y:this._pad2=y:this._pad1=y}}}},getAll:function(){for(var i=[],l=this.gamepads,u=0;u<l.length;u++)l[u]&&i.push(l[u]);return i},getPad:function(i){for(var l=this.gamepads,u=0;u<l.length;u++)if(l[u]&&l[u].index===i)return l[u]},update:function(){if(this.enabled){this.refreshPads();var i=this.queue.length;if(i!==0)for(var l=this.queue.splice(0,i),u=0;u<i;u++){var d=l[u],f=this.getPad(d.gamepad.index);
3250d.type==="gamepadconnected"?this.emit(a.CONNECTED,f,d):d.type==="gamepaddisconnected"&&this.emit(a.DISCONNECTED,f,d)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var i=0;i<this.gamepads.length;i++)this.gamepads[i]&&this.gamepads[i].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});e.register("GamepadPlugin",h,"gamepad","gamepad","inputGamepad"),c.exports=h},89651:c=>{/**
3251 * @author       Richard Davey <[email protected]>
3252 * @copyright    2013-2025 Phaser Studio Inc.
3253 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3254 */c.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:c=>{/**
3255 * @author       Richard Davey <[email protected]>
3256 * @copyright    2013-2025 Phaser Studio Inc.
3257 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3258 */c.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:c=>{/**
3259 * @author       Richard Davey <[email protected]>
3260 * @copyright    2013-2025 Phaser Studio Inc.
3261 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3262 */c.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:(c,x,t)=>{/**
3263 * @author       Richard Davey <[email protected]>
3264 * @copyright    2013-2025 Phaser Studio Inc.
3265 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3266 */c.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:c=>{/**
3267 * @author       Richard Davey <[email protected]>
3268 * @copyright    2013-2025 Phaser Studio Inc.
3269 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3270 */c.exports="down"},7629:c=>{/**
3271 * @author       Richard Davey <[email protected]>
3272 * @copyright    2013-2025 Phaser Studio Inc.
3273 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3274 */c.exports="up"},42206:c=>{/**
3275 * @author       Richard Davey <[email protected]>
3276 * @copyright    2013-2025 Phaser Studio Inc.
3277 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3278 */c.exports="connected"},86544:c=>{/**
3279 * @author       Richard Davey <[email protected]>
3280 * @copyright    2013-2025 Phaser Studio Inc.
3281 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3282 */c.exports="disconnected"},94784:c=>{/**
3283 * @author       Richard Davey <[email protected]>
3284 * @copyright    2013-2025 Phaser Studio Inc.
3285 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3286 */c.exports="down"},14325:c=>{/**
3287 * @author       Richard Davey <[email protected]>
3288 * @copyright    2013-2025 Phaser Studio Inc.
3289 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3290 */c.exports="up"},92734:(c,x,t)=>{/**
3291 * @author       Richard Davey <[email protected]>
3292 * @copyright    2013-2025 Phaser Studio Inc.
3293 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3294 */c.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:(c,x,t)=>{/**
3295 * @author       Richard Davey <[email protected]>
3296 * @copyright    2013-2025 Phaser Studio Inc.
3297 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3298 */c.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(c,x,t)=>{/**
3299 * @author       Richard Davey <[email protected]>
3300 * @copyright    2013-2025 Phaser Studio Inc.
3301 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3302 */var o=t(93301),p=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=p(!1,a,o),c.exports=a},78970:(c,x,t)=>{/**
3303 * @author       Richard Davey <[email protected]>
3304 * @copyright    2013-2025 Phaser Studio Inc.
3305 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3306 */var o=t(72905),p=t(83419),a=t(8443),n=t(8214),r=t(46032),e=t(29747),s=new p({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(n.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(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(n.MANAGER_PROCESS);var u=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!u&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}},this.onKeyUp=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(n.MANAGER_PROCESS);var u=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!u&&h.captures.indexOf(l.keyCode)>-1&&l.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,l=0;l<h.length;l++){var u=h[l];typeof u=="string"&&(u=r[u.trim().toUpperCase()]),i.indexOf(u)===-1&&i.push(u)}this.preventDefault=i.length>0},removeCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var i=this.captures,l=0;l<h.length;l++){var u=h[l];typeof u=="string"&&(u=r[u.toUpperCase()]),o(i,u)}this.preventDefault=i.length>0},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}});c.exports=s},28846:(c,x,t)=>{/**
3307 * @author       Richard Davey <[email protected]>
3308 * @copyright    2013-2025 Phaser Studio Inc.
3309 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3310 */var o=t(83419),p=t(50792),a=t(95922),n=t(8443),r=t(35154),e=t(8214),s=t(89639),h=t(30472),i=t(46032),l=t(87960),u=t(74600),d=t(44594),f=t(56583),v=new o({Extends:p,initialize:function(y){p.call(this),this.game=y.systems.game,this.scene=y.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=y,this.manager=y.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,y.pluginEvents.once(e.BOOT,this.boot,this),y.pluginEvents.on(e.START,this.start,this)},boot:function(){var m=this.settings.input;this.enabled=r(m,"keyboard",!0);var y=r(m,"keyboard.capture",null);y&&this.addCaptures(y),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(n.BLUR,this.resetKeys,this),this.scene.sys.events.on(d.PAUSE,this.resetKeys,this),this.scene.sys.events.on(d.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(m){return this.manager.addCapture(m),this},removeCapture:function(m){return this.manager.removeCapture(m),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
3310:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(m,y,g){y===void 0&&(y=!0),g===void 0&&(g=!1);var T={};if(typeof m=="string"){m=m.split(",");for(var S=0;S<m.length;S++){var E=m[S].trim();E&&(T[E]=this.addKey(E,y,g))}}else for(var M in m)T[M]=this.addKey(m[M],y,g);return T},addKey:function(m,y,g){y===void 0&&(y=!0),g===void 0&&(g=!1);var T=this.keys;if(m instanceof h){var S=T.indexOf(m);return S>-1?T[S]=m:T[m.keyCode]=m,y&&this.addCapture(m.keyCode),m.setEmitOnRepeat(g),m}return typeof m=="string"&&(m=i[m.toUpperCase()]),T[m]||(T[m]=new h(this,m),y&&this.addCapture(m),T[m].setEmitOnRepeat(g)),T[m]},removeKey:function(m,y,g){y===void 0&&(y=!1),g===void 0&&(g=!1);var T=this.keys,S;if(m instanceof h){var E=T.indexOf(m);E>-1&&(S=this.keys[E],this.keys[E]=void 0)}else typeof m=="string"&&(m=i[m.toUpperCase()]);return T[m]&&(S=T[m],T[m]=void 0),S&&(S.plugin=null,g&&this.removeCapture(S.keyCode),y&&S.destroy()),this},removeAllKeys:function(m,y){m===void 0&&(m=!1),y===void 0&&(y=!1);for(var g=this.keys,T=0;T<g.length;T++){var S=g[T];S&&(g[T]=void 0,y&&this.removeCapture(S.keyCode),m&&S.destroy())}return this},createCombo:function(m,y){return new l(this,m,y)},checkDown:function(m,y){if(y===void 0&&(y=0),this.enabled&&m.isDown){var g=f(this.time-m.timeDown,y);if(g>m._tick)return m._tick=g,!0}return!1},update:function(){var m=this.manager.queue,y=m.length;if(!(!this.isActive()||y===0))for(var g=this.keys,T=0;T<y;T++){var S=m[T],E=S.keyCode,M=g[E],F=!1;S.cancelled===void 0&&(S.cancelled=0,S.stopImmediatePropagation=function(){S.cancelled=1},S.stopPropagation=function(){S.cancelled=-1}),S.cancelled!==-1&&(E===this.prevCode&&S.timeStamp===this.prevTime&&S.type===this.prevType||(this.prevCode=E,this.prevTime=S.timeStamp,this.prevType=S.type,S.type==="keydown"?(M&&(F=M.isDown,M.onDown(S)),!S.cancelled&&(!M||!F)&&(u[E]&&this.emit(a.KEY_DOWN+u[E],S),S.cancelled||this.emit(a.ANY_KEY_DOWN,S))):(M&&M.onUp(S),S.cancelled||(u[E]&&this.emit(a.KEY_UP+u[E],S),S.cancelled||this.emit(a.ANY_KEY_UP,S))),S.cancelled===1&&(S.cancelled=0)))}},resetKeys:function(){for(var m=this.keys,y=0;y<m.length;y++)m[y]&&m[y].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(e.MANAGER_PROCESS,this.update,this),this.game.events.off(n.BLUR,this.resetKeys),this.scene.sys.events.off(d.PAUSE,this.resetKeys,this),this.scene.sys.events.off(d.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var m=this.keys,y=0;y<m.length;y++)m[y]&&m[y].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});s.register("KeyboardPlugin",v,"keyboard","keyboard","inputKeyboard"),c.exports=v},66970:c=>{/**
3311 * @author       Richard Davey <[email protected]>
3312 * @copyright    2013-2025 Phaser Studio Inc.
3313 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3314 */var x=function(t,o){return o.timeLastMatched=t.timeStamp,o.index++,o.index===o.size?!0:(o.current=o.keyCodes[o.index],!1)};c.exports=x},87960:(c,x,t)=>{/**
3315 * @author       Richard Davey <[email protected]>
3316 * @copyright    2013-2025 Phaser Studio Inc.
3317 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3318 */var o=t(83419),p=t(95922),a=t(95540),n=t(68769),r=t(92803),e=new o({initialize:function(h,i,l){if(l===void 0&&(l={}),i.length<2)return!1;this.manager=h,this.enabled=!0,this.keyCodes=[];for(var u=0;u<i.length;u++){var d=i[u];typeof d=="string"?this.keyCodes.push(d.toUpperCase().charCodeAt(0)):typeof d=="number"?this.keyCodes.push(d):d.hasOwnProperty("keyCode")&&this.keyCodes.push(d.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=a(l,"resetOnWrongKey",!0),this.maxKeyDelay=a(l,"maxKeyDelay",0),this.resetOnMatch=a(l,"resetOnMatch",!1),this.deleteOnMatch=a(l,"deleteOnMatch",!1);var f=this,v=function(m){if(!(f.matched||!f.enabled)){var y=n(m,f);y&&(f.manager.emit(p.COMBO_MATCH,f,m),f.resetOnMatch?r(f):f.deleteOnMatch&&f.destroy())}};this.onKeyDown=v,this.manager.on(p.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(p.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});c.exports=e},68769:(c,x,t)=>{/**
3319 * @author       Richard Davey <[email protected]>
3320 * @copyright    2013-2025 Phaser Studio Inc.
3321 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3322 */var o=t(66970),p=function(a,n){if(n.matched)return!0;var r=!1,e=!1;if(a.keyCode===n.current)if(n.index>0&&n.maxKeyDelay>0){var s=n.timeLastMatched+n.maxKeyDelay;
3322a.timeStamp<=s&&(e=!0,r=o(a,n))}else e=!0,r=o(a,n);return!e&&n.resetOnWrongKey&&(n.index=0,n.current=n.keyCodes[0]),r&&(n.timeLastMatched=a.timeStamp,n.matched=!0,n.timeMatched=a.timeStamp),r};c.exports=p},92803:c=>{/**
3323 * @author       Richard Davey <[email protected]>
3324 * @copyright    2013-2025 Phaser Studio Inc.
3325 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3326 */var x=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};c.exports=x},92612:c=>{/**
3327 * @author       Richard Davey <[email protected]>
3328 * @copyright    2013-2025 Phaser Studio Inc.
3329 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3330 */c.exports="keydown"},23345:c=>{/**
3331 * @author       Richard Davey <[email protected]>
3332 * @copyright    2013-2025 Phaser Studio Inc.
3333 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3334 */c.exports="keyup"},21957:c=>{/**
3335 * @author       Richard Davey <[email protected]>
3336 * @copyright    2013-2025 Phaser Studio Inc.
3337 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3338 */c.exports="keycombomatch"},44743:c=>{/**
3339 * @author       Richard Davey <[email protected]>
3340 * @copyright    2013-2025 Phaser Studio Inc.
3341 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3342 */c.exports="down"},3771:c=>{/**
3343 * @author       Richard Davey <[email protected]>
3344 * @copyright    2013-2025 Phaser Studio Inc.
3345 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3346 */c.exports="keydown-"},46358:c=>{/**
3347 * @author       Richard Davey <[email protected]>
3348 * @copyright    2013-2025 Phaser Studio Inc.
3349 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3350 */c.exports="keyup-"},75674:c=>{/**
3351 * @author       Richard Davey <[email protected]>
3352 * @copyright    2013-2025 Phaser Studio Inc.
3353 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3354 */c.exports="up"},95922:(c,x,t)=>{/**
3355 * @author       Richard Davey <[email protected]>
3356 * @copyright    2013-2025 Phaser Studio Inc.
3357 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3358 */c.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:(c,x,t)=>{/**
3359 * @author       Richard Davey <[email protected]>
3360 * @copyright    2013-2025 Phaser Studio Inc.
3361 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3362 */c.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:c=>{/**
3363 * @author       Richard Davey <[email protected]>
3364 * @copyright    2013-2025 Phaser Studio Inc.
3365 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3366 */var x=function(t,o){o===void 0&&(o=50);var p=t.plugin.game.loop.time-t.timeDown;return t.isDown&&p<o};c.exports=x},90229:c=>{/**
3367 * @author       Richard Davey <[email protected]>
3368 * @copyright    2013-2025 Phaser Studio Inc.
3369 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3370 */var x=function(t){return t._justDown?(t._justDown=!1,!0):!1};c.exports=x},38796:c=>{/**
3371 * @author       Richard Davey <[email protected]>
3372 * @copyright    2013-2025 Phaser Studio Inc.
3373 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3374 */var x=function(t){return t._justUp?(t._justUp=!1,!0):!1};c.exports=x},30472:(c,x,t)=>{/**
3375 * @author       Richard Davey <[email protected]>
3376 * @copyright    2013-2025 Phaser Studio Inc.
3377 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3378 */var o=t(83419),p=t(50792),a=t(95922),n=new o({Extends:p,initialize:function(e,s){p.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(r){return this.emitOnRepeat=r,this},onDown:function(r){this.originalEvent=r,this.enabled&&(this.altKey=r.altKey,this.ctrlKey=r.ctrlKey,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.location=r.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit
vendor: 11,762 bytes, lines 3378-3410
3378(a.DOWN,this,r):(this.isDown=!0,this.isUp=!1,this.timeDown=r.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(a.DOWN,this,r)))},onUp:function(r){this.originalEvent=r,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=r.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(a.UP,this,r))},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}});c.exports=n},46032:c=>{/**
3379 * @author       Richard Davey <[email protected]>
3380 * @copyright    2013-2025 Phaser Studio Inc.
3381 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3382 */var x={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};c.exports=x},74600:(c,x,t)=>{/**
3383 * @author       Richard Davey <[email protected]>
3384 * @copyright    2013-2025 Phaser Studio Inc.
3385 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3386 */var o=t(46032),p={};for(var a in o)p[o[a]]=a;c.exports=p},41170:c=>{/**
3387 * @author       Richard Davey <[email protected]>
3388 * @copyright    2013-2025 Phaser Studio Inc.
3389 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3390 */var x=function(t,o){o===void 0&&(o=50);var p=t.plugin.game.loop.time-t.timeUp;return t.isUp&&p<o};c.exports=x},85098:(c,x,t)=>{/**
3391 * @author       Richard Davey <[email protected]>
3392 * @copyright    2013-2025 Phaser Studio Inc.
3393 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3394 */var o=t(83419),p=t(89357),a=t(8214),n=t(29747),r=new o({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=n,this.onMouseDown=n,this.onMouseUp=n,this.onMouseDownWindow=n,this.onMouseUpWindow=n,this.onMouseOver=n,this.onMouseOut=n,this.onMouseWheel=n,this.pointerLockChange=n,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(p.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){p.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,l=window&&window.focus&&h.game.config.autoFocus;this.onMouseMove=function(d){!d.defaultPrevented&&s.enabled&&h&&h.enabled&&(h.onMouseMove(d),s.preventDefaultMove&&d.preventDefault())},this.onMouseDown=function(d){l&&window.focus(),!d.defaultPrevented&&s.enabled&&h&&h.enabled&&(h.onMouseDown(d),s.preventDefaultDown&&d.target===i&&d.preventDefault())},this.onMouseDownWindow=function(d){d.sourceCapabilities&&d.sourceCapabilities.firesTouchEvents||!d.defaultPrevented&&s.enabled&&h&&h.enabled&&d.target!==i&&h.onMouseDown(d)},this.onMouseUp=function(d){!d.defaultPrevented&&s.enabled&&h&&h.enabled&&(h.onMouseUp(d),s.preventDefaultUp&&d.target===i&&d.preventDefault())},this.onMouseUpWindow=function(d){d.sourceCapabilities&&d.sourceCapabilities.firesTouchEvents||!d.defaultPrevented&&s.enabled&&h&&h.enabled&&d.target!==i&&h.onMouseUp(d)},this.onMouseOver=function(d){!d.defaultPrevented&&s.enabled&&h&&h.enabled&&h.setCanvasOver(d)},this.onMouseOut=function(d){!d.defaultPrevented&&s.enabled&&h&&h.enabled&&h.setCanvasOut(d)},this.onMouseWheel=function(d){!d.defaultPrevented&&s.enabled&&h&&h.enabled&&h.onMouseWheel(d),s.preventDefaultWheel&&d.target===i&&d.preventDefault()};var u={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,u),e.addEventListener("mouseout",this.onMouseOut,u),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,u),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,u),window.top.addEventListener("mouseup",this.onMouseUpWindow,u)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,u),window.addEventListener("mouseup",this.onMouseUpWindow,u),this.isTop=!1}p.pointerLock&&(this.pointerLockChange=function(d){var f=s.target;s.locked=document.pointerLockElement===f||document.mozPointerLockElement===f||document.webkitPointerLockElement===f,h.onPointerLockChange(d)},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)),p.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}});c.exports=r},87078:(c,x,t)=>{/**
3395 * @author       Richard Davey <[email protected]>
3396 * @copyright    2013-2025 Phaser Studio Inc.
3397 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3398 */c.exports={MouseManager:t(85098)}},36210:(c,x,t)=>{/**
3399 * @author       Richard Davey <[email protected]>
3400 * @copyright    2013-2025 Phaser Studio Inc.
3401 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3402 */var o=t(83419),p=t(8214),a=t(29747),n=new o({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(p.MANAGER_BOOT,this.boot,this)},boot:function(){var r=this.manager.config;this.enabled=r.inputTouch,this.target=r.inputTouchEventTarget,this.capture=r.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,r.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(r){return r.preventDefault(),!1}),this},startListeners:function(){var r=this.target;if(r){var e=this,s=this.manager,h=s.canvas,i=window&&window.focus&&s.game.config.autoFocus;this.onTouchMove=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchMove(f),e.capture&&f.cancelable&&f.preventDefault())},this.onTouchStart=function(f){i&&window.focus(),!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchStart(f),e.capture&&f.cancelable&&f.target===h&&f.preventDefault())},this.onTouchStartWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&f.target!==h&&s.onTouchStart(f)},this.onTouchEnd=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchEnd(f),e.capture&&f.cancelable&&f.target===h&&f.preventDefault())},this.onTouchEndWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&f.target!==h&&s.onTouchEnd(f)},this.onTouchCancel=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchCancel(f),e.capture&&f.preventDefault())},this.onTouchCancelWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&s.onTouchCancel(f)};var l=this.capture,u={passive:!0},d={passive:!1};if(r.addEventListener("touchstart",this.onTouchStart,l?d:u),r.addEventListener("touchmove",this.onTouchMove,l?d:u),r.addEventListener("touchend",this.onTouchEnd,l?d:u),r.addEventListener("touchcancel",this.onTouchCancel,l?d:u),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,d),window.top.addEventListener("touchend",this.onTouchEndWindow,d),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,d)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,d),window.addEventListener("touchend",this.onTouchEndWindow,d),window.addEventListener("touchcancel",this.onTouchCancelWindow,d),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var r=this.target;r.removeEventListener("touchstart",this.onTouchStart),r.removeEventListener("touchmove",this.onTouchMove),r.removeEventListener("touchend",this.onTouchEnd),r.removeEventListener("touchcancel",this.onTouchCancel),window&&(r=this.isTop?window.top:window,r.removeEventListener("touchstart",this.onTouchStartWindow),r.removeEventListener("touchend",this.onTouchEndWindow),r.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=n},95618:(c,x,t)=>{/**
3403 * @author       Richard Davey <[email protected]>
3404 * @copyright    2013-2025 Phaser Studio Inc.
3405 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3406 */c.exports={TouchManager:t(36210)}},41299:(c,x,t)=>{/**
3407 * @author       Richard Davey <[email protected]>
3408 * @copyright    2013-2025 Phaser Studio Inc.
3409 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3410 */var o=t(83419),p=t(23906),a=t(54899),n=t(95540),r=t(98356),e=t(3374),s=t(84376),h=t(92638),i=new o({initialize:function(u,d){if(this.loader=u,this.cache=n(d,"cache",!1),this.type=n(d,"type",!1),!this.t
3410ype)throw new Error("Invalid File type: "+this.type);this.key=n(d,"key",!1);var f=this.key;if(u.prefix&&u.prefix!==""&&(this.key=u.prefix+f),!this.key)throw new Error("Invalid File key: "+this.key);var v=n(d,"url");v===void 0?v=u.path+f+"."+n(d,"extension",""):typeof v=="string"&&!v.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(v=u.path+v),this.url=v,this.src="",this.xhrSettings=h(n(d,"responseType",void 0)),n(d,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,n(d,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?p.FILE_POPULATED:p.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=n(d,"config",{}),this.multiFile,this.linkFile,this.base64=typeof v=="string"&&v.indexOf("data:")===0,this.retryAttempts=n(d,"maxRetries",u.maxRetries)},setLink:function(l){this.linkFile=l,l.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLo
3410ader.onprogress=void 0)},load:function(){if(this.state===p.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=p.FILE_LOADING,this.src=r(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=s(this,this.loader.xhr)}},onLoad:function(l,u){var d=l.responseURL&&this.loader.localSchemes.some(function(m){return l.responseURL.indexOf(m)===0}),f=d&&u.target.status===0,v=!(u.target&&u.target.status!==200)||f;l.readyState===4&&l.status>=400&&l.status<=599&&(v=!1),this.state=p.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,v)},onBase64Load:function(l){this.xhrLoader=l,this.state=p.FILE_LOADED,this.percentComplete=1,this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(l){l.lengthComputable&&(this.bytesLoaded=l.loaded,this.bytesTotal=l.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=p.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=p.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=p.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(l){if(this.state!==p.FILE_PENDING_DESTROY){l===void 0&&(l=this.data);var u=this.key,d=this.type;this.loader.emit(a.FILE_COMPLETE,u,d,l),this.loader.emit(a.FILE_KEY_COMPLETE+d+"-"+u,u,d,l),this.loader.flagForRemoval(this),this.state=p.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(l,u,d){if(typeof URL=="function")l.src=URL.createObjectURL(u);else{var f=new FileReader;f.onload=function(){l.removeAttribute("crossOrigin"),l.src="data:"+(u.type||d)+";base64,"+f.result.split(",")[1]},f.onerror=l.onerror,f.readAsDataURL(u)}},i.revokeObjectURL=function(l){typeof URL=="function"&&URL.revokeObjectURL(l.src)},c.exports=i},74099:c=>{/**
3411 * @author       Richard Davey <[email protected]>
3412 * @copyright    2013-2025 Phaser Studio Inc.
3413 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3414 */var x={},t={install:function(o){for(var p in x)o[p]=x[p]},register:function(o,p){x[o]=p},destroy:function(){x={}}};c.exports=t},98356:c=>{/**
3415 * @author       Richard Davey <[email protected]>
3416 * @copyright    2013-2025 Phaser Studio Inc.
3417 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3418 */var x=function(t,o){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:o+t.url:!1};c.exports=x},74261:(c,x,t)=>{/**
3419 * @author       Richard Davey <[email protected]>
3420 * @copyright    2013-2025 Phaser Studio Inc.
3421 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3422 */var o=t(83419),p=t(23906),a=t(35072),n=t(50792),r=t(54899),e=t(74099),s=t(95540),h=t(35154),i=t(41212),l=t(37277),u=t(44594),d=t(92638),f=new o({Extends:n,initialize:function(m){n.call(this);var y=m.sys.game.config,g=m.sys.settings.loader;this.scene=m,this.systems=m.sys,this.cacheManager=m.sys.cache,this.textureManager=m.sys.textures,this.sceneManager=m.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(s(g,"baseURL",y.loaderBaseURL)),this.setPath(s(g,"path",y.loaderPath)),this.setPrefix(s(g,"prefix",y.loaderPrefix)),this.maxParallelDownloads=s(g,"maxParallelDownloads",y.loaderMaxParallelDownloads),this.xhr=d(s(g,"responseType",y.loaderResponseType),s(g,"async",y.loaderAsync),s(g,"user",y.loaderUser),s(g,"password",y.loaderPassword),s(g,"timeout",y.loaderTimeout),s(g,"withCredentials",y.loaderWithCredentials)),this.crossOrigin=s(g,"crossOrigin",y.loaderCrossOrigin),this.imageLoadType=s(g,"imageLoadType",y.loaderImageLoadType),this.localSchemes=s(g,"localScheme",y.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=p.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=s(g,"maxRetries",y.loaderMaxRetries),m.sys.events.once(u.BOOT,this.boot,this),m.sys.events.on(u.START,this.pluginStart,this)},boot:function(){this.systems.events.once(u.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(u.SHUTDOWN,this.shutdown,this)},setBaseURL:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var m=0;m<v.length;m++){var y=v[m];
3422this.keyExists(y)||(this.list.set(y),this.emit(r.ADD,y.key,y.type,this,y),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(v){var m=v.hasCacheConflict();return m||this.list.iterate(function(y){if(y.type===v.type&&y.key===v.key)return m=!0,!1}),!m&&this.isLoading()&&(this.inflight.iterate(function(y){if(y.type===v.type&&y.key===v.key)return m=!0,!1}),this.queue.iterate(function(y){if(y.type===v.type&&y.key===v.key)return m=!0,!1})),m},addPack:function(v,m){if(typeof m=="string"){var y=h(v,m);y&&(v={packKey:y})}var g=0,T=this.baseURL,S=this.path,E=this.prefix;for(var M in v)if(Object.prototype.hasOwnProperty.call(v,M)){var F=v[M],A=s(F,"baseURL",T),P=s(F,"path",S),L=s(F,"prefix",E),O=s(F,"files",null),G=s(F,"defaultType","void");if(Array.isArray(O)){this.setBaseURL(A),this.setPath(P),this.setPrefix(L);for(var z=0;z<O.length;z++){var Y=O[z],X=Y.hasOwnProperty("type")?Y.type:G;this[X]&&(this[X](Y),g++)}}}return this.setBaseURL(T),this.setPath(S),this.setPrefix(E),g>0},removePack:function(v,m){var y=this.systems.anims,g=this.cacheManager,T=this.textureManager,S={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"},E;if(i(v))E=v;else if(E=g.json.get(v),!E){console.warn("Asset Pack not found in JSON cache:",v);return}m&&(E={_:E[m]});for(var M in E){var F=E[M],A=s(F,"prefix",""),P=s(F,"files"),L=s(F,"defaultType");if(Array.isArray(P))for(var O=0;O<P.length;O++){var G=P[O],z=G.hasOwnProperty("type")?G.type:L;if(!z){console.warn("No type:",G);continue}var Y=A+G.key;if(z==="animation"&&y.remove(Y),!((z==="aseprite"||z==="atlas"||z==="atlasXML"||z==="htmlTexture"||z==="image"||z==="multiatlas"||z==="spritesheet"||z==="svg"||z==="texture"||z==="unityAtlas")&&(T.remove(Y),!S[z]))){if(z==="pack"){this.removePack(Y,G.dataKey);continue}if(z==="spine"){var X=g.custom.spine.get(Y);if(!X)continue;var I=X.prefix===void 0?"":X.prefix;g.custom.spine.remove(Y);var U=g.custom.spineTextures.get(Y);if(!U)continue;g.custom.spineTextures.remove(Y);for(var D=0;D<U.pages.length;D++){var V=U.pages[D],B=I+V.name,W=Y+":"+B;
3422T.exists(W)?T.remove(W):T.remove(B)}}var K=S[z];if(K!==null){if(!K){console.warn("Unknown type:",z);continue}var J=g[K];J.remove(Y)}}}}},isLoading:function(){return this.state===p.LOADER_LOADING||this.state===p.LOADER_PROCESSING},isReady:function(){return this.state===p.LOADER_IDLE||this.state===p.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(r.START,this),this.list.size===0?this.loadComplete():(this.state=p.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(u.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(r.PROGRESS,this.progress)},update:function(){this.state===p.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(v){if((v.state===p.FILE_POPULATED||v.state===p.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(v),this.list.delete(v),v.crossOrigin||(v.crossOrigin=this.crossOrigin),v.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(v,m){this.inflight&&(this.inflight.delete(v),this.updateProgress(),m?(this.totalComplete++,this.queue.set(v),this.emit(r.FILE_LOAD,v),v.onProcess()):(this.totalFailed++,this._deleteQueue.set(v),this.emit(r.FILE_LOAD_ERROR,v),this.fileProcessComplete(v)))},fileProcessComplete:function(v){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(v.state===p.FILE_ERRORED?v.multiFile&&v.multiFile.onFileFailed(v):v.state===p.FILE_COMPLETE&&(v.multiFile?v.multiFile.isReadyToProcess()&&(v.multiFile.addToCache(),v.multiFile.pendingDestroy()):(v.addToCache(),v.pendingDestroy())),this.queue.delete(v),this.list.size===0&&this.inflight.size===0&&this.queue.size===0&&this.loadComplete())},loadComplete:function(){this.emit(r.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=p.LOADER_COMPLETE,this.systems.events.off(u.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(r.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(v){this._deleteQueue.set(v)},saveJSON:function(v,m){return this.save(JSON.stringify(v),m)},save:function(v,m,y){m===void 0&&(m="file.json"),y===void 0&&(y="application/json");var g=new Blob([v],{type:y}),T=URL.createObjectURL(g),S=document.createElement("a");return S.download=m,S.textContent="Download "+m,S.href=T,S.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var v=this.systems.game.config,m=this.systems.settings.loader;this.setBaseURL(s(m,"baseURL",v.loaderBaseURL)),this.setPath(s(m,"path",v.loaderPath)),this.setPrefix(s(m,"prefix",v.loaderPrefix)),this.state=p.LOADER_IDLE},shutdown:function(){this.reset(),this.state=p.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(u.UPDATE,this.update,this),this.systems.events.off(u.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=p.LOADER_DESTROYED,this.systems.events.off(u.UPDATE,this.update,this),this.systems.events.off(u.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});l.register("Loader",f,"load"),c.exports=f},3374:(c,x,t)=>{/**
3423 * @author       Richard Davey <[email protected]>
3424 * @copyright    2013-2025 Phaser Studio Inc.
3425 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3426 */var o=t(79291),p=t(92638),a=function(n,r){var e=n===void 0?p():o({},n);if(r)for(var s in r)r[s]!==void 0&&(e[s]=r[s]);return e};c.exports=a},26430:(c,x,t)=>{/**
3427 * @author       Richard Davey <[email protected]>
3428 * @copyright    2013-2025 Phaser Studio Inc.
3429 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3430 */var o=t(83419),p=t(23906),a=t(54899),n=new o({initialize:function(e,s,h,i){var l=[];
3430i.forEach(function(f){f&&l.push(f)}),this.loader=e,this.type=s,this.key=h;var u=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+u),this.multiKeyIndex=e.multiKeyIndex++,this.files=l,this.state=p.FILE_PENDING,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var d=0;d<l.length;d++)l[d].multiFile=this},isReadyToProcess:function(){return this.pending===0&&this.failed===0&&!this.complete},addToMultiFile:function(r){return this.files.push(r),r.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(r){var e=this.files.indexOf(r);e!==-1&&this.pending--},onFileFailed:function(r){var e=this.files.indexOf(r);e!==-1&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,r.type,r.key))},pendingDestroy:function(){if(this.state!==p.FILE_PENDING_DESTROY){var r=this.key,e=this.type;this.loader.emit(a.FILE_COMPLETE,r,e),this.loader.emit(a.FILE_KEY_COMPLETE+e+"-"+r,r,e),this.loader.flagForRemoval(this);for(var s=0;s<this.files.length;s++)this.files[s].pendingDestroy();this.state=p.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});c.exports=n},84376:(c,x,t)=>{/**
3431 * @author       Richard Davey <[email protected]>
3432 * @copyright    2013-2025 Phaser Studio Inc.
3433 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3434 */var o=t(3374),p=function(a,n){var r=o(n,a.xhrSettings);if(a.base64){var e=a.url.split(";base64,").pop()||a.url.split(",").pop(),s;a.xhrSettings.responseType==="arraybuffer"?s={response:Uint8Array.from(atob(e),function(l){return l.charCodeAt(0)}).buffer}:s={responseText:atob(e)},a.onBase64Load(s);return}var h=new XMLHttpRequest;if(h.open("GET",a.src,r.async,r.user,r.password),h.responseType=a.xhrSettings.responseType,h.timeout=r.timeout,r.headers)for(var i in r.headers)h.setRequestHeader(i,r.headers[i]);return r.header&&r.headerValue&&h.setRequestHeader(r.header,r.headerValue),r.requestedWith&&h.setRequestHeader("X-Requested-With",r.requestedWith),r.overrideMimeType&&h.overrideMimeType(r.overrideMimeType),r.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};c.exports=p},92638:c=>{/**
3435 * @author       Richard Davey <[email protected]>
3436 * @copyright    2013-2025 Phaser Studio Inc.
3437 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3438 */var x=function(t,o,p,a,n,r){return t===void 0&&(t=""),o===void 0&&(o=!0),p===void 0&&(p=""),a===void 0&&(a=""),n===void 0&&(n=0),r===void 0&&(r=!1),{responseType:t,async:o,user:p,password:a,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}};c.exports=x},23906:c=>{/**
3439 * @author       Richard Davey <[email protected]>
3440 * @copyright    2013-2025 Phaser Studio Inc.
3441 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3442 */var x={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};c.exports=x},42155:c=>{/**
3443 * @author       Richard Davey <[email protected]>
3444 * @copyright    2013-2025 Phaser Studio Inc.
3445 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3446 */c.exports="addfile"},38991:c=>{/**
3447 * @author       Richard Davey <[email protected]>
3448 * @copyright    2013-2025 Phaser Studio Inc.
3449 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3450 */c.exports="complete"},27540:c=>{/**
3451 * @author       Richard Davey <[email protected]>
3452 * @copyright    2013-2025 Phaser Studio Inc.
3453 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3454 */c.exports="filecomplete"},87464:c=>{/**
3455 * @author       Richard Davey <[email protected]>
3456 * @copyright    2013-2025 Phaser Studio Inc.
3457 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3458 */c.exports="filecomplete-"},94486:c=>{/**
3459 * @author       Richard Davey <[email protected]>
3460 * @copyright    2013-2025 Phaser Studio Inc.
3461 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3462 */c.exports="loaderror"},13035:c=>{/**
3463 * @author       Richard Davey <[email protected]>
3464 * @copyright    2013-2025 Phaser Studio Inc.
3465 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3466 */c.exports="load"},38144:c=>{/**
3467 * @author       Richard Davey <[email protected]>
3468 * @copyright    2013-2025 Phaser Studio Inc.
3469 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3470 */c.exports="fileprogress"},97520:c=>{/**
3471 * @author       Richard Davey <[email protected]>
3472 * @copyright    2013-2025 Phaser Studio Inc.
3473 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3474 */c.exports="postprocess"},85595:c=>{/**
3475 * @author       Richard Davey <[email protected]>
3476 * @copyright    2013-2025 Phaser Studio Inc.
3477 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3478 */c.exports="progress"},55680:c=>{/**
3479 * @author       Richard Davey <[email protected]>
3480 * @copyright    2013-2025 Phaser Studio Inc.
3481 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3482 */c.exports="start"},54899:(c,x,t)=>{/**
3483 * @author       Richard Davey <[email protected]>
3484 * @copyright    2013-2025 Phaser Studio Inc.
3485 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3486 */c.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:(c,x,t)=>{/**
3487 * @author       Richard Davey <[email protected]>
3488 * @copyright    2013-2025 Phaser Studio Inc.
3489 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3490 */var o=t(83419),p=t(74099),a=t(518),n=t(54899),r=new o({Extends:a,initialize:function(s,h,i,l,u){a.call(this,s,h,i,l,u),this.type="animationJSON"},onProcess:function(){this.loader.once(n.POST_PROCESS,this.onLoadComplete,this),a.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});
vendor: 4,323 bytes, lines 3490-3506
3490p.register("animation",function(e,s,h,i){if(Array.isArray(e))for(var l=0;l<e.length;l++)this.addFile(new r(this,e[l]));else this.addFile(new r(this,e,s,i,h));return this}),c.exports=r},76272:(c,x,t)=>{/**
3491 * @author       Richard Davey <[email protected]>
3492 * @copyright    2013-2025 Phaser Studio Inc.
3493 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3494 */var o=t(83419),p=t(74099),a=t(95540),n=t(19550),r=t(41212),e=t(518),s=t(26430),h=new o({Extends:s,initialize:function(l,u,d,f,v,m){var y,g;if(r(u)){var T=u;u=a(T,"key"),y=new n(l,{key:u,url:a(T,"textureURL"),extension:a(T,"textureExtension","png"),normalMap:a(T,"normalMap"),xhrSettings:a(T,"textureXhrSettings")}),g=new e(l,{key:u,url:a(T,"atlasURL"),extension:a(T,"atlasExtension","json"),xhrSettings:a(T,"atlasXhrSettings")})}else y=new n(l,u,d,v),g=new e(l,u,f,m);y.linkFile?s.call(this,l,"atlasjson",u,[y,g,y.linkFile]):s.call(this,l,"atlasjson",u,[y,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],l=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,l.data,u),l.addToCache(),this.complete=!0}}});p.register("aseprite",function(i,l,u,d,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new h(this,i[m]),this.addFile(v.files);else v=new h(this,i,l,u,d,f),this.addFile(v.files);return this}),c.exports=h},38734:(c,x,t)=>{/**
3495 * @author       Richard Davey <[email protected]>
3496 * @copyright    2013-2025 Phaser Studio Inc.
3497 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3498 */var o=t(83419),p=t(74099),a=t(95540),n=t(19550),r=t(41212),e=t(518),s=t(26430),h=new o({Extends:s,initialize:function(l,u,d,f,v,m){var y,g;if(r(u)){var T=u;u=a(T,"key"),y=new n(l,{key:u,url:a(T,"textureURL"),extension:a(T,"textureExtension","png"),normalMap:a(T,"normalMap"),xhrSettings:a(T,"textureXhrSettings")}),g=new e(l,{key:u,url:a(T,"atlasURL"),extension:a(T,"atlasExtension","json"),xhrSettings:a(T,"atlasXhrSettings")})}else y=new n(l,u,d,v),g=new e(l,u,f,m);y.linkFile?s.call(this,l,"atlasjson",u,[y,g,y.linkFile]):s.call(this,l,"atlasjson",u,[y,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],l=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,l.data,u),this.complete=!0}}});p.register("atlas",function(i,l,u,d,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new h(this,i[m]),this.addFile(v.files);else v=new h(this,i,l,u,d,f),this.addFile(v.files);return this}),c.exports=h},74599:(c,x,t)=>{/**
3499 * @author       Richard Davey <[email protected]>
3500 * @copyright    2013-2025 Phaser Studio Inc.
3501 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3502 */var o=t(83419),p=t(74099),a=t(95540),n=t(19550),r=t(41212),e=t(26430),s=t(57318),h=new o({Extends:e,initialize:function(l,u,d,f,v,m){var y,g;if(r(u)){var T=u;u=a(T,"key"),y=new n(l,{key:u,url:a(T,"textureURL"),extension:a(T,"textureExtension","png"),normalMap:a(T,"normalMap"),xhrSettings:a(T,"textureXhrSettings")}),g=new s(l,{key:u,url:a(T,"atlasURL"),extension:a(T,"atlasExtension","xml"),xhrSettings:a(T,"atlasXhrSettings")})}else y=new n(l,u,d,v),g=new s(l,u,f,m);y.linkFile?e.call(this,l,"atlasxml",u,[y,g,y.linkFile]):e.call(this,l,"atlasxml",u,[y,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],l=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,l.data,u),this.complete=!0}}});p.register("atlasXML",function(i,l,u,d,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new h(this,i[m]),this.addFile(v.files);else v=new h(this,i,l,u,d,f),this.addFile(v.files);return this}),c.exports=h},21097:(c,x,t)=>{/**
3503 * @author       Richard Davey <[email protected]>
3504 * @copyright    2013-2025 Phaser Studio Inc.
3505 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3506 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(89749),s=t(41212),h=new o({Extends:a,initialize:function(l,u,d,f,v){if(s(u)){var m=u;u=r(m,"key"),f=r(m,"xhrSettings"),v=r(m,"context",v)}var y={type:"audio",cache:l.cacheManager.audio,extension:d.type,responseType:"arraybuffer",key:u,url:d.url,xhrSettings:f,config:{context:v}};a.call(this,l,y)},onProcess:function(){this.state=p.FILE_PROCESSING;var i=this;
3506this.config.context.decodeAudioData(this.xhrLoader.response,function(l){i.data=l,i.onProcessComplete()},function(l){console.error("Error decoding audio: "+i.key+" - ",l?l.message:null),i.onProcessError()}),this.config.context=null}});h.create=function(i,l,u,d,f){var v=i.systems.game,m=v.config.audio,y=v.device.audio;s(l)&&(u=r(l,"url",[]),d=r(l,"config",{}));var g=h.getAudioURL(v,u);return g?y.webAudio&&!m.disableWebAudio?new h(i,l,g,f,v.sound.context):new e(i,l,g,d):(console.warn('No audio URLs for "%s" can play on this device',l),null)},h.getAudioURL=function(i,l){Array.isArray(l)||(l=[l]);for(var u=0;u<l.length;u++){var d=r(l[u],"url",l[u]);if(d.indexOf("blob:")===0||d.indexOf("data:")===0)return{url:d,type:""};var f=d.match(/\.([a-zA-Z0-9]+)($|\?)/);if(f=r(l[u],"type",f?f[1]:"").toLowerCase(),i.device.audio[f])return{url:d,type:f}}return null},n.register("audio",function(i,l,u,d){var f=this.systems.game,v=f.config.audio,m=f.device.audio;if(v.noAudio||!m.webAudio&&!m.audioData)return this;var y;if(Array.isArray(i))for(var g=0;g<i.length;g++)y=h.create(this,i[g]),y&&this.addFile(y);else y=h.create(this,i,l,u,d),y&&this.addFile(y);return this}),c.exports=h},89524:(c,x,t)=>{/**
3507 * @author       Richard Davey <[email protected]>
3508 * @copyright    2013-2025 Phaser Studio Inc.
3509 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3510 */var o=t(21097),p=t(83419),a=t(74099),n=t(95540),r=t(41212),e=t(518),s=t(26430),h=new p({Extends:s,initialize:function(l,u,d,f,v,m,y){if(r(u)){var g=u;u=n(g,"key"),d=n(g,"jsonURL"),f=n(g,"audioURL"),v=n(g,"audioConfig"),m=n(g,"audioXhrSettings"),y=n(g,"jsonXhrSettings")}var T;if(!f)T=new e(l,u,d,y),s.call(this,l,"audiosprite",u,[T]),this.config.resourceLoad=!0,this.config.audioConfig=v,this.config.audioXhrSettings=m;else{var S=o.create(l,u,f,v,m);S&&(T=new e(l,u,d,y),s.call(this,l,"audiosprite",u,[S,T]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var l=this.files.indexOf(i);if(l!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var u=i.data.resources,d=n(this.config,"audioConfig"),f=n(this.config,"audioXhrSettings"),v=o.create(this.loader,i.key,u,d,f);v&&(this.addToMultiFile(v),this.loader.addFile(v))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],l=this.files[1];i.addToCache(),l.addToCache(),this.complete=!0}}});a.register("audioSprite",function(i,l,u,d,f,v){var m=this.systems.game,y=m.config.audio,g=m.device.audio;if(y&&y.noAudio||!g.webAudio&&!g.audioData)return this;var T;if(Array.isArray(i))for(var S=0;S<i.length;S++)T=new h(this,i[S]),T.files&&this.addFile(T.files);else T=new h(this,i,l,u,d,f,v),T.files&&this.addFile(T.files);return this})},85722:(c,x,t)=>{/**
3511 * @author       Richard Davey <[email protected]>
3512 * @copyright    2013-2025 Phaser Studio Inc.
3513 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3514 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d,f){var v="bin";if(e(l)){var m=l;l=r(m,"key"),u=r(m,"url"),d=r(m,"xhrSettings"),v=r(m,"extension",v),f=r(m,"dataType",f)}var y={type:"binary",cache:i.cacheManager.binary,extension:v,responseType:"arraybuffer",key:l,url:u,xhrSettings:d,config:{dataType:f}};a.call(this,i,y)},onProcess:function(){this.state=p.FILE_PROCESSING;var h=this.config.dataType;this.data=h?new h(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});n.register("binary",function(h,i,l,u){if(Array.isArray(h))for(var d=0;d<h.length;d++)this.addFile(new s(this,h[d]));else this.addFile(new s(this,h,i,u,l));return this}),c.exports=s},97025:(c,x,t)=>{/**
3515 * @author       Richard Davey <[email protected]>
3516 * @copyright    2013-2025 Phaser Studio Inc.
3517 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3518 */var o=t(83419),p=t(74099),a=t(95540),n=t(19550),r=t(41212),e=t(26430),s=t(21859),h=t(57318),i=new o({Extends:e,initialize:function(u,d,f,v,m,y){var g,T;if(r(d)){var S=d;d=a(S,"key"),g=new n(u,{key:d,url:a(S,"textureURL"),extension:a(S,"textureExtension","png"),normalMap:a(S,"normalMap"),xhrSettings:a(S,"textureXhrSettings")}),T=new h(u,{key:d,url:a(S,"fontDataURL"),extension:a(S,"fontDataExtension","xml"),xhrSettings:a(S,"fontDataXhrSettings")})}else g=new n(u,d,f,m),T=new h(u,d,v,y);g.linkFile?e.call(this,u,"bitmapfont",d,[g,T,g.linkFile]):e.call(this,u,"bitmapfont",d,[g,T])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],u=this.files[1];l.addToCache();var d=l.cache.get(l.key),f=s(u.data,l.cache.getFrame(l.key),0,0,d);
3518this.loader.cacheManager.bitmapFont.add(l.key,{data:f,texture:l.key,frame:null}),this.complete=!0}}});p.register("bitmapFont",function(l,u,d,f,v){var m;if(Array.isArray(l))for(var y=0;y<l.length;y++)m=new i(this,l[y]),this.addFile(m.files);else m=new i(this,l,u,d,f,v),this.addFile(m.files);return this}),c.exports=i},16024:(c,x,t)=>{/**
3519 * @author       Richard Davey <[email protected]>
3520 * @copyright    2013-2025 Phaser Studio Inc.
3521 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3522 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d){var f="css";if(e(l)){var v=l;l=r(v,"key"),u=r(v,"url"),d=r(v,"xhrSettings"),f=r(v,"extension",f)}var m={type:"script",cache:!1,extension:f,responseType:"text",key:l,url:u,xhrSettings:d};a.call(this,i,m)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});n.register("css",function(h,i,l){if(Array.isArray(h))for(var u=0;u<h.length;u++)this.addFile(new s(this,h[u]));else this.addFile(new s(this,h,i,l));return this}),c.exports=s},69559:(c,x,t)=>{/**
3523 * @author       Richard Davey <[email protected]>
3524 * @copyright    2021 Photon Storm Ltd.
3525 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3526 */var o=t(38734),p=t(85722),a=t(83419),n=t(74099),r=t(95540),e=t(19550),s=t(41212),h=t(518),i=t(31403),l=t(46975),u=t(59327),d=t(26430),f=t(82038),v=t(55222),m=new a({Extends:d,initialize:function(g,T,S,E){if(S.multiAtlasURL){var M=new h(g,{key:T,url:S.multiAtlasURL,xhrSettings:E,config:S});d.call(this,g,"texture",T,[M])}else{var F=S.textureURL.substr(S.textureURL.length-3);S.type||(S.type=F.toLowerCase()==="ktx"?"KTX":"PVR");var A=new p(g,{key:T,url:S.textureURL,extension:F,xhrSettings:E,config:S});if(S.atlasURL){var P=new h(g,{key:T,url:S.atlasURL,xhrSettings:E,config:S});d.call(this,g,"texture",T,[A,P])}else d.call(this,g,"texture",T,[A])}this.config=S},onFileComplete:function(y){var g=this.files.indexOf(y);if(g!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(y.type==="json"&&y.data.hasOwnProperty("textures")){var T=y.data.textures,S=this.config,E=this.loader,M=E.baseURL,F=E.path,A=E.prefix,P=r(S,"multiBaseURL",this.baseURL),L=r(S,"multiPath",this.path),O=r(S,"prefix",this.prefix),G=r(S,"textureXhrSettings");P&&E.setBaseURL(P),L&&E.setPath(L),O&&E.setPrefix(O);for(var z=0;z<T.length;z++){var Y=T[z].image,X="CMA"+this.multiKeyIndex+"_"+Y,I=new p(E,X,Y,G);if(this.addToMultiFile(I),E.addFile(I),T[z].normalMap){var U=new p(E,X,T[z].normalMap,G);U.type="normalMap",I.setLink(U),this.addToMultiFile(U),E.addFile(U)}}E.setBaseURL(M),E.setPath(F),E.setPrefix(A)}}},addToCache:function(){function y(P){console.warn('Compressed Texture Invalid: "'+M.key+'". '+P)}if(this.isReadyToProcess()){var g=this.config;if(g.multiAtlasURL)this.addMultiToCache();else{var T=this.loader.systems.renderer,S=this.loader.textureManager,E,M=this.files[0],F=this.files[1];if(g.type==="PVR"?E=f(M.data):g.type==="KTX"&&(E=i(M.data),E||y("KTX file contains unsupported format.")),E&&!v(E)&&(y("Texture dimensions failed verification. Check the texture format specifications for "+g.format+" 0x"+E.internalFormat.toString(16)+"."),E=null),E&&!T.supportsCompressedTexture(g.format,E.internalFormat)&&(y("Texture format "+g.format+" with internal format "+E.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),E=null),E){E.format=T.getCompressedTextureName(g.format,E.internalFormat);var A=F&&F.data?F.data:null;S.addCompressedTexture(M.key,E,A)}}this.complete=!0}},addMultiToCache:function(){for(var y=this.config,g=this.files[0],T=[],S=[],E=[],M=this.loader.systems.renderer,F=this.loader.textureManager,A,P=1;P<this.files.length;P++){var L=this.files[P];if(L.type!=="normalMap")for(var O=L.key.indexOf("_"),G=L.key.substr(O+1),z=L.data,Y=0;Y<g.data.textures.length;Y++){var X=g.data.textures[Y];if(X.image===G){y.type==="PVR"?A=f(z):y.type==="KTX"&&(A=i(z)),A&&M.supportsCompressedTexture(y.format,A.internalFormat)&&(A.format=M.getCompressedTextureName(y.format,A.internalFormat),S.push(A),T.push(X),L.linkFile&&E.push(L.linkFile.data));break}}}E.length===0&&(E=void 0),F.addAtlasJSONArray(this.key,S,T,E),this.complete=!0}});n.register("texture",function(y,g,T){var S=this.systems.renderer,E=function(F,A,P,L){var O={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(s(A)){var G=A;A=r(G,"key"),P=r(G,"url"),L=r(G,"xhrSettings")}var z=!1;for(var Y in P)if(S.supportsCompressedTexture(Y)){var X=P[Y];typeof X=="string"?O.textureURL=X:O=l(X,O),O.format=Y.toUpperCase(),z=!0;break}if(!z)console.warn("No supported compressed texture format or IMG fallback",A);else if(O.format==="IMG"){var I,U;O.multiAtlasURL?(U=new u(F,A,O.multiAtlasURL,O.multiPath,O.multiBaseURL,L),I=U.files):O.atlasURL?(U=new o(F,A,O.textureURL,O.atlasURL,L),I=U.files):I=new e(F,A,O.textureURL,L),F.addFile(I)}else{var D=new m(F,A,O,L);F.addFile(D.files)}};if(Array.isArray(y))for(var M=0;M<y.length;M++)E(this,y[M]);else E(this,y,g,T);return this}),c.exports=m},87674:(c,x,t)=>{/**
3527 * @author       Richard Davey <[email protected]>
3528 * @copyright    2013-2025 Phaser Studio Inc.
3529 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3530 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(98356),s=t(41212),h=new o({Extends:a,initialize:function(l,u,d,f,v,m){var y="ttf";if(s(u)){var g=u;u=r(g,"key"),d=r(g,"url"),f=r(g,"format","truetype"),v=r(g,"descriptors",null),m=r(g,"xhrSettings"),y=r(g,"extension",y)}else f===void 0&&(f="truetype");var T={type:"font",cache:!1,extension:y,responseType:"text",key:u,url:d,xhrSettings:m};a.call(this,l,T),this.data={format:f,descriptors:v},this.state=p.FILE_POPULATED},onProcess:function(){this.state=p.FILE_PROCESSING,this.src=e(this,this.loader.baseURL);var i,l=this.key,u="url("+this.src+') format("'+this.data.format+'")';this.data.descriptors?i=new FontFace(l,u,this.data.descriptors):i=new FontFace(l,u);var d=this;i.load().then(function(){document.fonts.add(i),document.body.classList.add("fonts-loaded"),d.onProcessComplete()}).catch(function(){console.warn("Font failed to load",u),d.onProcessComplete()})}});n.register("font",function(i,l,u,d,f){if(Array.isArray(i))for(var v=0;v<i.length;v++)this.addFile(new h(this,i[v]));else this.addFile(new h(this,i,l,u,d,f));return this}),c.exports=h},47931:(c,x,t)=>{/**
3531 * @author       Richard Davey <[email protected]>
3532 * @copyright    2013-2025 Phaser Studio Inc.
3533 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3534 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=t(73894),h=new o({Extends:a,initialize:function(l,u,d,f,v){var m="glsl";if(e(u)){var y=u;u=r(y,"key"),d=r(y,"url"),f=r(y,"shaderType","fragment"),v=r(y,"xhrSettings"),m=r(y,"extension",m)}else f===void 0&&(f="fragment");
3534var g={type:"glsl",cache:l.cacheManager.shader,extension:m,responseType:"text",key:u,url:d,config:{shaderType:f},xhrSettings:v};a.call(this,l,g)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(`
3535`),l=this.extractBlock(i,0);if(l)for(;l;){var u=this.getShaderName(l.header),d=this.getShaderType(l.header),f=this.getShaderUniforms(l.header),v=l.shader;if(this.cache.has(u)){var m=this.cache.get(u);d==="fragment"?m.fragmentSrc=v:m.vertexSrc=v,m.uniforms||(m.uniforms=f)}else d==="fragment"?this.cache.add(u,new s(u,v,"",f)):this.cache.add(u,new s(u,"",v,f));l=this.extractBlock(i,l.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 l=0;l<i.length;l++){var u=i[l].trim();if(u.substring(0,5)==="name:")return u.substring(5).trim()}return this.key},getShaderType:function(i){for(var l=0;l<i.length;l++){var u=i[l].trim();if(u.substring(0,5)==="type:")return u.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(i){for(var l={},u=0;u<i.length;u++){var d=i[u].trim();if(d.substring(0,8)==="uniform."){var f=d.indexOf(":");if(f){var v=d.substring(8,f);try{l[v]=JSON.parse(d.substring(f+1))}catch{console.warn("Invalid uniform JSON: "+v)}}}}return l},extractBlock:function(i,l){for(var u=-1,d=-1,f=-1,v=!1,m=!1,y=[],g=[],T=l;T<i.length;T++){var S=i[T].trim();if(S==="---")if(u===-1)u=T,v=!0;else if(v)d=T,v=!1,m=!0;else{m=!1;break}else v?y.push(S):m&&(g.push(S),f=T)}return!v&&d!==-1?{header:y,shader:g.join(`
3536`),offset:f}:null}});n.register("glsl",function(i,l,u,d){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new h(this,i[f]));else this.addFile(new h(this,i,l,u,d));return this}),c.exports=h},89749:(c,x,t)=>{/**
3537 * @author       Richard Davey <[email protected]>
3538 * @copyright    2013-2025 Phaser Studio Inc.
3539 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3540 */var o=t(83419),p=t(54899),a=t(41299),n=t(95540),r=t(98356),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d){if(e(l)){var f=l;l=n(f,"key"),d=n(f,"config",d)}var v={type:"audio",cache:i.cacheManager.audio,extension:u.type,key:l,url:u.url,config:d};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<this.data.length;h++){var i=this.data[h];i.oncanplaythrough=null,i.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(h){var i=h.target;i.oncanplaythrough=null,i.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(p.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var h=this.config&&this.config.instances||1;this.filesTotal=h,this.filesLoaded=0,this.percentComplete=0;for(var i=0;i<h;i++){var l=new Audio;l.dataset||(l.dataset={}),l.dataset.name=this.key+("0"+i).slice(-2),l.dataset.used="false",this.locked?l.dataset.locked="true":(l.dataset.locked="false",l.preload="auto",l.oncanplaythrough=this.onProgress.bind(this),l.onerror=this.onError.bind(this)),this.data.push(l)}for(i=0;i<this.data.length;i++)l=this.data[i],l.src=r(this,this.loader.baseURL),this.locked||l.load();this.locked&&setTimeout(this.onLoad.bind(this))}});c.exports=s},88470:(c,x,t)=>{/**
3541 * @author       Richard Davey <[email protected]>
3542 * @copyright    2013-2025 Phaser Studio Inc.
3543 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3544 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d){var f="html";if(e(l)){var v=l;l=r(v,"key"),u=r(v,"url"),d=r(v,"xhrSettings"),f=r(v,"extension",f)}var m={type:"text",cache:i.cacheManager.html,extension:f,responseType:"text",key:l,url:u,xhrSettings:d};a.call(this,i,m)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLo
3544ader.responseText,this.onProcessComplete()}});n.register("html",function(h,i,l){if(Array.isArray(h))for(var u=0;u<h.length;u++)this.addFile(new s(this,h[u]));else this.addFile(new s(this,h,i,l));return this}),c.exports=s},14643:(c,x,t)=>{/**
3545 * @author       Richard Davey <[email protected]>
3546 * @copyright    2013-2025 Phaser Studio Inc.
3547 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3548 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d,f,v){d===void 0&&(d=512),f===void 0&&(f=512);var m="html";if(e(l)){var y=l;l=r(y,"key"),u=r(y,"url"),v=r(y,"xhrSettings"),m=r(y,"extension",m),d=r(y,"width",d),f=r(y,"height",f)}var g={type:"html",cache:i.textureManager,extension:m,responseType:"text",key:l,url:u,xhrSettings:v,config:{width:d,height:f}};a.call(this,i,g)},onProcess:function(){this.state=p.FILE_PROCESSING;var h=this.config.width,i=this.config.height,l=[];l.push('<svg width="'+h+'px" height="'+i+'px" viewBox="0 0 '+h+" "+i+'" xmlns="http://www.w3.org/2000/svg">'),l.push('<foreignObject width="100%" height="100%">'),l.push('<body xmlns="http://www.w3.org/1999/xhtml">'),l.push(this.xhrLoader.responseText),l.push("</body>"),l.push("</foreignObject>"),l.push("</svg>");var u=[l.join(`
3549`)],d=this;try{var f=new window.Blob(u,{type:"image/svg+xml;charset=utf-8"})}catch{d.state=p.FILE_ERRORED,d.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){a.revokeObjectURL(d.data),d.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(d.data),d.onProcessError()},a.createObjectURL(this.data,f,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});n.register("htmlTexture",function(h,i,l,u,d){if(Array.isArray(h))for(var f=0;f<h.length;f++)this.addFile(new s(this,h[f]));else this.addFile(new s(this,h,i,l,u,d));return this}),c.exports=s},19550:(c,x,t)=>{/**
3550 * @author       Richard Davey <[email protected]>
3551 * @copyright    2013-2025 Phaser Studio Inc.
3552 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3553 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=t(98356),h=new o({Extends:a,initialize:function i(l,u,d,f,v){var m="png",y;if(e(u)){var g=u;u=r(g,"key"),d=r(g,"url"),y=r(g,"normalMap"),f=r(g,"xhrSettings"),m=r(g,"extension",m),v=r(g,"frameConfig")}Array.isArray(d)&&(y=d[1],d=d[0]);var T={type:"image",cache:l.textureManager,extension:m,responseType:"blob",key:u,url:d,xhrSettings:f,config:v};if(a.call(this,l,T),y){var S=new i(l,this.key,y,f,v);S.type="normalMap",this.setLink(S),l.addFile(S)}this.useImageElementLoad=l.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=p.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()}
3553,a.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=p.FILE_PROCESSING,i===p.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=p.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=p.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>=p.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)}});n.register("image",function(i,l,u){if(Array.isArray(i))for(var d=0;d<i.length;d++)this.addFile(new h(this,i[d]));else this.addFile(new h(this,i,l,u));return this}),c.exports=h},518:(c,x,t)=>{/**
3554 * @author       Richard Davey <[email protected]>
3555 * @copyright    2013-2025 Phaser Studio Inc.
3556 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3557 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(35154),s=t(41212),h=new o({Extends:a,initialize:function(l,u,d,f,v){var m="json";if(s(u)){var y=u;u=r(y,"key"),d=r(y,"url"),f=r(y,"xhrSettings"),m=r(y,"extension",m),v=r(y,"dataKey",v)}var g={type:"json",cache:l.cacheManager.json,extension:m,responseType:"text",key:u,url:d,xhrSettings:f,config:v};a.call(this,l,g),s(d)&&(v?this.data=e(d,v):this.data=d,this.state=p.FILE_POPULATED)},onProcess:function(){if(this.state!==p.FILE_POPULATED){this.state=p.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(u){throw this.onProcessError(),u}var l=this.config;typeof l=="string"?this.data=e(i,l,i):this.data=i}this.onProcessComplete()}});n.register("json",function(i,l,u,d){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new h(this,i[f]));else this.addFile(new h(this,i,l,d,u));return this}),c.exports=h},59327:(c,x,t)=>{/**
3558 * @author       Richard Davey <[email protected]>
3559 * @copyright    2013-2025 Phaser Studio Inc.
3560 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3561 */var o=t(83419),p=t(74099),a=t(95540),n=t(19550),r=t(41212),e=t(518),s=t(26430),h=new o({Extends:s,initialize:function(l,u,d,f,v,m,y){if(r(u)){var g=u;u=a(g,"key"),a(g,"url",!1)?d=a(g,"url"):d=a(g,"atlasURL"),m=a(g,"xhrSettings"),f=a(g,"path"),v=a(g,"baseURL"),y=a(g,"textureXhrSettings")}var T=new e(l,u,d,m);s.call(this,l,"multiatlas",u,[T]),this.config.path=f,this.config.baseURL=v,this.config.textureXhrSettings=y},onFileComplete:function(i){var l=this.files.indexOf(i);if(l!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var u=i.data.textures,d=this.config,f=this.loader,v=f.baseURL,m=f.path,y=f.prefix,g=a(d,"baseURL",this.baseURL),T=a(d,"path",this.path),S=a(d,"prefix",this.prefix),E=a(d,"textureXhrSettings");f.setBaseURL(g),f.setPath(T),f.setPrefix(S);for(var M=0;M<u.length;M++){var F=u[M].image,A="MA"+this.multiKeyIndex+"_"+F,P=new n(f,A,F,E);if(this.addToMultiFile(P),f.addFile(P),u[M].normalMap){var L=new n(f,A,u[M].normalMap,E);L.type="normalMap",P.setLink(L),this.addToMultiFile(L),f.addFile(L)}}f.setBaseURL(v),f.setPath(m),f.setPrefix(y)}},addToCache:function(){if(this.isReadyToProcess()){for(var i=this.files[0],l=[],u=[],d=[],f=1;f<this.files.length;f++){var v=this.files[f];if(v.type!=="normalMap")for(var m=v.key.indexOf("_"),y=v.key.substr(m+1),g=v.data,T=0;T<i.data.textures.length;T++){var S=i.data.textures[T];if(S.image===y){u.push(g),l.push(S),v.linkFile&&d.push(v.linkFile.data);break}}}d.length===0&&(d=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,u,l,d),this.complete=!0}}});p.register("multiatlas",function(i,l,u,d,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new h(this,i[m]),this.addFile(v.files);else v=new h(this,i,l,u,d,f),this.addFile(v.files);return this}),c.exports=h},99297:(c,x,t)=>{/**
3562 * @author       Richard Davey <[email protected]>
3563 * @copyright    2013-2025 Phaser Studio Inc.
3564 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3565 */var o=t(83419),p=t(74099),a=t(95540),n=t(41212),r=t(26430),e=t(34328),s=new o({Extends:r,initialize:function(i,l,u,d){var f="js",v=[];if(n(l)){var m=l;l=a(m,"key"),u=a(m,"url"),d=a(m,"xhrSettings"),f=a(m,"extension",f)}Array.isArray(u)||(u=[u]);for(var y=0;y<u.length;y++){var g=new e(i,{key:l+"_"+y.toString(),url:u[y],extension:f,xhrSettings:d});g.onProcess=function(){this.onProcessComplete()},v.push(g)}r.call(this,i,"scripts",l,v)},addToCache:function(){if(this.isReadyToProcess()){for(var h=0;h<this.files.length;h++){var i=this.files[h];i.data=document.createElement("script"),i.data.language="javascript",i.data.type="text/javascript",i.data.defer=!1,i.data.text=i.xhrLoader.responseText,document.head.appendChild(i.data)}this.complete=!0}}});p.register("scripts",function(h,i,l){var u;if(Array.isArray(h))for(var d=0;d<h.length;d++)u=new s(this,h[d]),this.addFile(u.files);else u=new s(this,h,i,l),this.addFile(u.files);return this}),c.exports=s},41846:(c,x,t)=>{/**
3566 * @author       Richard Davey <[email protected]>
3567 * @copyright    2013-2025 Phaser Studio Inc.
3568 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3569 */var o=t(83419),p=t(74099),a=t(95540),n=t(41212),r=t(26430),e=t(85048),s=t(61485),h=t(78776),i=new o({Extends:r,initialize:function(u,d,f,v,m,y){var g,T,S=u.cacheManager.obj;if(n(d)){var E=d;d=a(E,"key"),g=new h(u,{key:d,type:"obj",cache:S,url:a(E,"url"),extension:a(E,"extension","obj"),xhrSettings:a(E,"xhrSettings"),config:{flipUV:a(E,"flipUV",m)}}),v=a(E,"matURL"),v&&(T=new h(u,{key:d,type:"mat",cache:S,url:v,extension:a(E,"matExtension","mat"),xhrSettings:a(E,"xhrSettings")}))}else g=new h(u,{key:d,url:f,type:"obj",cache:S,extension:"obj",xhrSettings:y,config:{flipUV:m}}),v&&(T=new h(u,{key:d,url:v,type:"mat",cache:S,extension:"mat",x
vendor: 14,409 bytes, lines 3569-3627
3569hrSettings:y}));r.call(this,u,"obj",d,[g,T])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],u=this.files[1],d=e(l.data,l.config.flipUV);u&&(d.materials=s(u.data)),l.cache.add(l.key,d),this.complete=!0}}});p.register("obj",function(l,u,d,f,v){var m;if(Array.isArray(l))for(var y=0;y<l.length;y++)m=new i(this,l[y]),this.addFile(m.files);else m=new i(this,l,u,d,f,v),this.addFile(m.files);return this}),c.exports=i},58610:(c,x,t)=>{/**
3570 * @author       Richard Davey <[email protected]>
3571 * @copyright    2013-2025 Phaser Studio Inc.
3572 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3573 */var o=t(83419),p=t(23906),a=t(74099),n=t(518),r=new o({Extends:n,initialize:function(s,h,i,l,u){n.call(this,s,h,i,l,u),this.type="packfile"},onProcess:function(){if(this.state!==p.FILE_POPULATED&&(this.state=p.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 l=0;l<e.length;l++)this.addFile(new r(this,e[l]));else this.addFile(new r(this,e,s,i,h));return this}),c.exports=r},48988:(c,x,t)=>{/**
3574 * @author       Richard Davey <[email protected]>
3575 * @copyright    2013-2025 Phaser Studio Inc.
3576 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3577 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d,f,v){var m="js";if(e(l)){var y=l;l=r(y,"key"),u=r(y,"url"),v=r(y,"xhrSettings"),m=r(y,"extension",m),d=r(y,"start"),f=r(y,"mapping")}var g={type:"plugin",cache:!1,extension:m,responseType:"text",key:l,url:u,xhrSettings:v,config:{start:d,mapping:f}};a.call(this,i,g),typeof u=="function"&&(this.data=u,this.state=p.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,i=this.config,l=r(i,"start",!1),u=r(i,"mapping",null);if(this.state===p.FILE_POPULATED)h.install(this.key,this.data,l,u);else{this.state=p.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 d=h.install(this.key,window[this.key],l,u);(l||u)&&(this.loader.systems[u]=d,this.loader.scene[u]=d)}this.onProcessComplete()}});n.register("plugin",function(h,i,l,u,d){if(Array.isArray(h))for(var f=0;f<h.length;f++)this.addFile(new s(this,h[f]));else this.addFile(new s(this,h,i,l,u,d));return this}),c.exports=s},67397:(c,x,t)=>{/**
3578 * @author       Richard Davey <[email protected]>
3579 * @copyright    2013-2025 Phaser Studio Inc.
3580 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3581 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d,f){var v="svg";if(e(l)){var m=l;l=r(m,"key"),u=r(m,"url"),d=r(m,"svgConfig",{}),f=r(m,"xhrSettings"),v=r(m,"extension",v)}var y={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:l,url:u,xhrSettings:f,config:{width:r(d,"width"),height:r(d,"height"),scale:r(d,"scale")}};a.call(this,i,y)},onProcess:function(){this.state=p.FILE_PROCESSING;var h=this.xhrLoader.responseText,i=[h],l=this.config.width,u=this.config.height,d=this.config.scale;t:if(l&&u||d){var f=null,v=new DOMParser;f=v.parseFromString(h,"text/xml");var m=f.getElementsByTagName("svg")[0],y=m.hasAttribute("viewBox"),g=parseFloat(m.getAttribute("width")),T=parseFloat(m.getAttribute("height"));if(!y&&g&&T)m.setAttribute("viewBox","0  0 "+g+" "+T);else if(y&&!g&&!T){var S=m.getAttribute("viewBox").split(/\s+|,/);g=S[2],T=S[3]}if(d)if(g&&T)l=g*d,u=T*d;else break t;m.setAttribute("width",l.toString()+"px"),m.setAttribute("height",u.toString()+"px"),i=[new XMLSerializer().serializeToString(m)]}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 M=this,F=!1;this.data.onload=function(){F||a.revokeObjectURL(M.data),M.onProcessComplete()},this.data.onerror=function(){F?M.onProcessError():(F=!0,a.revokeObjectURL(M.data),M.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)}});n.register("svg",function(h,i,l,u){if(Array.isArray(h))for(var d=0;d<h.length;d++)this.addFile(new s(this,h[d]));else this.addFile(new s(this,h,i,l,u));return this}),c.exports=s},88423:(c,x,t)=>{/**
3582 * @author       Richard Davey <[email protected]>
3583 * @copyright    2013-2025 Phaser Studio Inc.
3584 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3585 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d){var f="js";if(e(l)){var v=l;l=r(v,"key"),u=r(v,"url"),d=r(v,"xhrSettings"),f=r(v,"extension",f)}var m={type:"text",extension:f,responseType:"text",key:l,url:u,xhrSettings:d};a.call(this,i,m)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var h=this.data.concat(`(function(){
3586return new `+this.key+`();
3587}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(h)),this.complete=!0}});n.register("sceneFile",function(h,i,l){if(Array.isArray(h))for(var u=0;u<h.length;u++)this.addFile(new s(this,h[u]));else this.addFile(new s(this,h,i,l));return this}),c.exports=s},56812:(c,x,t)=>{/**
3588 * @author       Richard Davey <[email protected]>
3589 * @copyright    2013-2025 Phaser Studio Inc.
3590 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3591 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d,f,v){var m="js";if(e(l)){var y=l;l=r(y,"key"),u=r(y,"url"),v=r(y,"xhrSettings"),m=r(y,"extension",m),d=r(y,"systemKey"),f=r(y,"sceneKey")}var g={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:l,url:u,xhrSettings:v,config:{systemKey:d,sceneKey:f}};a.call(this,i,g),typeof u=="function"&&(this.data=u,this.state=p.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,i=this.config,l=this.key,u=r(i,"systemKey",l),d=r(i,"sceneKey",l);this.state===p.FILE_POPULATED?h.installScenePlugin(u,this.data,d,this.loader.scene,!0):(this.state=p.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(u,window[this.key],d,this.loader.scene,!0)),this.onProcessComplete()}});n.register("scenePlugin",function(h,i,l,u,d){if(Array.isArray(h))for(var f=0;f<h.length;f++)this.addFile(new s(this,h[f]));else this.addFile(new s(this,h,i,l,u,d));return this}),c.exports=s},34328:(c,x,t)=>{/**
3592 * @author       Richard Davey <[email protected]>
3593 * @copyright    2013-2025 Phaser Studio Inc.
3594 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3595 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d,f){var v="js";if(e(l)){var m=l;l=r(m,"key"),u=r(m,"url"),d=r(m,"type","script"),f=r(m,"xhrSettings"),v=r(m,"extension",v)}else d===void 0&&(d="script");var y={type:d,cache:!1,extension:v,responseType:"text",key:l,url:u,xhrSettings:f};a.call(this,i,y)},onProcess:function(){this.state=p.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()}});n.register("script",function(h,i,l,u){if(Array.isArray(h))for(var d=0;d<h.length;d++)this.addFile(new s(this,h[d]));else this.addFile(new s(this,h,i,l,u));return this}),c.exports=s},85035:(c,x,t)=>{/**
3596 * @author       Richard Davey <[email protected]>
3597 * @copyright    2013-2025 Phaser Studio Inc.
3598 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3599 */var o=t(83419),p=t(23906),a=t(74099),n=t(19550),r=new o({Extends:n,initialize:function(s,h,i,l,u){n.call(this,s,h,i,u,l),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=p.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 l=0;l<e.length;l++)this.addFile(new r(this,e[l]));else this.addFile(new r(this,e,s,h,i));return this}),c.exports=r},78776:(c,x,t)=>{/**
3600 * @author       Richard Davey <[email protected]>
3601 * @copyright    2013-2025 Phaser Studio Inc.
3602 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3603 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=new o({Extends:a,initialize:function(i,l,u,d){var f="text",v="txt",m=i.cacheManager.text;if(e(l)){var y=l;l=r(y,"key"),u=r(y,"url"),d=r(y,"xhrSettings"),v=r(y,"extension",v),f=r(y,"type",f),m=r(y,"cache",m)}var g={type:f,cache:m,extension:v,responseType:"text",key:l,url:u,xhrSettings:d};a.call(this,i,g)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});n.register("text",function(h,i,l){if(Array.isArray(h))for(var u=0;u<h.length;u++)this.addFile(new s(this,h[u]));else this.addFile(new s(this,h,i,l));return this}),c.exports=s},49477:(c,x,t)=>{/**
3604 * @author       Richard Davey <[email protected]>
3605 * @copyright    2013-2025 Phaser Studio Inc.
3606 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3607 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=t(80341),h=new o({Extends:a,initialize:function(l,u,d,f){var v="csv";if(e(u)){var m=u;u=r(m,"key"),d=r(m,"url"),f=r(m,"xhrSettings"),v=r(m,"extension",v)}var y={type:"tilemapCSV",cache:l.cacheManager.tilemap,extension:v,responseType:"text",key:u,url:d,xhrSettings:f};a.call(this,l,y),this.tilemapFormat=s.CSV},onProcess:function(){this.state=p.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)}});n.register("tilemapCSV",function(i,l,u){if(Array.isArray(i))for(var d=0;d<i.length;d++)this.addFile(new h(this,i[d]));else this.addFile(new h(this,i,l,u));return this}),c.exports=h},40807:(c,x,t)=>{/**
3608 * @author       Richard Davey <[email protected]>
3609 * @copyright    2013-2025 Phaser Studio Inc.
3610 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3611 */var o=t(83419),p=t(74099),a=t(518),n=t(80341),r=new o({Extends:a,initialize:function(s,h,i,l){a.call(this,s,h,i,l),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:n.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});p.register("tilemapImpact",function(e,s,h){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new r(this,e[i]));else this.addFile(new r(this,e,s,h));return this}),c.exports=r},56775:(c,x,t)=>{/**
3612 * @author       Richard Davey <[email protected]>
3613 * @copyright    2013-2025 Phaser Studio Inc.
3614 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3615 */var o=t(83419),p=t(74099),a=t(518),n=t(80341),r=new o({Extends:a,initialize:function(s,h,i,l){a.call(this,s,h,i,l),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:n.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});p.register("tilemapTiledJSON",function(e,s,h){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new r(this,e[i]));else this.addFile(new r(this,e,s,h));return this}),c.exports=r},25771:(c,x,t)=>{/**
3616 * @author       Richard Davey <[email protected]>
3617 * @copyright    2013-2025 Phaser Studio Inc.
3618 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3619 */var o=t(83419),p=t(74099),a=t(95540),n=t(19550),r=t(41212),e=t(26430),s=t(78776),h=new o({Extends:e,initialize:function(l,u,d,f,v,m){var y,g;if(r(u)){var T=u;u=a(T,"key"),y=new n(l,{key:u,url:a(T,"textureURL"),extension:a(T,"textureExtension","png"),normalMap:a(T,"normalMap"),xhrSettings:a(T,"textureXhrSettings")}),g=new s(l,{key:u,url:a(T,"atlasURL"),extension:a(T,"atlasExtension","txt"),xhrSettings:a(T,"atlasXhrSettings")})}else y=new n(l,u,d,v),g=new s(l,u,f,m);y.linkFile?e.call(this,l,"unityatlas",u,[y,g,y.linkFile]):e.call(this,l,"unityatlas",u,[y,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],l=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,l.data,u),this.complete=!0}}});p.register("unityAtlas",function(i,l,u,d,f){var v;if(Array.isArray(i))for(var m=0;m<i.length;m++)v=new h(this,i[m]),this.addFile(v.files);else v=new h(this,i,l,u,d,f),this.addFile(v.files);return this}),c.exports=h},33720:(c,x,t)=>{/**
3620 * @author       Richard Davey <[email protected]>
3621 * @copyright    2013-2025 Phaser Studio Inc.
3622 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3623 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(98356),e=t(95540),s=t(41212),h=new o({Extends:a,initialize:function(l,u,d,f){if(f===void 0&&(f=!1),s(u)){var v=u;u=e(v,"key"),d=e(v,"url",[]),f=e(v,"noAudio",!1)}var m=l.systems.game.device.video.getVideoURL(d);m||console.warn("VideoFile: No supported format for "+u);var y={type:"video",cache:l.cacheManager.video,extension:m.type,key:u,url:m.url,config:{noAudio:f}};a.call(this,l,y)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=r(this,this.loader.baseURL),this.state=p.FILE_LOADED,this.loader.nextFile(this,!0)}});n.register("video",function(i,l,u){if(Array.isArray(i))for(var d=0;d<i.length;d++)this.addFile(new h(this,i[d]));else this.addFile(new h(this,i,l,u));return this}),c.exports=h},57318:(c,x,t)=>{/**
3624 * @author       Richard Davey <[email protected]>
3625 * @copyright    2013-2025 Phaser Studio Inc.
3626 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3627 */var o=t(83419),p=t(23906),a=t(41299),n=t(74099),r=t(95540),e=t(41212),s=t(5683
36276),h=new o({Extends:a,initialize:function(l,u,d,f){var v="xml";if(e(u)){var m=u;u=r(m,"key"),d=r(m,"url"),f=r(m,"xhrSettings"),v=r(m,"extension",v)}var y={type:"xml",cache:l.cacheManager.xml,extension:v,responseType:"text",key:u,url:d,xhrSettings:f};a.call(this,l,y)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=s(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});n.register("xml",function(i,l,u){if(Array.isArray(i))for(var d=0;d<i.length;d++)this.addFile(new h(this,i[d]));else this.addFile(new h(this,i,l,u));return this}),c.exports=h},64589:(c,x,t)=>{/**
3628 * @author       Richard Davey <[email protected]>
3629 * @copyright    2013-2025 Phaser Studio Inc.
3630 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3631 */c.exports={AnimationJSONFile:t(14135),AsepriteFile:t(76272),AtlasJSONFile:t(38734),AtlasXMLFile:t(74599),AudioFile:t(21097),AudioSpriteFile:t(89524),BinaryFile:t(85722),BitmapFontFile:t(97025),CompressedTextureFile:t(69559),CSSFile:t(16024),FontFile:t(87674),GLSLFile:t(47931),HTML5AudioFile:t(89749),HTMLFile:t(88470),HTMLTextureFile:t(14643),ImageFile:t(19550),JSONFile:t(518),MultiAtlasFile:t(59327),MultiScriptFile:t(99297),OBJFile:t(41846),PackFile:t(58610),PluginFile:t(48988),SceneFile:t(88423),ScenePluginFile:t(56812),ScriptFile:t(34328),SpriteSheetFile:t(85035),SVGFile:t(67397),TextFile:t(78776),TilemapCSVFile:t(49477),TilemapImpactFile:t(40807),TilemapJSONFile:t(56775),UnityAtlasFile:t(25771),VideoFile:t(33720),XMLFile:t(57318)}},57777:(c,x,t)=>{/**
3632 * @author       Richard Davey <[email protected]>
3633 * @copyright    2013-2025 Phaser Studio Inc.
3634 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3635 */var o=t(23906),p=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=p(!1,a,o),c.exports=a},53307:c=>{/**
3636 * @author       Richard Davey <[email protected]>
3637 * @copyright    2013-2025 Phaser Studio Inc.
3638 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3639 */var x=function(t){for(var o=0,p=0;p<t.length;p++)o+=+t[p];return o/t.length};c.exports=x},85710:(c,x,t)=>{/**
3640 * @author       Richard Davey <[email protected]>
3641 * @copyright    2013-2025 Phaser Studio Inc.
3642 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3643 */var o=t(6411),p=function(a,n){return o(a)/o(n)/o(a-n)};c.exports=p},30976:c=>{/**
3644 * @author       Richard Davey <[email protected]>
3645 * @copyright    2013-2025 Phaser Studio Inc.
3646 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3647 */var x=function(t,o){return Math.floor(Math.random()*(o-t+1)+t)};c.exports=x},87842:c=>{/**
3648 * @author       Richard Davey <[email protected]>
3649 * @copyright    2013-2025 Phaser Studio Inc.
3650 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3651 */var x=function(t,o,p,a,n){var r=(a-o)*.5,e=(n-p)*.5,s=t*t,h=t*s;return(2*p-2*a+r+e)*h+(-3*p+3*a-2*r-e)*s+r*t+p};c.exports=x},26302:c=>{/**
3652 * @author       Richard Davey <[email protected]>
3653 * @copyright    2013-2025 Phaser Studio Inc.
3654 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3655 */var x=function(t,o,p){o===void 0&&(o=0),p===void 0&&(p=10);var a=Math.pow(p,-o);return Math.ceil(t*a)/a};c.exports=x},45319:c=>{/**
3656 * @author       Richard Davey <[email protected]>
3657 * @copyright    2013-2025 Phaser Studio Inc.
3658 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3659 */var x=function(t,o,p){return Math.max(o,Math.min(p,t))};c.exports=x},39506:(c,x,t)=>{/**
3660 * @author       Richard Davey <[email protected]>
3661 * @copyright    2013-2025 Phaser Studio Inc.
3662 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3663 */var o=t(36383),p=function(a){return a*o.DEG_TO_RAD};c.exports=p},61241:c=>{/**
3664 * @author       Richard Davey <[email protected]>
3665 * @copyright    2013-2025 Phaser Studio Inc.
3666 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3667 */var x=function(t,o){return Math.abs(t-o)};c.exports=x},38857:(c,x,t)=>{/**
3668 * @author       Richard Davey <[email protected]>
3669 * @copyright    2013-2025 Phaser Studio Inc.
3670 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3671 */var o=t(45319),p=t(83419),a=t(37867),n=t(29747),r=new a,e=new p({initialize:function s(h,i,l,u){h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u=s.DefaultOrder),this._x=h,this._y=i,this._z=l,this._order=u,this.onChangeCallback=n},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,l){return l===void 0&&(l=this._order),this._x=s,this._y=h,this._z=i,this._order=l,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),r.fromQuat(s),this.setFromRotationMatrix(r,h,i)},setFromRotationMatrix:function(s,h,i){h===void 0&&(h=this._order),i===void 0&&(i=!1);var l=s.val,u=l[0],d=l[4],f=l[8],v=l[1],m=l[5],y=l[9],g=l[2],T=l[6],S=l[10],E=0,M=0,F=0,A=.99999;switch(h){case"XYZ":{M=Math.asin(o(f,-1,1)),Math.abs(f)<A?(E=Math.atan2(-y,S),F=Math.atan2(-d,u)):E=Math.atan2(T,m);break}
3671case"YXZ":{E=Math.asin(-o(y,-1,1)),Math.abs(y)<A?(M=Math.atan2(f,S),F=Math.atan2(v,m)):M=Math.atan2(-g,u);break}case"ZXY":{E=Math.asin(o(T,-1,1)),Math.abs(T)<A?(M=Math.atan2(-g,S),F=Math.atan2(-d,m)):F=Math.atan2(v,u);break}case"ZYX":{M=Math.asin(-o(g,-1,1)),Math.abs(g)<A?(E=Math.atan2(T,S),F=Math.atan2(v,u)):F=Math.atan2(-d,m);break}case"YZX":{F=Math.asin(o(v,-1,1)),Math.abs(v)<A?(E=Math.atan2(-y,m),M=Math.atan2(-g,u)):M=Math.atan2(f,S);break}case"XZY":{F=Math.asin(-o(d,-1,1)),Math.abs(d)<A?(E=Math.atan2(T,m),M=Math.atan2(f,u)):E=Math.atan2(-y,S);break}}return this._x=E,this._y=M,this._z=F,this._order=h,i&&this.onChangeCallback(this),this}});e.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],e.DefaultOrder="XYZ",c.exports=e},6411:c=>{/**
3672 * @author       Richard Davey <[email protected]>
3673 * @copyright    2013-2025 Phaser Studio Inc.
3674 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3675 */var x=function(t){if(t===0)return 1;for(var o=t;--t;)o*=t;return o};c.exports=x},99472:c=>{/**
3676 * @author       Richard Davey <[email protected]>
3677 * @copyright    2013-2025 Phaser Studio Inc.
3678 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3679 */var x=function(t,o){return Math.random()*(o-t)+t};c.exports=x},77623:c=>{/**
3680 * @author       Richard Davey <[email protected]>
3681 * @copyright    2013-2025 Phaser Studio Inc.
3682 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3683 */var x=function(t,o,p){o===void 0&&(o=0),p===void 0&&(p=10);var a=Math.pow(p,-o);return Math.floor(t*a)/a};c.exports=x},62945:(c,x,t)=>{/**
3684 * @author       Richard Davey <[email protected]>
3685 * @copyright    2013-2025 Phaser Studio Inc.
3686 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3687 */var o=t(45319),p=function(a,n,r){return a=o(a,0,1),(r-n)*a+n};c.exports=p},38265:c=>{/**
3688 * @author       Richard Davey <[email protected]>
3689 * @copyright    2013-2025 Phaser Studio Inc.
3690 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3691 */var x=function(t,o){return t/o/1e3};c.exports=x},78702:c=>{/**
3692 * @author       Richard Davey <[email protected]>
3693 * @copyright    2013-2025 Phaser Studio Inc.
3694 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3695 */var x=function(t){return t==parseFloat(t)?!(t%2):void 0};c.exports=x},94883:c=>{/**
3696 * @author       Richard Davey <[email protected]>
3697 * @copyright    2013-2025 Phaser Studio Inc.
3698 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3699 */var x=function(t){return t===parseFloat(t)?!(t%2):void 0};c.exports=x}
vendor: 10,341 bytes, lines 3699-3715
3699,28915:c=>{/**
3700 * @author       Richard Davey <[email protected]>
3701 * @copyright    2013-2025 Phaser Studio Inc.
3702 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3703 */var x=function(t,o,p){return(o-t)*p+t};c.exports=x},94908:c=>{/**
3704 * @author       Greg McLean <GregDevProjects>
3705 * @copyright    2021 Photon Storm Ltd.
3706 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3707 */var x=function(t,o,p){return p===void 0&&(p=0),t.clone().lerp(o,p)};c.exports=x},94434:(c,x,t)=>{/**
3708 * @author       Richard Davey <[email protected]>
3709 * @copyright    2013-2025 Phaser Studio Inc.
3710 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3711 */var o=t(83419),p=new o({initialize:function(n){this.val=new Float32Array(9),n?this.copy(n):this.identity()},clone:function(){return new p(this)},set:function(a){return this.copy(a)},copy:function(a){var n=this.val,r=a.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this},fromMat4:function(a){var n=a.val,r=this.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[4],r[4]=n[5],r[5]=n[6],r[6]=n[8],r[7]=n[9],r[8]=n[10],this},fromArray:function(a){var n=this.val;return n[0]=a[0],n[1]=a[1],n[2]=a[2],n[3]=a[3],n[4]=a[4],n[5]=a[5],n[6]=a[6],n[7]=a[7],n[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,n=a[1],r=a[2],e=a[5];return a[1]=a[3],a[2]=a[6],a[3]=n,a[5]=a[7],a[6]=r,a[7]=e,this},invert:function(){var a=this.val,n=a[0],r=a[1],e=a[2],s=a[3],h=a[4],i=a[5],l=a[6],u=a[7],d=a[8],f=d*h-i*u,v=-d*s+i*l,m=u*s-h*l,y=n*f+r*v+e*m;return y?(y=1/y,a[0]=f*y,a[1]=(-d*r+e*u)*y,a[2]=(i*r-e*h)*y,a[3]=v*y,a[4]=(d*n-e*l)*y,a[5]=(-i*n+e*s)*y,a[6]=m*y,a[7]=(-u*n+r*l)*y,a[8]=(h*n-r*s)*y,this):null},adjoint:function(){var a=this.val,n=a[0],r=a[1],e=a[2],s=a[3],h=a[4],i=a[5],l=a[6],u=a[7],d=a[8];return a[0]=h*d-i*u,a[1]=e*u-r*d,a[2]=r*i-e*h,a[3]=i*l-s*d,a[4]=n*d-e*l,a[5]=e*s-n*i,a[6]=s*u-h*l,a[7]=r*l-n*u,a[8]=n*h-r*s,this},determinant:function(){var a=this.val,n=a[0],r=a[1],e=a[2],s=a[3],h=a[4],i=a[5],l=a[6],u=a[7],d=a[8];return n*(d*h-i*u)+r*(-d*s+i*l)+e*(u*s-h*l)},multiply:function(a){var n=this.val,r=n[0],e=n[1],s=n[2],h=n[3],i=n[4],l=n[5],u=n[6],d=n[7],f=n[8],v=a.val,m=v[0],y=v[1],g=v[2],T=v[3],S=v[4],E=v[5],M=v[6],F=v[7],A=v[8];return n[0]=m*r+y*h+g*u,n[1]=m*e+y*i+g*d,n[2]=m*s+y*l+g*f,n[3]=T*r+S*h+E*u,n[4]=T*e+S*i+E*d,n[5]=T*s+S*l+E*f,n[6]=M*r+F*h+A*u,n[7]=M*e+F*i+A*d,n[8]=M*s+F*l+A*f,this},translate:function(a){var n=this.val,r=a.x,e=a.y;return n[6]=r*n[0]+e*n[3]+n[6],n[7]=r*n[1]+e*n[4]+n[7],n[8]=r*n[2]+e*n[5]+n[8],this},rotate:function(a){var n=this.val,r=n[0],e=n[1],s=n[2],h=n[3],i=n[4],l=n[5],u=Math.sin(a),d=Math.cos(a);return n[0]=d*r+u*h,n[1]=d*e+u*i,n[2]=d*s+u*l,n[3]=d*h-u*r,n[4]=d*i-u*e,n[5]=d*l-u*s,this},scale:function(a){var n=this.val,r=a.x,e=a.y;return n[0]=r*n[0],n[1]=r*n[1],n[2]=r*n[2],n[3]=e*n[3],n[4]=e*n[4],n[5]=e*n[5],this},fromQuat:function(a){var n=a.x,r=a.y,e=a.z,s=a.w,h=n+n,i=r+r,l=e+e,u=n*h,d=n*i,f=n*l,v=r*i,m=r*l,y=e*l,g=s*h,T=s*i,S=s*l,E=this.val;return E[0]=1-(v+y),E[3]=d+S,E[6]=f-T,E[1]=d-S,E[4]=1-(u+y),E[7]=m+g,E[2]=f+T,E[5]=m-g,E[8]=1-(u+v),this},normalFromMat4:function(a){var n=a.val,r=this.val,e=n[0],s=n[1],h=n[2],i=n[3],l=n[4],u=n[5],d=n[6],f=n[7],v=n[8],m=n[9],y=n[10],g=n[11],T=n[12],S=n[13],E=n[14],M=n[15],F=e*u-s*l,A=e*d-h*l,P=e*f-i*l,L=s*d-h*u,O=s*f-i*u,G=h*f-i*d,z=v*S-m*T,Y=v*E-y*T,X=v*M-g*T,I=m*E-y*S,U=m*M-g*S,D=y*M-g*E,V=F*D-A*U+P*I+L*X-O*Y+G*z;return V?(V=1/V,r[0]=(u*D-d*U+f*I)*V,r[1]=(d*X-l*D-f*Y)*V,r[2]=(l*U-u*X+f*z)*V,r[3]=(h*U-s*D-i*I)*V,r[4]=(e*D-h*X+i*Y)*V,r[5]=(s*X-e*U-i*z)*V,r[6]=(S*G-E*O+M*L)*V,r[7]=(E*P-T*G-M*A)*V,r[8]=(T*O-S*P+M*F)*V,this):null}});c.exports=p},37867:(c,x,t)=>{/**
3712 * @author       Richard Davey <[email protected]>
3713 * @copyright    2013-2025 Phaser Studio Inc.
3714 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3715 */var o=t(83419),p=t(25836),a=1e-6,n=new o({initialize:function(u){this.val=new Float32Array(16),u?this.copy(u):this.identity()},clone:function(){return new n(this)},set:function(l){return this.copy(l)},setValues:function(l,u,d,f,v,m,y,g,T,S,E,M,F,A,P,L){var O=this.val;return O[0]=l,O[1]=u,O[2]=d,O[3]=f,O[4]=v,O[5]=m,O[6]=y,O[7]=g,O[8]=T,O[9]=S,O[10]=E,O[11]=M,O[12]=F,O[13]=A,O[14]=P,O[15]=L,this},copy:function(l){var u=l.val;return this.setValues(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15])},fromArray:function(l){return this.setValues(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(l,u,d){var f=r.fromQuat(d),v=f.val,m=u.x,y=u.y,g=u.z;return this.setValues(v[0]*m,v[1]*m,v[2]*m,0,v[4]*y,v[5]*y,v[6]*y,0,v[8]*g,v[9]*g,v[10]*g,0,l.x,l.y,l.z,1)},xyz:function(l,u,d){this.identity();var f=this.val;return f[12]=l,f[13]=u,f[14]=d,this},scaling:function(l,u,d){this.zero();var f=this.val;return f[0]=l,f[5]=u,f[10]=d,f[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 l=this.val,u=l[1],d=l[2],f=l[3],v=l[6],m=l[7],y=l[11];return l[1]=l[4],l[2]=l[8],l[3]=l[12],l[4]=u,l[6]=l[9],l[7]=l[13],l[8]=d,l[9]=v,l[11]=l[14],l[12]=f,l[13]=m,l[14]=y,this},getInverse:function(l){return this.copy(l),this.invert()},invert:function(){var l=this.val,u=l[0],d=l[1],f=l[2],v=l[3],m=l[4],y=l[5],g=l[6],T=l[7],S=l[8],E=l[9],M=l[10],F=l[11],A=l[12],P=l[13],L=l[14],O=l[15],G=u*y-d*m,z=u*g-f*m,Y=u*T-v*m,X=d*g-f*y,I=d*T-v*y,U=f*T-v*g,D=S*P-E*A,V=S*L-M*A,B=S*O-F*A,W=E*L-M*P,K=E*O-F*P,J=M*O-F*L,Z=G*J-z*K+Y*W+X*B-I*V+U*D;return Z?(Z=1/Z,this.setValues((y*J-g*K+T*W)*Z,(f*K-d*J-v*W)*Z,(P*U-L*I+O*X)*Z,(M*I-E*U-F*X)*Z,(g*B-m*J-T*V)*Z,(u*J-f*B+v*V)*Z,(L*Y-A*U-O*z)*Z,(S*U-M*Y+F*z)*Z,(m*K-y*B+T*D)*Z,(d*B-u*K-v*D)*Z,(A*I-P*Y+O*G)*Z,(E*Y-S*I-F*G)*Z,(y*V-m*W-g*D)*Z,(u*W-d*V+f*D)*Z,(P*z-A*X-L*G)*Z,(S*X-E*z+M*G)*Z)):this},adjoint:function(){var l=this.val,u=l[0],d=l[1],f=l[2],v=l[3],m=l[4],y=l[5],g=l[6],T=l[7],S=l[8],E=l[9],M=l[10],F=l[11],A=l[12],P=l[13],L=l[14],O=l[15];return this.setValues(y*(M*O-F*L)-E*(g*O-T*L)+P*(g*F-T*M),-(d*(M*O-F*L)-E*(f*O-v*L)+P*(f*F-v*M)),d*(g*O-T*L)-y*(f*O-v*L)+P*(f*T-v*g),-(d*(g*F-T*M)-y*(f*F-v*M)+E*(f*T-v*g)),-(m*(M*O-F*L)-S*(g*O-T*L)+A*(g*F-T*M)),u*(M*O-F*L)-S*(f*O-v*L)+A*(f*F-v*M),-(u*(g*O-T*L)-m*(f*O-v*L)+A*(f*T-v*g)),u*(g*F-T*M)-m*(f*F-v*M)+S*(f*T-v*g),m*(E*O-F*P)-S*(y*O-T*P)+A*(y*F-T*E),-(u*(E*O-F*P)-S*(d*O-v*P)+A*(d*F-v*E)),u*(y*O-T*P)-m*(d*O-v*P)+A*(d*T-v*y),-(u*(y*F-T*E)-m*(d*F-v*E)+S*(d*T-v*y)),-(m*(E*L-M*P)-S*(y*L-g*P)+A*(y*M-g*E)),u*(E*L-M*P)-S*(d*L-f*P)+A*(d*M-f*E),-(u*(y*L-g*P)-m*(d*L-f*P)+A*(d*g-f*y)),u*(y*M-g*E)-m*(d*M-f*E)+S*(d*g-f*y))},determinant:function(){var l=this.val,u=l[0],d=l[1],f=l[2],v=l[3],m=l[4],y=l[5],g=l[6],T=l[7],S=l[8],E=l[9],M=l[10],F=l[11],A=l[12],P=l[13],L=l[14],O=l[15],G=u*y-d*m,z=u*g-f*m,Y=u*T-v*m,X=d*g-f*y,I=d*T-v*y,U=f*T-v*g,D=S*P-E*A,V=S*L-M*A,B=S*O-F*A,W=E*L-M*P,K=E*O-F*P,J=M*O-F*L;return G*J-z*K+Y*W+X*B-I*V+U*D},multiply:function(l){var u=this.val,d=u[0],f=u[1],v=u[2],m=u[3],y=u[4],g=u[5],T=u[6],S=u[7],E=u[8],M=u[9],F=u[10],A=u[11],P=u[12],L=u[13],O=u[14],G=u[15],z=l.val,Y=z[0],X=z[1],I=z[2],U=z[3];return u[0]=Y*d+X*y+I*E+U*P,u[1]=Y*f+X*g+I*M+U*L,u[2]=Y*v+X*T+I*F+U*O,u[3]=Y*m+X*S+I*A+U*G,Y=z[4],X=z[5],I=z[6],U=z[7],u[4]=Y*d+X*y+I*E+U*P,u[5]=Y*f+X*g+I*M+U*L,u[6]=Y*v+X*T+I*F+U*O,u[7]=Y*m+X*S+I*A+U*G,Y=z[8],X=z[9],I=z[10],U=z[11],u[8]=Y*d+X*y+I*E+U*P,u[9]=Y*f+X*g+I*M+U*L,u[10]=Y*v+X*T+I*F+U*O,u[11]=Y*m+X*S+I*A+U*G,Y=z[12],X=z[13],I=z[14],U=z[15],u[12]=Y*d+X*y+I*E+U*P,u[13]=Y*f+X*g+I*M+U*L,u[14]=Y*v+X*T+I*F+U*O,u[15]=Y*m+X*S+I*A+U*G,this},multiplyLocal:function(l){var u=this.val,d=l.val;return this.setValues(u[0]*d[0]+u[1]*d[4]+u[2]*d[8]+u[3]*d[12],u[0]*d[1]+u[1]*d[5]+u[2]*d[9]+u[3]*d[13],u[0]*d[2]+u[1]*d[6]+u[2]*d[10]+u[3]*d[14],u[0]*d[3]+u[1]*d[7]+u[2]*d[11]+u[3]*d[15],u[4]*d[0]+u[5]*d[4]+u[6]*d[8]+u[7]*d[12],u[4]*d[1]+u[5]*d[5]+u[6]*d[9]+u[7]*d[13],u[4]*d[2]+u[5]*d[6]+u[6]*d[10]+u[7]*d[14],u[4]*d[3]+u[5]*d[7]+u[6]*d[11]+u[7]*d[15],u[8]*d[0]+u[9]*d[4]+u[10]*d[8]+u[11]*d[12],u[8]*d[1]+u[9]*d[5]+u[10]*d[9]+u[11]*d[13],u[8]*d[2]+u[9]*d[6]+u[10]*d[10]+u[11]*d[14],u[8]*d[3]+u[9]*d[7]+u[10]*d[11]+u[11]*d[15],u[12]*d[0]+u[13]*d[4]+u[14]*d[8]+u[15]*d[12],u[12]*d[1]+u[13]*d[5]+u[14]*d[9]+u[15]*d[13],u[12]*d[2]+u[13]*d[6]+u[14]*d[10]+u[15]*d[14],u[12]*d[3]+u[13]*d[7]+u[14]*d[11]+u[15]*d[15])},premultiply:function(l){return this.multiplyMatrices(l,this)},multiplyMatrices:function(l,u){var d=l.val,f=u.val,v=d[0],m=d[4],y=d[8],g=d[12],T=d[1],S=d[5],E=d[9],M=d[13],F=d[2],A=d[6],P=d[10],L=d[14],O=d[3],G=d[7],z=d[11],Y=d[15],X=f[0],I=f[4],U=f[8],D=f[12],V=f[1],B=f[5],W=f[9],K=f[13],J=f[2],Z=f[6],j=f[10],k=f[14],_=f[3],q=f[7],et=f[11],nt=f[15];return this.setValues(v*X+m*V+y*J+g*_,T*X+S*V+E*J+M*_,F*X+A*V+P*J+L*_,O*X+G*V+z*J+Y*_,v*I+m*B+y*Z+g*q,T*I+S*B+E*Z+M*q,F*I+A*B+P*Z+L*q,O*I+G*B+z*Z+Y*q,v*U+m*W+y*j+g*et,T*U+S*W+E*j+M*et,F*U+A*W+P*j+L*et,O*U+G*W+z*j+Y*et,v*D+m*K+y*k+g*nt,T*D+S*K+E*k+M*nt,F*D+A*K+P*k+L*nt,O*D+G*K+z*k+Y*nt)},translate:function(l){return this.translateXYZ(l.x,l.y,l.z)},translateXYZ:function(l,u,d){var f=this.val;return f[12]=f[0]*l+f[4]*u+f[8]*d+f[12],f[13]=f[1]*l+f[5]*u+f[9]*d+f[13],f[14]=f[2]*l+f[6]*u+f[10]*d+f[14],f[15]=f[3]*l+f[7]*u+f[11]*d+f[15],this},scale:function(l){return this.scaleXYZ(l.x,l.y,l.z)},scaleXYZ:function(l,u,d){var f=this.val;return f[0]=f[0]*l,f[1]=f[1]*l,f[2]=f[2]*l,f[3]=f[3]*l,f[4]=f[4]*u,f[5]=f[5]*u,f[6]=f[6]*u,f[7]=f[7]*u,f[8]=f[8]*d,f[9]=f[9]*d,f[10]=f[10]*d,f[11]=f[11]*d,this},makeRotationAxis:function(l,u){var d=Math.cos(u),f=Math.sin(u),v=1-d,m=l.x,y=l.y,g=l.z,T=v*m,S=v*y;return this.setValues(T*m+d,T*y-f*g,T*g+f*y,0,T*y+f*g,S*y+d,S*g-f*m,0,T*g-f*y,S*g+f*m,v*g*g+d,0,0,0,0,1)},rotate:function(l,u){var d=this.val,f=u.x,v=u.y,m=u.z,y=Math.sqrt(f*f+v*v+m*m);if(Math.abs(y)<a)return this;y=1/y,f*=y,v*=y,m*=y;var g=Math.sin(l),T=Math.cos(l),S=1-T,E=d[0],M=d[1],F=d[2],A=d[3],P=d[4],L=d[5],O=d[6],G=d[7],z=d[8],Y=d[9],X=d[10],I=d[11],U=d[12],D=d[13],V=d[14],B=d[15],W=f*f*S+T,K=v*f*S+m*g,J=m*f*S-v*g,Z=f*v*S-m*g,j=v*v*S+T,k=m*v*S+f*g,_=f*m*S+v*g,q=v*m*S-f*g,et=m*m*S+T;return this.setValues(E*W+P*K+z*J,M*W+L*K+Y*J,F*W+O*K+X*J,A*W+G*K+I*J,E*Z+P*j+z*k,M*Z+L*j+Y*k,F*Z+O*j+X*k,A*Z+G*j+I*k,E
3715*_+P*q+z*et,M*_+L*q+Y*et,F*_+O*q+X*et,A*_+G*q+I*et,U,D,V,B)},rotateX:function(l){var u=this.val,d=Math.sin(l),f=Math.cos(l),v=u[4],m=u[5],y=u[6],g=u[7],T=u[8],S=u[9],E=u[10],M=u[11];return u[4]=v*f+T*d,u[5]=m*f+S*d,u[6]=y*f+E*d,u[7]=g*f+M*d,u[8]=T*f-v*d,u[9]=S*f-m*d,u[10]=E*f-y*d,u[11]=M*f-g*d,this},rotateY:function(l){var u=this.val,d=Math.sin(l),f=Math.cos(l),v=u[0],m=u[1],y=u[2],g=u[3],T=u[8],S=u[9],E=u[10],M=u[11];return u[0]=v*f-T*d,u[1]=m*f-S*d,u[2]=y*f-E*d,u[3]=g*f-M*d,u[8]=v*d+T*f,u[9]=m*d+S*f,u[10]=y*d+E*f,u[11]=g*d+M*f,this},rotateZ:function(l){var u=this.val,d=Math.sin(l),f=Math.cos(l),v=u[0],m=u[1],y=u[2],g=u[3],T=u[4],S=u[5],E=u[6],M=u[7];return u[0]=v*f+T*d,u[1]=m*f+S*d,u[2]=y*f+E*d,u[3]=g*f+M*d,u[4]=T*f-v*d,u[5]=S*f-m*d,u[6]=E*f-y*d,u[7]=M*f-g*d,this},fromRotationTranslation:function(l,u){var d=l.x,f=l.y,v=l.z,m=l.w,y=d+d,g=f+f,T=v+v,S=d*y,E=d*g,M=d*T,F=f*g,A=f*T,P=v*T,L=m*y,O=m*g,G=m*T;return this.setValues(1-(F+P),E+G,M-O,0,E-G,1-(S+P),A+L,0,M+O,A-L,1-(S+F),0,u.x,u.y,u.z,1)},fromQuat:function(l){var u=l.x,d=l.y,f=l.z,v=l.w,m=u+u,y=d+d,g=f+f,T=u*m,S=u*y,E=u*g,M=d*y,F=d*g,A=f*g,P=v*m,L=v*y,O=v*g;return this.setValues(1-(M+A),S+O,E-L,0,S-O,1-(T+A),F+P,0,E+L,F-P,1-(T+M),0,0,0,0,1)},frustum:function(l,u,d,f,v,m){var y=1/(u-l),g=1/(f-d),T=1/(v-m);return this.setValues(v*2*y,0,0,0,0,v*2*g,0,0,(u+l)*y,(f+d)*g,(m+v)*T,-1,0,0,m*v*2*T,0)},perspective:function(l,u,d,f){var v=1/Math.tan(l/2),m=1/(d-f);return this.setValues(v/u,0,0,0,0,v,0,0,0,0,(f+d)*m,-1,0,0,2*f*d*m,0)},perspectiveLH:function(l,u,d,f){return this.setValues(2*d/l,0,0,0,0,2*d/u,0,0,0,0,-f/(d-f),1,0,0,d*f/(d-f),0)},ortho:function(l,u,d,f,v,m){var y=l-u,g=d-f,T=v-m;return y=y===0?y:1/y,g=g===0?g:1/g,T=T===0?T:1/T,this.setValues(-2*y,0,0,0,0,-2*g,0,0,0,0,2*T,0,(l+u)*y,(f+d)*g,(m+v)*T,1)},lookAtRH:function(l,u,d){var f=this.val;return i.subVectors(l,u),i.lengthSq()===0&&(i.z=1),i.normalize(),s.crossVectors(d,i),s.lengthSq()===0&&(Math.abs(d.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),s.crossVectors(d,i)),s.normalize(),h.crossVectors(i,s),f[0]=s.x,f[1]=s.y,f[2]=s.z,f[4]=h.x,f[5]=h.y,f[6]=h.z,f[8]=i.x,f[9]=i.y,f[10]=i.z,this},lookAt:function(l,u,d){var f=l.x,v=l.y,m=l.z,y=d.x,g=d.y,T=d.z,S=u.x,E=u.y,M=u.z;if(Math.abs(f-S)<a&&Math.abs(v-E)<a&&Math.abs(m-M)<a)return this.identity();var F=f-S,A=v-E,P=m-M,L=1/Math.sqrt(F*F+A*A+P*P);F*=L,A*=L,P*=L;var O=g*P-T*A,G=T*F-y*P,z=y*A-g*F;L=Math.sqrt(O*O+G*G+z*z),L?(L=1/L,O*=L,G*=L,z*=L):(O=0,G=0,z=0);var Y=A*z-P*G,X=P*O-F*z,I=F*G-A*O;return L=Math.sqrt(Y*Y+X*X+I*I),L?(L=1/L,Y*=L,X*=L,I*=L):(Y=0,X=0,I=0),this.setValues(O,Y,F,0,G,X,A,0,z,I,P,0,-(O*f+G*v+z*m),-(Y*f+X*v+I*m),-(F*f+A*v+P*m),1)},yawPitchRoll:function(l,u,d){this.zero(),r.zero(),e.zero();var f=this.val,v=r.val,m=e.val,y=Math.sin(d),g=Math.cos(d);return f[10]=1,f[15]=1,f[0]=g,f[1]=y,f[4]=-y,f[5]=g,y=Math.sin(u),g=Math.cos(u),v[0]=1,v[15]=1,v[5]=g,v[10]=g,v[9]=-y,v[6]=y,y=Math.sin(l),g=Math.cos(l),m[5]=1,m[15]=1,m[0]=g,m[2]=-y,m[8]=y,m[10]=g,this.multiplyLocal(r),this.multiplyLocal(e),this},setWorldMatrix:function(l,u,d,f,v){return this.yawPitchRoll(l.y,l.x,l.z),r.scaling(d.x,d.y,d.z),e.xyz(u.x,u.y,u.z),this.multiplyLocal(r),this.multiplyLocal(e),f&&this.multiplyLocal(f),v&&this.multiplyLocal(v),this},multiplyToMat4:function(l,u){var d=this.val,f=l.val,v=d[0],m=d[1],y=d[2],g=d[3],T=d[4],S=d[5],E=d[6],M=d[7],F=d[8],A=d[9],P=d[10],L=d[11],O=d[12],G=d[13],z=d[14],Y=d[15],X=f[0],I=f[1],U=f[2],D=f[3],V=f[4],B=f[5],W=f[6],K=f[7],J=f[8],Z=f[9],j=f[10],k=f[11],_=f[12],q=f[13],et=f[14],nt=f[15];return u.setValues(X*v+I*T+U*F+D*O,I*m+I*S+U*A+D*G,U*y+I*E+U*P+D*z,D*g+I*M+U*L+D*Y,V*v+B*T+W*F+K*O,V*m+B*S+W*A+K*G,V*y+B*E+W*P+K*z,V*g+B*M+W*L+K*Y,J*v+Z*T+j*F+k*O,J*m+Z*S+j*A+k*G,J*y+Z*E+j*P+k*z,J*g+Z*M+j*L+k*Y,_*v+q*T+et*F+nt*O,_*m+q*S+et*A+nt*G,_*y+q*E+et*P+nt*z,_*g+q*M+et*L+nt*Y)},fromRotationXYTranslation:function(l,u,d){var f=u.x,v=u.y,m=u.z,y=Math.sin(l.x),g=Math.cos(l.x),T=Math.sin(l.y),S=Math.cos(l.y),E=f,M=v,F=m,A=-y,P=0-A*T,L=0-g*T,O=A*S,G=g*S;return d||(E=S*f+T*m,M=P*f+g*v+O*m,F=L*f+y*v+G*m),this.setValues(S,P,L,0,0,g,y,0,T,O,G,0,E,M,F,1)},getMaxScaleOnAxis:function(){var l=this.val,u=l[0]*l[0]+l[1]*l[1]+l[2]*l[2],d=l[4]*l[4]+l[5]*l[5]+l[6]*l[6],f=l[8]*l[8]+l[9]*l[9]+l[10]*l[10];return Math.sqrt(Math.max(u,d,f))}}),r=new n,e=new n,s=new p,h=new p,i=new p;c.exports=n},86883:c=>{/**
3716 * @author       Richard Davey <[email protected]>
3717 * @copyright    2013-2025 Phaser Studio Inc.
3718 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3719 */var x=function(t,o,p){return Math.min(t+o,p)};c.exports=x},50040:c=>{/**
3720 * @author       Vladislav Forsh <[email protected]>
3721 * @copyright    2021 RoboWhale
3722 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3723 */var x=function(t){var o=t.length;if(o===0)return 0;t.sort(function(a,n){return a-n});var p=Math.floor(o/2);return o%2===0?(t[p]+t[p-1])/2:t[p]};c.exports=x},37204:c=>{/**
3724 * @author       Richard Davey <[email protected]>
3725 * @copyright    2013-2025 Phaser Studio Inc.
3726 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3727 */var x=function(t,o,p){return Math.max(t-o,p)};c.exports=x},65201:c=>{/**
3728 * @author       Richard Davey <[email protected]>
3729 * @copyright    2013-2025 Phaser Studio Inc.
3730 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3731 */var x=function(t,o,p,a){p===void 0&&(p=o+1);var n=(t-o)/(p-o);return n>1?a!==void 0?(n=(a-t)/(a-p),n<0&&(n=0)):n=1:n<0&&(n=0),n};c.exports=x},15746:(c,x,t)=>{/**
3732 * @author       Richard Davey <[email protected]>
3733 * @copyright    2013-2025 Phaser Studio Inc.
3734 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3735 */var o=t(83419),p=t(94434),a=t(29747),n=t(25836),r=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),h=new n(1,0,0),i=new n(0,1,0),l=new n,u=new p,d=new o({initialize:function(v,m,y,g){this.onChangeCallback=a,this.set(v,m,y,g)},x:{get:function(){return this._x},set:function(f){this._x=f,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(f){this._y=f,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(f){this._z=f,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(f){this._w=f,this.onChangeCallback(this)}},copy:function(f){return this.set(f)},set:function(f,v,m,y,g){return g===void 0&&(g=!0),typeof f=="object"?(this._x=f.x||0,this._y=f.y||0,this._z=f.z||0,this._w=f.w||0):(this._x=f||0,this._y=v||0,this._z=m||0,this._w=y||
37350),g&&this.onChangeCallback(this),this},add:function(f){return this._x+=f.x,this._y+=f.y,this._z+=f.z,this._w+=f.w,this.onChangeCallback(this),this},subtract:function(f){return this._x-=f.x,this._y-=f.y,this._z-=f.z,this._w-=f.w,this.onChangeCallback(this),this},scale:function(f){return this._x*=f,this._y*=f,this._z*=f,this._w*=f,this.onChangeCallback(this),this},length:function(){var f=this.x,v=this.y,m=this.z,y=this.w;return Math.sqrt(f*f+v*v+m*m+y*y)},lengthSq:function(){var f=this.x,v=this.y,m=this.z,y=this.w;return f*f+v*v+m*m+y*y},normalize:function(){var f=this.x,v=this.y,m=this.z,y=this.w,g=f*f+v*v+m*m+y*y;return g>0&&(g=1/Math.sqrt(g),this._x=f*g,this._y=v*g,this._z=m*g,this._w=y*g),this.onChangeCallback(this),this},dot:function(f){return this.x*f.x+this.y*f.y+this.z*f.z+this.w*f.w},lerp:function(f,v){v===void 0&&(v=0);var m=this.x,y=this.y,g=this.z,T=this.w;return this.set(m+v*(f.x-m),y+v*(f.y-y),g+v*(f.z-g),T+v*(f.w-T))},rotationTo:function(f,v){var m=f.x*v.x+f.y*v.y+f.z*v.z;return m<-.999999?(l.copy(h).cross(f).length()<r&&l.copy(i).cross(f),l.normalize(),this.setAxisAngle(l,Math.PI)):m>.999999?this.set(0,0,0,1):(l.copy(f).cross(v),this._x=l.x,this._y=l.y,this._z=l.z,this._w=1+m,this.normalize())},setAxes:function(f,v,m){var y=u.val;return y[0]=v.x,y[3]=v.y,y[6]=v.z,y[1]=m.x,y[4]=m.y,y[7]=m.z,y[2]=-f.x,y[5]=-f.y,y[8]=-f.z,this.fromMat3(u).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(f,v){v=v*.5;var m=Math.sin(v);return this.set(m*f.x,m*f.y,m*f.z,Math.cos(v))},multiply:function(f){var v=this.x,m=this.y,y=this.z,g=this.w,T=f.x,S=f.y,E=f.z,M=f.w;return this.set(v*M+g*T+m*E-y*S,m*M+g*S+y*T-v*E,y*M+g*E+v*S-m*T,g*M-v*T-m*S-y*E)},slerp:function(f,v){var m=this.x,y=this.y,g=this.z,T=this.w,S=f.x,E=f.y,M=f.z,F=f.w,A=m*S+y*E+g*M+T*F;A<0&&(A=-A,S=-S,E=-E,M=-M,F=-F);var P=1-v,L=v;if(1-A>r){var O=Math.acos(A),G=Math.sin(O);P=Math.sin((1-v)*O)/G,L=Math.sin(v*O)/G}return this.set(P*m+L*S,P*y+L*E,P*g+L*M,P*T+L*F)},invert:function(){var f=this.x,v=this.y,m=this.z,y=this.w,g=f*f+v*v+m*m+y*y,T=g?1/g:0;return this.set(-f*T,-v*T,-m*T,y*T)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(f){f*=.5;var v=this.x,m=this.y,y=this.z,g=this.w,T=Math.sin(f),S=Math.cos(f);return this.set(v*S+g*T,m*S+y*T,y*S-m*T,g*S-v*T)},rotateY:function(f){f*=.5;var v=this.x,m=this.y,y=this.z,g=this.w,T=Math.sin(f),S=Math.cos(f);return this.set(v*S-y*T,m*S+g*T,y*S+v*T,g*S-m*T)},rotateZ:function(f){f*=.5;var v=this.x,m=this.y,y=this.z,g=this.w,T=Math.sin(f),S=Math.cos(f);return this.set(v*S+m*T,m*S-v*T,y*S+g*T,g*S-y*T)},calculateW:function(){var f=this.x,v=this.y,m=this.z;return this.w=-Math.sqrt(1-f*f-v*v-m*m),this},setFromEuler:function(f,v){var m=f.x/2,y=f.y/2,g=f.z/2,T=Math.cos(m),S=Math.cos(y),E=Math.cos(g),M=Math.sin(m),F=Math.sin(y),A=Math.sin(g);switch(f.order){case"XYZ":{this.set(M*S*E+T*F*A,T*F*E-M*S*A,T*S*A+M*F*E,T*S*E-M*F*A,v);break}case"YXZ":{this.set(M*S*E+T*F*A,T*F*E-M*S*A,T*S*A-M*F*E,T*S*E+M*F*A,v);break}case"ZXY":{this.set(M*S*E-T*F*A,T*F*E+M*S*A,T*S*A+M*F*E,T*S*E-M*F*A,v);break}case"ZYX":{this.set(M*S*E-T*F*A,T*F*E+M*S*A,T*S*A-M*F*E,T*S*E+M*F*A,v);break}case"YZX":{this.set(M*S*E+T*F*A,T*F*E+M*S*A,T*S*A-M*F*E,T*S*E-M*F*A,v);break}case"XZY":{this.set(M*S*E-T*F*A,T*F*E-M*S*A,T*S*A+M*F*E,T*S*E+M*F*A,v);break}}return this},setFromRotationMatrix:function(f){var v=f.val,m=v[0],y=v[4],g=v[8],T=v[1],S=v[5],E=v[9],M=v[2],F=v[6],A=v[10],P=m+S+A,L;return P>0?(L=.5/Math.sqrt(P+1),this.set((F-E)*L,(g-M)*L,(T-y)*L,.25/L)):m>S&&m>A?(L=2*Math.sqrt(1+m-S-A),this.set(.25*L,(y+T)/L,(g+M)/L,(F-E)/L)):S>A?(L=2*Math.sqrt(1+S-m-A),this.set((y+T)/L,.25*L,(E+F)/L,(g-M)/L)):(L=2*Math.sqrt(1+A-m-S),this.set((g+M)/L,(E+F)/L,.25*L,(T-y)/L)),this},fromMat3:function(f){var v=f.val,m=v[0]+v[4]+v[8],y;if(m>0)y=Math.sqrt(m+1),this.w=.5*y,y=.5/y,this._x=(v[7]-v[5])*y,this._y=(v[2]-v[6])*y,this._z=(v[3]-v[1])*y;else{var g=0;v[4]>v[0]&&(g=1),v[8]>v[g*3+g]&&(g=2);var T=e[g],S=e[T];y=Math.sqrt(v[g*3+g]-v[T*3+T]-v[S*3+S]+1),s[g]=.5*y,y=.5/y,s[T]=(v[T*3+g]+v[g*3+T])*y,s[S]=(v[S*3+g]+v[g*3+S])*y,this._x=s[0],this._y=s[1],this._z=s[2],this._w=(v[S*3+T]-v[T*3+S])*y}return this.onChangeCallback(this),this}});c.exports=d},43396:(c,x,t)=>{/**
3736 * @author       Richard Davey <[email protected]>
3737 * @copyright    2013-2025 Phaser Studio Inc.
3738 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3739 */var o=t(36383),p=function(a){return a*o.RAD_TO_DEG};c.exports=p},74362:c=>{/**
3740 * @author       Richard Davey <[email protected]>
3741 * @copyright    2013-2025 Phaser Studio Inc.
3742 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3743 */var x=function(t,o){o===void 0&&(o=1);var p=Math.random()*2*Math.PI;return t.x=Math.cos(p)*o,t.y=Math.sin(p)*o,t};c.exports=x},60706:c=>{/**
3744 * @author       Richard Davey <[email protected]>
3745 * @copyright    2013-2025 Phaser Studio Inc.
3746 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3747 */var x=function(t,o){o===void 0&&(o=1);var p=Math.random()*2*Math.PI,a=Math.random()*2-1,n=Math.sqrt(1-a*a)*o;return t.x=Math.cos(p)*n,t.y=Math.sin(p)*n,t.z=a*o,t};c.exports=x},67421:c=>{/**
3748 * @author       Richard Davey <[email protected]>
3749 * @copyright    2013-2025 Phaser Studio Inc.
3750 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3751 */var x=function(t,o){return o===void 0&&(o=1),t.x=(Math.random()*2-1)*o,t.y=(Math.random()*2-1)*o,t.z=(Math.random()*2-1)*o,t.w=(Math.random()*2-1)*o,t};c.exports=x},36305:c=>{/**
3752 * @author       Richard Davey <[email protected]>
3753 * @copyright    2013-2025 Phaser Studio Inc.
3754 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3755 */var x=function(t,o){var p=t.x,a=t.y;return t.x=p*Math.cos(o)-a*Math.sin(o),t.y=p*Math.sin(o)+a*Math.cos(o),t};c.exports=x},11520:c=>{/**
3756 * @author       Richard Davey <[email protected]>
3757 * @copyright    2013-2025 Phaser Studio Inc.
3758 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3759 */var x=function(t,o,p,a){var n=Math.cos(a),r=Math.sin(a),e=t.x-o,s=t.y-p;return t.x=e*n-s*r+o,t.y=e*r+s*n+p,t};c.exports=x},1163:c=>
vendor: 10,434 bytes, lines 3759-3807
3759{/**
3760 * @author       Richard Davey <[email protected]>
3761 * @copyright    2013-2025 Phaser Studio Inc.
3762 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3763 */var x=function(t,o,p,a,n){var r=a+Math.atan2(t.y-p,t.x-o);return t.x=o+n*Math.cos(r),t.y=p+n*Math.sin(r),t};c.exports=x},70336:c=>{/**
3764 * @author       samme
3765 * @copyright    2013-2025 Phaser Studio Inc.
3766 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3767 */var x=function(t,o,p,a,n){return t.x=o+n*Math.cos(a),t.y=p+n*Math.sin(a),t};c.exports=x},72678:(c,x,t)=>{/**
3768 * @author       Richard Davey <[email protected]>
3769 * @copyright    2013-2025 Phaser Studio Inc.
3770 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3771 */var o=t(25836),p=t(37867),a=t(15746),n=new p,r=new a,e=new o,s=function(h,i,l){return r.setAxisAngle(i,l),n.fromRotationTranslation(r,e.set(0,0,0)),h.transformMat4(n)};c.exports=s},2284:c=>{/**
3772 * @author       Richard Davey <[email protected]>
3773 * @copyright    2013-2025 Phaser Studio Inc.
3774 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3775 */var x=function(t){return t>0?Math.ceil(t):Math.floor(t)};c.exports=x},41013:c=>{/**
3776 * @author       Richard Davey <[email protected]>
3777 * @copyright    2013-2025 Phaser Studio Inc.
3778 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3779 */var x=function(t,o,p){o===void 0&&(o=0),p===void 0&&(p=10);var a=Math.pow(p,-o);return Math.round(t*a)/a};c.exports=x},16922:c=>{/**
3780 * @author       Richard Davey <[email protected]>
3781 * @copyright    2013-2025 Phaser Studio Inc.
3782 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3783 */var x=function(t,o,p,a){o===void 0&&(o=1),p===void 0&&(p=1),a===void 0&&(a=1),a*=Math.PI/t;for(var n=[],r=[],e=0;e<t;e++)p-=o*a,o+=p*a,n[e]=p,r[e]=o;return{sin:r,cos:n,length:t}};c.exports=x},7602:c=>{/**
3784 * @author       Richard Davey <[email protected]>
3785 * @copyright    2013-2025 Phaser Studio Inc.
3786 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3787 */var x=function(t,o,p){return t<=o?0:t>=p?1:(t=(t-o)/(p-o),t*t*(3-2*t))};c.exports=x},54261:c=>{/**
3788 * @author       Richard Davey <[email protected]>
3789 * @copyright    2013-2025 Phaser Studio Inc.
3790 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3791 */var x=function(t,o,p){return t=Math.max(0,Math.min(1,(t-o)/(p-o))),t*t*t*(t*(t*6-15)+10)};c.exports=x},44408:(c,x,t)=>{/**
3792 * @author       Richard Davey <[email protected]>
3793 * @copyright    2013-2025 Phaser Studio Inc.
3794 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3795 */var o=t(26099),p=function(a,n,r,e){e===void 0&&(e=new o);var s=0,h=0,i=n*r;return a>0&&a<=i&&(a>n-1?(h=Math.floor(a/n),s=a-h*n):s=a),e.set(s,h)};c.exports=p},85955:(c,x,t)=>{/**
3796 * @author       Richard Davey <[email protected]>
3797 * @copyright    2013-2025 Phaser Studio Inc.
3798 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3799 */var o=t(26099),p=function(a,n,r,e,s,h,i,l){l===void 0&&(l=new o);var u=Math.sin(s),d=Math.cos(s),f=d*h,v=u*h,m=-u*i,y=d*i,g=1/(f*y+m*-v);return l.x=y*g*a+-m*g*n+(e*m-r*y)*g,l.y=f*g*n+-v*g*a+(-e*f+r*v)*g,l};c.exports=p},26099:(c,x,t)=>{/**
3800 * @author       Richard Davey <[email protected]>
3801 * @copyright    2013-2025 Phaser Studio Inc.
3802 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3803 */var o=t(83419),p=t(43855),a=new o({initialize:function(r,e){this.x=0,this.y=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0):(e===void 0&&(e=r),this.x=r||0,this.y=e||0)},clone:function(){return new a(this.x,this.y)},copy:function(n){return this.x=n.x||0,this.y=n.y||0,this},setFromObject:function(n){return this.x=n.x||0,this.y=n.y||0,this},set:function(n,r){return r===void 0&&(r=n),this.x=n,this.y=r,this},setTo:function(n,r){return this.set(n,r)},setToPolar:function(n,r){return r==null&&(r=1),this.x=Math.cos(n)*r,this.y=Math.sin(n)*r,this},equals:function(n){return this.x===n.x&&this.y===n.y},fuzzyEquals:function(n,r){return p(this.x,n.x,r)&&p(this.y,n.y,r)},angle:function(){var n=Math.atan2(this.y,this.x);return n<0&&(n+=2*Math.PI),n},setAngle:function(n){return this.setToPolar(n,this.length())},add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.x-=n.x,this.y-=n.y,this},multiply:function(n){return this.x*=n.x,this.y*=n.y,this},scale:function(n){return isFinite(n)?(this.x*=n,this.y*=n):(this.x=0,this.y=0),this},divide:function(n){return this.x/=n.x,this.y/=n.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(n){var r=n.x-this.x,e=n.y-this.y;return Math.sqrt(r*r+e*e)},distanceSq:function(n){var r=n.x-this.x,e=n.y-this.y;return r*r+e*e},length:function(){var n=this.x,r=this.y;return Math.sqrt(n*n+r*r)},setLength:function(n){return this.normalize().scale(n)},lengthSq:function(){var n=this.x,r=this.y;return n*n+r*r},normalize:function(){var n=this.x,r=this.y,e=n*n+r*r;return e>0&&(e=1/Math.sqrt(e),this.x=n*e,this.y=r*e),this},normalizeRightHand:function(){var n=this.x;return this.x=this.y*-1,this.y=n,this},normalizeLeftHand:function(){var n=this.x;return this.x=this.y,this.y=n*-1,this},dot:function(n){return this.x*n.x+this.y*n.y},cross:function(n){return this.x*n.y-this.y*n.x},lerp:function(n,r){r===void 0&&(r=0);var e=this.x,s=this.y;return this.x=e+r*(n.x-e),this.y=s+r*(n.y-s),this},transformMat3:function(n){var r=this.x,e=this.y,s=n.val;return this.x=s[0]*r+s[3]*e+s[6],this.y=s[1]*r+s[4]*e+s[7],this},transformMat4:function(n){var r=this.x,e=this.y,s=n.val;return this.x=s[0]*r+s[4]*e+s[12],this.y=s[1]*r+s[5]*e+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(n){var r=this.length();return r&&r>n&&this.scale(n/r),this},reflect:function(n){return n=n.clone().normalize(),this.subtract(n.scale(2*this.dot(n)))},mirror:function(n){return this.reflect(n).negate()},rotate:function(n){var r=Math.cos(n),e=Math.sin(n);return this.set(r*this.x-e*this.y,e*this.x+r*this.y)},project:function(n){var r=this.dot(n)/n.dot(n);return this.copy(n).scale(r)}});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),c.exports=a},25836:(c,x,t)=>{/**
3804 * @author       Richard Davey <[email protected]>
3805 * @copyright    2013-2025 Phaser Studio Inc.
3806 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3807 */var o=t(83419),p=new o({initialize:function(n,r,e){this.x=0,this.y=0,this.z=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0,this.z=n.z||0):(this.x=n||0,this.y=r||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 p(this.x,this.y,this.z)},addVectors:function(a,n){return this.x=a.x+n.x,this.y=a.y+n.y,this.z=a.z+n.z,this},subVectors:function(a,n){return this.x=a.x-n.x,this.y=a.y-n.y,this.z=a.z-n.z,this},crossVectors:function(a,n){var r=a.x,e=a.y,s=a.z,h=n.x,i=n.y,l=n.z;return this.x=e*l-s*i,this.y=s*h-r*l,this.z=r*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,n,r){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=n||0,this.z=r||0),this},setFromMatrixPosition:function(a){return this.fromArray(a.val,12)},setFromMatrixColumn:function(a,n){return this.fromArray(a.val,n*4)},fromArray:function(a,n){return n===void 0&&(n=0),this.x=a[n],this.y=a[n+1],this.z=a[n+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,n){return this.x+=a.x*n,this.y+=a.y*n,this.z+=a.z*n||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 n=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0;return Math.sqrt(n*n+r*r+e*e)},distanceSq:function(a){var n=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0;return n*n+r*r+e*e},length:function(){var a=this.x,n=this.y,r=this.z;return Math.sqrt(a*a+n*n+r*r)},lengthSq:function(){var a=this.x,n=this.y,r=this.z;return a*a+n*n+r*r},normalize:function(){var a=this.x,n=this.y,r=this.z,e=a*a+n*n+r*r;return e>0&&(e=1/Math.sqrt(e),this.x=a*e,this.y=n*e,this.z=r*e),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},cross:function(a){var n=this.x,r=this.y,e=this.z,s=a.x,h=a.y,i=a.z;return this.x=r*i-e*h,this.y=e*s-n*i,this.z=n*h-r*s,this},lerp:function(a,n){n===void 0&&(n=0);var r=this.x,e=this.y,s=this.z;return this.x=r+n*(a.x-r),this.y=e+n*(a.y-e),this.z=s+n*(a.z-s),this},applyMatrix3:function(a){var n=this.x,r=this.y,e=this.z,s=a.val;return this.x=s[0]*n+s[3]*r+s[6]*e,this.y=s[1]*n+s[4]*r+s[7]*e,this.z=s[2]*n+s[5]*r+s[8]*e,this},applyMatrix4:function(a){var n=this.x,r=this.y,e=this.z,s=a.val,h=1/(s[3]*n+s[7]*r+s[11]*e+s[15]);return this.x=(s[0]*n+s[4]*r+s[8]*e+s[12])*h,this.y=(s[1]*n+s[5]*r+s[9]*e+s[13])*h,this.z=(s[2]*n+s[6]*r+s[10]*e+s[14])*h,this},transformMat3:function(a){var n=this.x,r=this.y,e=this.z,s=a.val;return this.x=n*s[0]+r*s[3]+e*s[6],this.y=n*s[1]+r*s[4]+e*s[7],this.z=n*s[2]+r*s[5]+e*s[8],this},transformMat4:function(a){var n=this.x,r=this.y,e=this.z,s=a.val;return this.x=s[0]*n+s[4]*r+s[8]*e+s[12],this.y=s[1]*n+s[5]*r+s[9]*e+s[13],this.z=s[2]*n+s[6]*r+s[10]*e+s[14],this},transformCoordinates:function(a){var n=this.x,r=this.y,e=this.z,s=a.val,h=n*s[0]+r*s[4]+e*s[8]+s[12],i=n*s[1]+r*s[5]+e*s[9]+s[13],l=n*s[2]+r*s[6]+e*s[10]+s[14],u=n*s[3]+r*s[7]+e*s[11]+s[15];return this.x=h/u,this.y=i/u,this.z=l/u,this},transformQuat:function(a){var n=this.x,r=this.y,e=this.z,s=a.x,h=a.y,i=a.z,l=a.w,u=l*n+h*e-i*r,d=l*r+i*n-s*e,f=l*e+s*r-h*n,v=-s*n-h*r-i*e;return this.x=u*l+v*-s+d*-i-f*-h,this.y=d*l+v*-h+f*-s-u*-i,this.z=f*l+v*-i+u*-h-d*-s,this},project:function(a){var n=this.x,r=this.y,e=this.z,s=a.val,h=s[0],i=s[1],l=s[2],u=s[3],d=s[4],f=s[5],v=s[6],m=s[7],y=s[8],g=s[9],T=s[10],S=s[11],E=s[12],M=s[13],F=s[14],A=s[15],P=1/(n*u+r*m+e*S+A);
3807return this.x=(n*h+r*d+e*y+E)*P,this.y=(n*i+r*f+e*g+M)*P,this.z=(n*l+r*v+e*T+F)*P,this},projectViewMatrix:function(a,n){return this.applyMatrix4(a).applyMatrix4(n)},unprojectViewMatrix:function(a,n){return this.applyMatrix4(a).applyMatrix4(n)},unproject:function(a,n){var r=a.x,e=a.y,s=a.z,h=a.w,i=this.x-r,l=h-this.y-1-e,u=this.z;return this.x=2*i/s-1,this.y=2*l/h-1,this.z=2*u-1,this.project(n)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});p.ZERO=new p,p.RIGHT=new p(1,0,0),p.LEFT=new p(-1,0,0),p.UP=new p(0,-1,0),p.DOWN=new p(0,1,0),p.FORWARD=new p(0,0,1),p.BACK=new p(0,0,-1),p.ONE=new p(1,1,1),c.exports=p},61369:(c,x,t)=>{/**
3808 * @author       Richard Davey <[email protected]>
3809 * @copyright    2013-2025 Phaser Studio Inc.
3810 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3811 */var o=t(83419),p=new o({initialize:function(n,r,e,s){this.x=0,this.y=0,this.z=0,this.w=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0,this.z=n.z||0,this.w=n.w||0):(this.x=n||0,this.y=r||0,this.z=e||0,this.w=s||0)},clone:function(){return new p(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,n,r,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=n||0,this.z=r||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,n=this.y,r=this.z,e=this.w;return Math.sqrt(a*a+n*n+r*r+e*e)},lengthSq:function(){var a=this.x,n=this.y,r=this.z,e=this.w;return a*a+n*n+r*r+e*e},normalize:function(){var a=this.x,n=this.y,r=this.z,e=this.w,s=a*a+n*n+r*r+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=a*s,this.y=n*s,this.z=r*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,n){n===void 0&&(n=0);var r=this.x,e=this.y,s=this.z,h=this.w;return this.x=r+n*(a.x-r),this.y=e+n*(a.y-e),this.z=s+n*(a.z-s),this.w=h+n*(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 n=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0,s=a.w-this.w||0;return Math.sqrt(n*n+r*r+e*e+s*s)},distanceSq:function(a){var n=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0,s=a.w-this.w||0;return n*n+r*r+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 n=this.x,r=this.y,e=this.z,s=this.w,h=a.val;return this.x=h[0]*n+h[4]*r+h[8]*e+h[12]*s,this.y=h[1]*n+h[5]*r+h[9]*e+h[13]*s,this.z=h[2]*n+h[6]*r+h[10]*e+h[14]*s,this.w=h[3]*n+h[7]*r+h[11]*e+h[15]*s,this},transformQuat:function(a){var n=this.x,r=this.y,e=this.z,s=a.x,h=a.y,i=a.z,l=a.w,u=l*n+h*e-i*r,d=l*r+i*n-s*e,f=l*e+s*r-h*n,v=-s*n-h*r-i*e;return this.x=u*l+v*-s+d*-i-f*-h,this.y=d*l+v*-h+f*-s-u*-i,this.z=f*l+v*-i+u*-h-d*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});p.prototype.sub=p.prototype.subtract,p.prototype.mul=p.prototype.multiply,p.prototype.div=p.prototype.divide,p.prototype.dist=p.prototype.distance,p.prototype.distSq=p.prototype.distanceSq,p.prototype.len=p.prototype.length,p.prototype.lenSq=p.prototype.lengthSq,c.exports=p},60417:c=>{/**
3812 * @author       Richard Davey <[email protected]>
3813 * @copyright    2013-2025 Phaser Studio Inc.
3814 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3815 */var x=function(t,o,p){return Math.abs(t-o)<=p};c.exports=x},15994:c=>{/**
3816 * @author       Richard Davey <[email protected]>
3817 * @copyright    2013-2025 Phaser Studio Inc.
3818 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3819 */var x=function(t,o,p){var a=p-o;return o+((t-o)%a+a)%a};c.exports=x},31040:c=>{/**
3820 * @author       Richard Davey <[email protected]>
3821 * @copyright    2013-2025 Phaser Studio Inc.
3822 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3823 */var x=function(t,o,p,a){return Math.atan2(a-o,p-t)};c.exports=x},55495:c=>{/**
3824 * @author       Richard Davey <[email protected]>
3825 * @copyright    2013-2025 Phaser Studio Inc.
3826 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3827 */var x=function(t,o){return Math.atan2(o.y-t.y,o.x-t.x)};c.exports=x},128:c=>{/**
3828 * @author       Richard Davey <[email protected]>
3829 * @copyright    2013-2025 Phaser Studio Inc.
3830 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3831 */var x=function(t,o){return Math.atan2(o.x-t.x,o.y-t.y)};c.exports=x},41273:c=>{/**
3832 * @author       Richard Davey <[email protected]>
3833 * @copyright    2013-2025 Phaser Studio Inc.
3834 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3835 */var x=function(t,o,p,a){return Math.atan2(p-t,a-o)};c.exports=x},1432:(c,x,t)=>{/**
3836 * @author       Richard Davey <[email protected]>
3837 * @copyright    2013-2025 Phaser Studio Inc.
3838 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3839 */var o=t(36383),p=function(a){return a>Math.PI&&(a-=o.PI2),Math.abs(((a+o.TAU)%o.PI2-o.PI2)%o.PI2)};c.exports=p},49127:(c,x,t)=>{/**
3840 * @author       samme
3841 * @copyright    2025 Phaser Studio Inc.
3842 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3843 */var o=t(12407),p=function(a,n){return o(n-a)};c.exports=p},52285:(c,x,t)=>{/**
3844 * @author       samme
3845 * @copyright    2025 Phaser Studio Inc.
3846 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3847 */var o=t(12407),p=2*Math.PI,a=function(n,r){var e=o(r-n);return e>0&&(e-=p),e};c.exports=a},67317:(c,x,t)=>{/**
3848 * @author       samme
3849 * @copyright    2025 Phaser Studio Inc.
3850 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3851 */var o=t(86554),p=function(a,n){return o(n-a)};c.exports=p},12407:c=>{/**
3852 * @author       Richard Davey <[email protected]>
3853 * @copyright    2013-2025 Phaser Studio Inc.
3854 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3855 */var x=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};c.exports=x},53993:(c,x,t)=>{/**
3856 * @author       Richard Davey <[email protected]>
3857 * @author       @samme
3858 * @copyright    2013-2025 Phaser Studio Inc.
3859 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3860 */var o=t(99472),p=function(){return o(-Math.PI,Math.PI)};c.exports=p},86564:(c,x,t)=>{/**
3861 * @author       Richard Davey <[email protected]>
3862 * @author       @samme
3863 * @copyright    2013-2025 Phaser Studio Inc.
3864 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3865 */var o=t(99472),p=function(){return o(-180,180)};c.exports=p},90154:(c,x,t)=>{/**
3866 * @author       Richard Davey <[email protected]>
3867 * @copyright    2013-2025 Phaser Studio Inc.
3868 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3869 */var o=t(12407),p=function(a){return o(a+Math.PI)};c.exports=p},48736:(c,x,t)=>{/**
3870 * @author       Richard Davey <[email protected]>
3871 * @copyright    2013-2025 Phaser Studio Inc.
3872 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3873 */var o=t(36383),p=function(a,n,r){return r===void 0&&(r=.05),a===n||(Math.abs(n-a)<=r||Math.abs(n-a)>=o.PI2-r?a=n:(Math.abs(n-a)>Math.PI&&(n<a?n+=o.PI2:n-=o.PI2),n>a?a+=r:n<a&&(a-=r))),a};c.exports=p},61430:c=>{/**
3874 * @author       Richard Davey <[email protected]>
3875 * @copyright    2013-2025 Phaser Studio Inc.
3876 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3877 */var x=function(t,o){var p=o-t;if(p===0)return 0;var a=Math.floor((p- -180)/360);return p-a*360};c.exports=x},86554:(c,x,t)=>{/**
3878 * @author       Richard Davey <[email protected]>
3879 * @copyright    2013-2025 Phaser Studio Inc.
3880 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3881 */var o=t(15994),p=function(a){return o(a,-Math.PI,Math.PI)};c.exports=p},30954:(c,x,t)=>{/**
3882 * @author       Richard Davey <[email protected]>
3883 * @copyright    2013-2025 Phaser Studio Inc.
3884 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3885 */var o=t(15994),p=function(a){return o(a,-180,180)};c.exports=p},25588:(c,x,t)=>{/**
3886 * @author       Richard Davey <[email protected]>
3887 * @copyright    2013-2025 Phaser Studio Inc.
3888 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3889 */c.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),GetClockwiseDistance:t(49127),GetCounterClockwiseDistance:t(52285),GetShortestDistance:t(67317),Normalize:t(12407),Random:t(53993),RandomDegrees:t(86564),Reverse:t(90154),RotateTo:t(48736),ShortestBetween:t(61430),Wrap:t(86554),WrapDegrees:t(30954)}},36383:c=>{/**
3890 * @author       Richard Davey <[email protected]>
3891 * @copyright    2013-2025 Phaser Studio Inc.
3892 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3893 */var x={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};c.exports=x},20339:c=>{/**
3894 * @author       Richard Davey <[email protected]>
3895 * @copyright    2013-2025 Phaser Studio Inc.
3896 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3897 */var x=function(t,o,p,a){var n=t-p,r=o-a;return Math.sqrt(n*n+r*r)};c.exports=x},52816:c=>{/**
3898 * @author       samme
3899 * @copyright    2013-2025 Phaser Studio Inc.
3900 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3901 */var x=function(t,o){var p=t.x-o.x,a=t.y-o.y;return Math.sqrt(p*p+a*a)};c.exports=x},64559:c=>{/**
3902 * @author       samme
3903 * @copyright    2013-2025 Phaser Studio Inc.
3904 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3905 */var x=function(t,o){var p=t.x-o.x,a=t.y-o.y;return p*p+a*a};c.exports=x},82340:c=>{/**
3906 * @author       samme
3907 * @copyright    2013-2025 Phaser Studio Inc.
3908 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3909 */var x=function(t,o,p,a){return Math.max(Math.abs(t-p),Math.abs(o-a))};c.exports=x},14390:c=>{/**
3910 * @author       Richard Davey <[email protected]>
3911 * @copyright    2013-2025 Phaser Studio Inc.
3912 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3913 */var x=function(t,o,p,a,n){return n===void 0&&(n=2),Math.sqrt(Math.pow(p-t,n)+Math.pow(a-o,n))};c.exports=x},2243:c=>{/**
3914 * @author       samme
3915 * @copyright    2013-2025 Phaser Studio Inc.
3916 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3917 */var x=function(t,o,p,a){return Math.abs(t-p)+Math.abs(o-a)};c.exports=x},89774:c=>{/**
3918 * @author       Richard Davey <[email protected]>
3919 * @copyright    2013-2025 Phaser Studio Inc.
3920 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3921 */var x=function(t,o,p,a){var n=t-p,r=o-a;return n*n+r*r};c.exports=x},50994:(c,x,t)=>{/**
3922 * @author       Richard Davey <[email protected]>
3923 * @copyright    2013-2025 Phaser Studio Inc.
3924 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3925 */c.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(c,x,t)=>{/**
3926 * @author       Richard Davey <[email protected]>
3927 * @copyright    2013-2025 Phaser Studio Inc.
3928 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3929 */var o=t(54178),p=t(41521),a=t(79980),n=t(85433),r=t(99140),e=t(48857),s=t(81596),h=t(59133),i=t(98516),l=t(35248),u=t(82500),d=t(49752);c.exports={Power0:s,Power1:h.Out,Power2:n.Out,Power3:i.Out,Power4:l.Out,Linear:s,Quad:h.Out,Cubic:n.Out,Quart:i.Out,Quint:l.Out,Sine:u.Out,Expo:e.Out,Circ:a.Out,Elastic:r.Out,Back:o.Out,Bounce:p.Out,Stepped:d,"Quad.easeIn":h.In,"Cubic.easeIn":n.In,"Quart.easeIn":i.In,"Quint.easeIn":l.In,"Sine.easeIn":u.In,"Expo.easeIn":e.In,"Circ.easeIn":a.In,"Elastic.easeIn":r.In,"Back.easeIn":o.In,"Bounce.easeIn":p.In,"Quad.easeOut":h.Out,"Cubic.easeOut":n.Out,"Quart.easeOut":i.Out,"Quint.easeOut":l.Out,"Sine.easeOut":u.Out,"Expo.easeOut":e.Out,"Circ.easeOut":a.Out,"Elastic.easeOut":r.Out,"Back.easeOut":o.Out,"Bounce.easeOut":p.Out,"Quad.easeInOut":h.InOut,"Cubic.easeInOut":n.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":l.InOut,"Sine.easeInOut":u.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":a.InOut,"Elastic.easeInOut":r.InOut,"Back.easeInOut":o.InOut,"Bounce.easeInOut":p.InOut}},1639:c=>{/**
3930 * @author       Richard Davey <[email protected]>
3931 * @copyright    2013-2025 Phaser Studio Inc.
3932 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3933 */var x=function(t,o){return o===void 0&&(o=1.70158),t*t*((o+1)*t-o)};c.exports=x},50099:c=>{/**
3934 * @author       Richard Davey <[email protected]>
3935 * @copyright    2013-2025 Phaser Studio Inc.
3936 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3937 */var x=function(t,o){o===void 0&&(o=1.70158);var p=o*1.525;return(t*=2)<1?.5*(t*t*((p+1)*t-p)):.5*((t-=2)*t*((p+1)*t+p)+2)};c.exports=x},41286:c=>{/**
3938 * @author       Richard Davey <[email protected]>
3939 * @copyright    2013-2025 Phaser Studio Inc.
3940 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3941 */var x=function(t,o){return o===void 0&&(o=1.70158),--t*t*((o+1)*t+o)+1};c.exports=x},54178:(c,x,t)=>{/**
3942 * @author       Richard Davey <[email protected]>
3943 * @copyright    2013-2025 Phaser Studio Inc.
3944 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3945 */c.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:c=>{/**
3946 * @author       Richard Davey <[email protected]>
3947 * @copyright    2013-2025 Phaser Studio Inc.
3948 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3949 */var x=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)};c.exports=x},41788:c=>{/**
3950 * @author       Richard Davey <[email protected]>
3951 * @copyright    2013-2025 Phaser Studio Inc.
3952 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3953 */var x=function(t){var o=!1;return t<.5?(t=1-t*2,o=!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,o?(1-t)*.5:t*.5+.5};c.exports=x},69905:c=>{/**
3954 * @author       Richard Davey <[email protected]>
3955 * @copyright    2013-2025 Phaser Studio Inc.
3956 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3957 */var x=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};c.exports=x},41521:(c,x,t)=>{/**
3958 * @author       Richard Davey <[email protected]>
3959 * @copyright    2013-2025 Phaser Studio Inc.
3960 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3961 */c.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:c=>{/**
3962 * @author       Richard Davey <[email protected]>
3963 * @copyright    2013-2025 Phaser Studio Inc.
3964 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3965 */var x=function(t){return 1-Math.sqrt(1-t*t)};c.exports=x},4177:c=>{/**
3966 * @author       Richard Davey <[email protected]>
3967 * @copyright    2013-2025 Phaser Studio Inc.
3968 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3969 */var x=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};c.exports=x},57512:c=>{/**
3970 * @author       Richard Davey <[email protected]>
3971 * @copyright    2013-2025 Phaser Studio Inc.
3972 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3973 */var x=function(t){return Math.sqrt(1- --t*t)};c.exports=x},79980:(c,x,t)=>{/**
3974 * @author       Richard Davey <[email protected]>
3975 * @copyright    2013-2025 Phaser Studio Inc.
3976 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3977 */c.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:c=>{/**
3978 * @author       Richard Davey <[email protected]>
3979 * @copyright    2013-2025 Phaser Studio Inc.
3980 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3981 */var x=function(t){return t*t*t};c.exports=x},82820:c=>{/**
3982 * @author       Richard Davey <[email protected]>
3983 * @copyright    2013-2025 Phaser Studio Inc.
3984 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3985 */var x=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};c.exports=x},35033:c=>{/**
3986 * @author       Richard Davey <[email protected]>
3987 * @copyright    2013-2025 Phaser Studio Inc.
3988 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3989 */var x=function(t){return--t*t*t+1};c.exports=x},85433:(c,x,t)=>{/**
3990 * @author       Richard Davey <[email protected]>
3991 * @copyright    2013-2025 Phaser Studio Inc.
3992 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3993 */c.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:c=>{/**
3994 * @author       Richard Davey <[email protected]>
3995 * @copyright    2013-2025 Phaser Studio Inc.
3996 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
3997 */var x=function(t,o,p){if(o===void 0&&(o=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var a=p/4;return o<1?o=1:a=p*Math.asin(1/o)/(2*Math.PI),-(o*Math.pow(2,10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/p))};c.exports=x},50665:c=>{/**
3998 * @author       Richard Davey <[email protected]>
3999 * @copyright    2013-2025 Phaser Studio Inc.
4000 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4001 */var x=function(t,o,p){if(o===void 0&&(o=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var a=p/4;return o<1?o=1:a=p*Math.asin(1/o)/(2*Math.PI),(t*=2)<1?-.5*(o*Math.pow(2,10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/p)):o*Math.pow(2,-10*(t-=1))*Math.sin((t-a)*(2*Math.PI)/p)*.5+1};c.exports=x}
4001,7744:c=>{/**
4002 * @author       Richard Davey <[email protected]>
4003 * @copyright    2013-2025 Phaser Studio Inc.
4004 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4005 */var x=function(t,o,p){if(o===void 0&&(o=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var a=p/4;return o<1?o=1:a=p*Math.asin(1/o)/(2*Math.PI),o*Math.pow(2,-10*t)*Math.sin((t-a)*(2*Math.PI)/p)+1};c.exports=x},99140:(c,x,t)=>{/**
4006 * @author       Richard Davey <[email protected]>
4007 * @copyright    2013-2025 Phaser Studio Inc.
4008 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4009 */c.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:c=>{/**
4010 * @author       Richard Davey <[email protected]>
4011 * @copyright    2013-2025 Phaser Studio Inc.
4012 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4013 */var x=function(t){return Math.pow(2,10*(t-1))-.001};c.exports=x},87844:c=>{/**
4014 * @author       Richard Davey <[email protected]>
4015 * @copyright    2013-2025 Phaser Studio Inc.
4016 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4017 */var x=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};c.exports=x},89433:c=>{/**
4018 * @author       Richard Davey <[email protected]>
4019 * @copyright    2013-2025 Phaser Studio Inc.
4020 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4021 */var x=function(t){return 1-Math.pow(2,-10*t)};c.exports=x},48857:(c,x,t)=>{/**
4022 * @author       Richard Davey <[email protected]>
4023 * @copyright    2013-2025 Phaser Studio Inc.
4024 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4025 */c.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(c,x,t)=>{/**
4026 * @author       Richard Davey <[email protected]>
4027 * @copyright    2013-2025 Phaser Studio Inc.
4028 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4029 */c.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:c=>{/**
4030 * @author       Richard Davey <[email protected]>
4031 * @copyright    2013-2025 Phaser Studio Inc.
4032 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4033 */var x=function(t){return t};c.exports=x},81596:(c,x,t)=>{/**
4034 * @author       Richard Davey <[email protected]>
4035 * @copyright    2013-2025 Phaser Studio Inc.
4036 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4037 */c.exports=t(7147)},34826:c=>{/**
4038 * @author       Richard Davey <[email protected]>
4039 * @copyright    2013-2025 Phaser Studio Inc.
4040 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4041 */var x=function(t){return t*t};c.exports=x},20544:c=>{/**
4042 * @author       Richard Davey <[email protected]>
4043 * @copyright    2013-2025 Phaser Studio Inc.
4044 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4045 */var x=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};c.exports=x},92029:c=>{/**
4046 * @author       Richard Davey <[email protected]>
4047 * @copyright    2013-2025 Phaser Studio Inc.
4048 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4049 */var x=function(t){return t*(2-t)};c.exports=x},59133:(c,x,t)=>{/**
4050 * @author       Richard Davey <[email protected]>
4051 * @copyright    2013-2025 Phaser Studio Inc.
4052 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4053 */c.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:c=>{/**
4054 * @author       Richard Davey <[email protected]>
4055 * @copyright    2013-2025 Phaser Studio Inc.
4056 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4057 */var x=function(t){return t*t*t*t};c.exports=x},78137:c=>{/**
4058 * @author       Richard Davey <[email protected]>
4059 * @copyright    2013-2025 Phaser Studio Inc.
4060 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4061 */var x=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};c.exports=x},45840:c=>{/**
4062 * @author       Richard Davey <[email protected]>
4063 * @copyright    2013-2025 Phaser Studio Inc.
4064 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4065 */var x=function(t){return 1- --t*t*t*t};c.exports=x},98516:(c,x,t)=>{/**
4066 * @author       Richard Davey <[email protected]>
4067 * @copyright    2013-2025 Phaser Studio Inc.
4068 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4069 */c.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:c=>{/**
4070 * @author       Richard Davey <[email protected]>
4071 * @copyright    2013-2025 Phaser Studio Inc.
4072 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4073 */var x=function(t){return t*t*t*t*t};c.exports=x},16509:c=>{/**
4074 * @author       Richard Davey <[email protected]>
4075 * @copyright    2013-2025 Phaser Studio Inc.
4076 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4077 */var x=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};c.exports=x},17868:c=>{/**
4078 * @author       Richard Davey <[email protected]>
4079 * @copyright    2013-2025 Phaser Studio Inc.
4080 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4081 */var x=function(t){return--t*t*t*t*t+1};c.exports=x},35248:(c,x,t)=>{/**
4082 * @author       Richard Davey <[email protected]>
4083 * @copyright    2013-2025 Phaser Studio Inc.
4084 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4085 */c.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:c=>{/**
4086 * @author       Richard Davey <[email protected]>
4087 * @copyright    2013-2025 Phaser Studio Inc.
4088 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4089 */var x=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};c.exports=x},34025:c=>{/**
4090 * @author       Richard Davey <[email protected]>
4091 * @copyright    2013-2025 Phaser Studio Inc.
4092 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4093 */var x=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};c.exports=x},52768:c=>{/**
4094 * @author       Richard Davey <[email protected]>
4095 * @copyright    2013-2025 Phaser Studio Inc.
4096 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4097 */var x=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};c.exports=x},82500:(c,x,t)=>{/**
4098 * @author       Richard Davey <[email protected]>
4099 * @copyright    2013-2025 Phaser Studio Inc.
4100 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4101 */c.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:c=>{/**
4102 * @author       Richard Davey <[email protected]>
4103 * @copyright    2013-2025 Phaser Studio Inc.
4104 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4105 */var x=function(t,o){return o===void 0&&(o=1),t<=0?0:t>=1?1:((o*t|0)+1)*(1/o)};c.exports=x},49752:(c,x,t)=>{/**
4106 * @author       Richard Davey <[email protected]>
4107 * @copyright    2013-2025 Phaser Studio Inc.
4108 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4109 */c.exports=t(72251)},75698:c=>{/**
4110 * @author       Richard Davey <[email protected]>
4111 * @copyright    2013-2025 Phaser Studio Inc.
4112 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4113 */var x=function(t,o){return o===void 0&&(o=1e-4),Math.ceil(t-o)};c.exports=x},43855:c=>{/**
4114 * @author       Richard Davey <[email protected]>
4115 * @copyright    2013-2025 Phaser Studio Inc.
4116 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4117 */var x=function(t,o,p){return p===void 0&&(p=1e-4),Math.abs(t-o)<p};c.exports=x},25777:c=>{/**
4118 * @author       Richard Davey <[email protected]>
4119 * @copyright    2013-2025 Phaser Studio Inc.
4120 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4121 */var x=function(t,o){return o===void 0&&(o=1e-4),Math.floor(t+
4121o)};c.exports=x},5470:c=>{/**
4122 * @author       Richard Davey <[email protected]>
4123 * @copyright    2013-2025 Phaser Studio Inc.
4124 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4125 */var x=function(t,o,p){return p===void 0&&(p=1e-4),t>o-p};c.exports=x},94977:c=>{/**
4126 * @author       Richard Davey <[email protected]>
4127 * @copyright    2013-2025 Phaser Studio Inc.
4128 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4129 */var x=function(t,o,p){return p===void 0&&(p=1e-4),t<o+p};c.exports=x},48379:(c,x,t)=>{/**
4130 * @author       Richard Davey <[email protected]>
4131 * @copyright    2013-2025 Phaser Studio Inc.
4132 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4133 */c.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(c,x,t)=>{/**
4134 * @author       Richard Davey <[email protected]>
4135 * @copyright    2013-2025 Phaser Studio Inc.
4136 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4137 */var o=t(36383),p=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=p(!1,a,o),c.exports=a},89318:(c,x,t)=>{/**
4138 * @author       Richard Davey <[email protected]>
4139 * @copyright    2013-2025 Phaser Studio Inc.
4140 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4141 */var o=t(85710),p=function(a,n){for(var r=0,e=a.length-1,s=0;s<=e;s++)r+=Math.pow(1-n,e-s)*Math.pow(n,s)*a[s]*o(e,s);return r};c.exports=p},77259:(c,x,t)=>{/**
4142 * @author       Richard Davey <[email protected]>
4143 * @copyright    2013-2025 Phaser Studio Inc.
4144 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4145 */var o=t(87842),p=function(a,n){var r=a.length-1,e=r*n,s=Math.floor(e);return a[0]===a[r]?(n<0&&(s=Math.floor(e=r*(1+n))),o(e-s,a[(s-1+r)%r],a[s],a[(s+1)%r],a[(s+2)%r])):n<0?a[0]-(o(-e,a[0],a[0],a[1],a[1])-a[0]):n>1?a[r]-(o(e-r,a[r],a[r],a[r-1],a[r-1])-a[r]):o(e-s,a[s?s-1:0],a[s],a[r<s+1?r:s+1],a[r<s+2?r:s+2])};c.exports=p},36316:c=>{/**
4146 * @author       Richard Davey <[email protected]>
4147 * @copyright    2013-2025 Phaser Studio Inc.
4148 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4149 */function x(n,r){var e=1-n;return e*e*e*r}function t(n,r){var e=1-n;return 3*e*e*n*r}function o(n,r){return 3*(1-n)*n*n*r}function p(n,r){return n*n*n*r}var a=function(n,r,e,s,h){return x(n,r)+t(n,e)+o(n,s)+p(n,h)};c.exports=a},28392:(c,x,t)=>{/**
4150 * @author       Richard Davey <[email protected]>
4151 * @copyright    2013-2025 Phaser Studio Inc.
4152 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4153 */var o=t(28915),p=function(a,n){var r=a.length-1,e=r*n,s=Math.floor(e);return n<0?o(a[0],a[1],e):n>1?o(a[r],a[r-1],r-e):o(a[s],a[s+1>r?r:s+1],e-s)};c.exports=p},32112:c=>{/**
4154 * @author       Richard Davey <[email protected]>
4155 * @copyright    2013-2025 Phaser Studio Inc.
4156 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4157 */function x(a,n){var r=1-a;return r*r*n}function t(a,n){return 2*(1-a)*a*n}function o(a,n){return a*a*n}var p=function(a,n,r,e){return x(a,n)+t(a,r)+o(a,e)};c.exports=p},47235:(c,x,t)=>{/**
4158 * @author       Richard Davey <[email protected]>
4159 * @copyright    2013-2025 Phaser Studio Inc.
4160 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4161 */var o=t(7602),p=function(a,n,r){return n+(r-n)*o(a,0,1)};c.exports=p},50178:(c,x,t)=>{/**
4162 * @author       Richard Davey <[email protected]>
4163 * @copyright    2013-2025 Phaser Studio Inc.
4164 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4165 */var o=t(54261),p=function(a,n,r){return n+(r-n)*o(a,0,1)};c.exports=p},38289:(c,x,t)=>{/**
4166 * @author       Richard Davey <[email protected]>
4167 * @copyright    2013-2025 Phaser Studio Inc.
4168 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4169 */c.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:c=>{/**
4170 * @author       Richard Davey <[email protected]>
4171 * @copyright    2013-2025 Phaser Studio Inc.
4172 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4173 */var x=function(t){var o=Math.log(t)/.6931471805599453;return 1<<Math.ceil(o)};c.exports=x},50030:c=>{/**
4174 * @author       Richard Davey <[email protected]>
4175 * @copyright    2013-2025 Phaser Studio Inc.
4176 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4177 */var x=function(t,o){return t>0&&(t&t-1)===0&&o>0&&(o&o-1)===0};c.exports=x},81230:c=>{/**
4178 * @author       Richard Davey <[email protected]>
4179 * @copyright    2013-2025 Phaser Studio Inc.
4180 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4181 */var x=function(t){return t>0&&(t&t-1)===0};c.exports=x},49001:(c,x,t)=>{/**
4182 * @author       Richard Davey <[email protected]>
4183 * @copyright    2013-2025 Phaser Studio Inc.
4184 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4185 */c.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(c,x,t)=>{/**
4186 * @author       Richard Davey <[email protected]>
4187 * @copyright    2013-2025 Phaser Studio Inc.
4188 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4189 */var o=t(83419),p=new o({initialize:function(n){n===void 0&&(n=[(Date.now()
4189*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],n&&this.init(n)},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 n,r=this.n;a=a.toString();for(var e=0;e<a.length;e++)r+=a.charCodeAt(e),n=.02519603282416938*r,r=n>>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296;return this.n=r,(r>>>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 n=0;n<a.length&&a[n]!=null;n++){var r=a[n];this.s0-=this.hash(r),this.s0+=~~(this.s0<0),this.s1-=this.hash(r),this.s1+=~~(this.s1<0),this.s2-=this.hash(r),this.s2+=~~(this.s2<0)}},integer:function(){return this.rnd()*4294967296},frac:function(){return this.rnd()+(this.rnd()*2097152|0)*11102230246251565e-32},real:function(){return this.integer()+this.frac()},integerInRange:function(a,n){return Math.floor(this.realInRange(0,n-a+1)+a)},between:function(a,n){return Math.floor(this.realInRange(0,n-a+1)+a)},realInRange:function(a,n){return this.frac()*(n-a)+a},normal:function(){return 1-2*this.frac()},uuid:function(){var a="",n="";for(n=a="";a++<36;n+=~a%5|a*3&4?(a^15?8^this.frac()*(a^20?16:4):4).toString(16):"-");return n},pick:function(a){return a[this.integerInRange(0,a.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(a){return a[~~(Math.pow(this.frac(),2)*(a.length-.5)+.5)]},timestamp:function(a,n){return this.realInRange(a||9466848e5,n||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(a){return typeof a=="string"&&a.match(/^!rnd/)&&(a=a.split(","),this.c=parseFloat(a[1]),this.s0=parseFloat(a[2]),this.s1=parseFloat(a[3]),this.s2=parseFloat(a[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(a){for(var n=a.length-1,r=n;r>0;r--){var e=Math.floor(this.frac()*(r+1)),s=a[e];a[e]=a[r],a[r]=s}return a}});c.exports=p},63448:c=>{/**
4190 * @author       Richard Davey <[email protected]>
4191 * @copyright    2013-2025 Phaser Studio Inc.
4192 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4193 */var x=function(t,o,p,a){return p===void 0&&(p=0),o===0?t:(t-=p,t=o*Math.ceil(t/o),a?(p+t)/o:p+t)};c.exports=x},56583:c=>{/**
4194 * @author       Richard Davey <[email protected]>
4195 * @copyright    2013-2025 Phaser Studio Inc.
4196 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4197 */var x=function(t,o,p,a){return p===void 0&&(p=0),o===0?t:(t-=p,t=o*Math.floor(t/o),a?(p+t)/o:p+t)};c.exports=x},77720:c=>{/**
4198 * @author       Richard Davey <[email protected]>
4199 * @copyright    2013-2025 Phaser Studio Inc.
4200 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4201 */var x=function(t,o,p,a){return p===void 0&&(p=0),o===0?t:(t-=p,t=o*Math.round(t/o),a?(p+t)/o:p+t)};c.exports=x},73697:(c,x,t)=>{/**
4202 * @author       Richard Davey <[email protected]>
4203 * @copyright    2013-2025 Phaser Studio Inc.
4204 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4205 */c.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(c,x,t)=>{/**
4206 * @author       Richard Davey <[email protected]>
4207 * @copyright    2013-2025 Phaser Studio Inc.
4208 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4209 */t(63595);var o=t(8054),p=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=p(!1,a,o),c.exports=a,t.g.Phaser=a},71289:(c,x,t)=>{/**
4210 * @author       Richard Davey <[email protected]>
4211 * @copyright    2013-2025 Phaser Studio Inc.
4212 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4213 */var o=t(83419),p=t(92209),a=t(88571),n=new o({Extends:a,Mixins:[p.Acceleration,p.Angular,p.Bounce,p.Collision,p.Debug,p.Drag,p.Enable,p.Friction,p.Gravity,p.Immovable,p.Mass,p.Pushable,p.Size,p.Velocity],initialize:function(e,s,h,i,l){a.call(this,e,s,h,i,l),this.body=null}});c.exports=n},86689:(c,x,t)=>{/**
4214 * @author       Richard Davey <[email protected]>
4215 * @copyright    2013-2025 Phaser Studio Inc.
4216 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4217 */var o=t(83419),p=t(39506),a=t(20339),n=t(89774),r=t(66022),e=t(95540),s=t(46975),h=t(72441),i=t(47956),l=t(37277),u=t(44594),d=t(26099),f=t(82248),v=new o({initialize:function(y){this.scene=y,this.systems=y.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,y.sys.events.once(u.BOOT,this.boot,this),y.sys.events.on(u.START,this.start,this)},boot:function(){this.world=new f(this.scene,this.config),this.add=new r(this.world),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new f(this.scene,this.config),this.add=new r(this.world));var m=this.systems.events;e(this.config,"customUpdate",!1)||m.on(u.UPDATE,this.world.update,this.world),m.on(u.POST_UPDATE,this.world.postUpdate,this.world),m.once(u.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(u.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(u.UPDATE,this.world.update,this.world)},getConfig:function(){var m=this.systems.game.config.physics,y=this.systems.settings.physics,g=s(e(y,"arcade",{}
4217),e(m,"arcade",{}));return g},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(m,y,g,T,S){return g===void 0&&(g=null),T===void 0&&(T=null),S===void 0&&(S=g),this.world.collideObjects(m,y,g,T,S,!0)},collide:function(m,y,g,T,S){return g===void 0&&(g=null),T===void 0&&(T=null),S===void 0&&(S=g),this.world.collideObjects(m,y,g,T,S,!1)},collideTiles:function(m,y,g,T,S){return this.world.collideTiles(m,y,g,T,S)},overlapTiles:function(m,y,g,T,S){return this.world.overlapTiles(m,y,g,T,S)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(m,y,g,T,S,E){T===void 0&&(T=60);var M=Math.atan2(g-m.y,y-m.x);return m.body.acceleration.setToPolar(M,T),S!==void 0&&E!==void 0&&m.body.maxVelocity.set(S,E),M},accelerateToObject:function(m,y,g,T,S){return this.accelerateTo(m,y.x,y.y,g,T,S)},closest:function(m,y){y||(y=this.world.bodies.entries);for(var g=Number.MAX_VALUE,T=null,S=m.x,E=m.y,M=y.length,F=0;F<M;F++){var A=y[F],P=A.body||A;if(!(m===A||m===P||m===P.gameObject||m===P.center)){var L=n(S,E,P.center.x,P.center.y);L<g&&(T=A,g=L)}}return T},furthest:function(m,y){y||(y=this.world.bodies.entries);for(var g=-1,T=null,S=m.x,E=m.y,M=y.length,F=0;F<M;F++){var A=y[F],P=A.body||A;if(!(m===A||m===P||m===P.gameObject||m===P.center)){var L=n(S,E,P.center.x,P.center.y);L>g&&(T=A,g=L)}}return T},moveTo:function(m,y,g,T,S){T===void 0&&(T=60),S===void 0&&(S=0);var E=Math.atan2(g-m.y,y-m.x);return S>0&&(T=a(m.x,m.y,y,g)/(S/1e3)),m.body.velocity.setToPolar(E,T),E},moveToObject:function(m,y,g,T){return this.moveTo(m,y.x,y.y,g,T)},velocityFromAngle:function(m,y,g){return y===void 0&&(y=60),g===void 0&&(g=new d),g.setToPolar(p(m),y)},velocityFromRotation:function(m,y,g){return y===void 0&&(y=60),g===void 0&&(g=new d),g.setToPolar(m,y)},overlapRect:function(m,y,g,T,S,E){return i(this.world,m,y,g,T,S,E)},overlapCirc:function(m,y,g,T,S){return h(this.world,m,y,g,T,S)},shutdown:function(){if(this.world){var m=this.systems.events;m.off(u.UPDATE,this.world.update,this.world),m.off(u.POST_UPDATE,this.world.postUpdate,this.world),m.off(u.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(u.START,this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",v,"arcadePhysics"),c.exports=v},13759:(c,x,t)=>{/**
4218 * @author       Richard Davey <[email protected]>
4219 * @copyright    2013-2025 Phaser Studio Inc.
4220 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4221 */var o=t(83419),p=t(92209),a=t(68287),n=new o({Extends:a,Mixins:[p.Acceleration,p.Angular,p.Bounce,p.Collision,p.Debug,p.Drag,p.Enable,p.Friction,p.Gravity,p.Immovable,p.Mass,p.Pushable,p.Size,p.Velocity],initialize:function(e,s,h,i,l){a.call(this,e,s,h,i,l),this.body=null}});c.exports=n},37742:(c,x,t)=>{/**
4222 * @author       Richard Davey <[email protected]>
4223 * @copyright    2013-2025 Phaser Studio Inc.
4224 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4225 */var o=t(83419),p=t(78389),a=t(37747),n=t(63012),r=t(43396),e=t(87841),s=t(37303),h=t(95829),i=t(26099),l=new o({Mixins:[p],initialize:function(d,f){var v=64,m=64,y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(v=f.displayWidth,m=f.displayHeight),g||(f=y),this.world=d,this.gameObject=g?f:void 0,this.isBody=!0,this.transform={x:f.x,y:f.y,rotation:f.angle,scaleX:f.scaleX,scaleY:f.scaleY,displayOriginX:f.displayOriginX,displayOriginY:f.displayOriginY},this.debugShowBody=d.defaults.debugShowBody,this.debugShowVelocity=d.defaults.debugShowVelocity,this.debugBodyColor=d.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-f.scaleX*f.displayOriginX,f.y-f.scaleY*f.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=f.angle,this.preRotation=f.angle,this.width=v,this.height=m,this.sourceWidth=v,this.sourceHeight=m,f.frame&&(this.sourceWidth=f.frame.realWidth,this.sourceHeight=f.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(m/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=d.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=f.scaleX,this._sy=f.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 u=this.gameObject,d=this.transform;if(u.parentContainer){var f=u.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);d.x=f.tx,d.y=f.ty,d.rotation=r(f.rotation),d.scaleX=f.scaleX,d.scaleY=f.scaleY,d.displayOriginX=u.displayOriginX,d.displayOriginY=u.displayOriginY}else d.x=u.x,d.y=u.y,d.rotation=u.angle,d.scaleX=u.scaleX,d.scaleY=u.scaleY,d.displayOriginX=u.displayOriginX,d.displayOriginY=u.displayOriginY;var v=!1;if(this.syncBounds){var m=u.getBounds(this._bounds);this.width=m.width,this.height=m.height,v=!0}else{var y=Math.abs(d.scaleX),g=Math.abs(d.scaleY);(this._sx!==y||this._sy!==g)&&(this.width=this.sourceWidth*y,this.height=this.sourceHeight*g,this._sx=y,this._sy=g,v=!0)}v&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var u=this.transform;this.position.x=u.x+u.scaleX*(this.offset.x-u.displayOriginX),this.position.y=u.y+u.scaleY*(this.offset.y-u.displayOriginY),this.updateCenter()},resetFlags:function(u){u===void 0&&(u=!1);var d=this.wasTouching,f=this.touching,v=this.blocked;
4225u?h(!0,d):(d.none=f.none,d.up=f.up,d.down=f.down,d.left=f.left,d.right=f.right),h(!0,f),h(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(u,d){if(u&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var f=this.position;this.prev.x=f.x,this.prev.y=f.y,this.prevFrame.x=f.x,this.prevFrame.y=f.y}u&&this.update(d)},update:function(u){var d=this.prev,f=this.position,v=this.velocity;if(d.set(f.x,f.y),!this.moves){this._dx=f.x-d.x,this._dy=f.y-d.y;return}if(this.directControl){var m=this.autoFrame;v.set((f.x-m.x)/u,(f.y-m.y)/u),this.world.updateMotion(this,u),this._dx=f.x-m.x,this._dy=f.y-m.y}else this.world.updateMotion(this,u),this.newVelocity.set(v.x*u,v.y*u),f.add(this.newVelocity),this._dx=f.x-d.x,this._dy=f.y-d.y;var y=v.x,g=v.y;if(this.updateCenter(),this.angle=Math.atan2(g,y),this.speed=Math.sqrt(y*y+g*g),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var T=this.blocked;this.world.emit(n.WORLD_BOUNDS,this,T.up,T.down,T.left,T.right)}},postUpdate:function(){var u=this.position,d=u.x-this.prevFrame.x,f=u.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var m=this.deltaMax.x,y=this.deltaMax.y;m!==0&&d!==0&&(d<0&&d<-m?d=-m:d>0&&d>m&&(d=m)),y!==0&&f!==0&&(f<0&&f<-y?f=-y:f>0&&f>y&&(f=y)),v&&(v.x+=d,v.y+=f)}d<0?this.facing=a.FACING_LEFT:d>0&&(this.facing=a.FACING_RIGHT),f<0?this.facing=a.FACING_UP:f>0&&(this.facing=a.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=d,this._ty=f,this.autoFrame.set(u.x,u.y)},setBoundsRectangle:function(u){return this.customBoundsRectangle=u||this.world.bounds,this},checkWorldBounds:function(){var u=this.position,d=this.velocity,f=this.blocked,v=this.customBoundsRectangle,m=this.world.checkCollision,y=this.worldBounce?-this.worldBounce.x:-this.bounce.x,g=this.worldBounce?-this.worldBounce.y:-this.bounce.y,T=!1;return u.x<v.x&&m.left?(u.x=v.x,d.x*=y,f.left=!0,T=!0):this.right>v.right&&m.right&&(u.x=v.right-this.width,d.x*=y,f.right=!0,T=!0),u.y<v.y&&m.up?(u.y=v.y,d.y*=g,f.up=!0,T=!0):this.bottom>v.bottom&&m.down&&(u.y=v.bottom-this.height,d.y*=g,f.down=!0,T=!0),T&&(this.blocked.none=!1,this.updateCenter()),T},setOffset:function(u,d){return d===void 0&&(d=u),this.offset.set(u,d),this},setGameObject:function(u,d){if(d===void 0&&(d=!0),!u||!u.hasTransformComponent)return this;var f=this.world;return this.gameObject&&this.gameObject.body&&(f.disable(this.gameObject),this.gameObject.body=null),u.body&&f.disable(u),this.gameObject=u,u.body=this,this.setSize(),this.enable=d,this},setSize:function(u,d,f){f===void 0&&(f=!0);var v=this.gameObject;if(v&&(!u&&v.frame&&(u=v.frame.realWidth),!d&&v.frame&&(d=v.frame.realHeight)),this.sourceWidth=u,this.sourceHeight=d,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(),f&&v&&v.getCenter){var m=(v.width-u)/2,y=(v.height-d)/2;this.offset.set(m,y)}return this.isCircle=!1,this.radius=0,this},setCircle:function(u,d,f){return d===void 0&&(d=this.offset.x),f===void 0&&(f=this.offset.y),u>0?(this.isCircle=!0,this.radius=u,this.sourceWidth=u*2,this.sourceHeight=u*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(d,f),this.updateCenter()):this.isCircle=!1,this},reset:function(u,d){this.stop();var f=this.gameObject;f&&(f.setPosition(u,d),this.rotation=f.angle,this.preRotation=f.angle);var v=this.position;f&&f.getTopLeft?f.getTopLeft(v):v.set(u,d),this.prev.copy(v),this.prevFrame.copy(v),this.autoFrame.copy(v),f&&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(u){return u.x=this.x,u.y=this.y,u.right=this.right,u.bottom=this.bottom,u},hitTest:function(u,d){if(!this.isCircle)return s(this,u,d);if(this.radius>0&&u>=this.left&&u<=this.right&&d>=this.top&&d<=this.bottom){var f=(this.center.x-u)*(this.center.x-u),v=(this.center.y-d)*(this.center.y-d);return f+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>
42250?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(u){var d=this.position,f=d.x+this.halfWidth,v=d.y+this.halfHeight;this.debugShowBody&&(u.lineStyle(u.defaultStrokeWidth,this.debugBodyColor),this.isCircle?u.strokeCircle(f,v,this.width/2):(this.checkCollision.up&&u.lineBetween(d.x,d.y,d.x+this.width,d.y),this.checkCollision.right&&u.lineBetween(d.x+this.width,d.y,d.x+this.width,d.y+this.height),this.checkCollision.down&&u.lineBetween(d.x,d.y+this.height,d.x+this.width,d.y+this.height),this.checkCollision.left&&u.lineBetween(d.x,d.y,d.x,d.y+this.height))),this.debugShowVelocity&&(u.lineStyle(u.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),u.lineBetween(f,v,f+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(u){return u===void 0&&(u=!0),this.directControl=u,this},setCollideWorldBounds:function(u,d,f,v){u===void 0&&(u=!0),this.collideWorldBounds=u;var m=d!==void 0,y=f!==void 0;return(m||y)&&(this.worldBounce||(this.worldBounce=new i),m&&(this.worldBounce.x=d),y&&(this.worldBounce.y=f)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(u,d){return this.velocity.set(u,d),u=this.velocity.x,d=this.velocity.y,this.speed=Math.sqrt(u*u+d*d),this},setVelocityX:function(u){return this.setVelocity(u,this.velocity.y)},setVelocityY:function(u){return this.setVelocity(this.velocity.x,u)},setMaxVelocity:function(u,d){return this.maxVelocity.set(u,d),this},setMaxVelocityX:function(u){return this.maxVelocity.x=u,this},setMaxVelocityY:function(u){return this.maxVelocity.y=u,this},setMaxSpeed:function(u){return this.maxSpeed=u,this},setSlideFactor:function(u,d){return this.slideFactor.set(u,d),this},setBounce:function(u,d){return this.bounce.set(u,d),this},setBounceX:function(u){return this.bounce.x=u,this},setBounceY:function(u){return this.bounce.y=u,this},setAcceleration:function(u,d){return this.acceleration.set(u,d),this},setAccelerationX:function(u){return this.acceleration.x=u,this},setAccelerationY:function(u){return this.acceleration.y=u,this},setAllowDrag:function(u){return u===void 0&&(u=!0),this.allowDrag=u,this},setAllowGravity:function(u){return u===void 0&&(u=!0),this.allowGravity=u,this},setAllowRotation:function(u){return u===void 0&&(u=!0),this.allowRotation=u,this},setDrag:function(u,d){return this.drag.set(u,d),this},setDamping:function(u){return this.useDamping=u,this},setDragX:function(u){return this.drag.x=u,this},setDragY:function(u){return this.drag.y=u,this},setGravity:function(u,d){return this.gravity.set(u,d),this},setGravityX:function(u){return this.gravity.x=u,this},setGravityY:function(u){return this.gravity.y=u,this},setFriction:function(u,d){return this.friction.set(u,d),this},setFrictionX:function(u){return this.friction.x=u,this},setFrictionY:function(u){return this.friction.y=u,this},setAngularVelocity:function(u){return this.angularVelocity=u,this},setAngularAcceleration:function(u){return this.angularAcceleration=u,this},setAngularDrag:function(u){return this.angularDrag=u,this},setMass:function(u){return this.mass=u,this},setImmovable:function(u){return u===void 0&&(u=!0),this.immovable=u,this},setEnable:function(u){return u===void 0&&(u=!0),this.enable=u,this},processX:function(u,d,f,v){this.x+=u,this.updateCenter(),d!==null&&(this.velocity.x=d*this.slideFactor.x);var m=this.blocked;f&&(m.left=!0,m.none=!1),v&&(m.right=!0,m.none=!1)},processY:function(u,d,f,v){this.y+=u,this.updateCenter(),d!==null&&(this.velocity.y=d*this.slideFactor.y);var m=this.blocked;f&&(m.up=!0,m.none=!1),v&&(m.down=!0,m.none=!1)},x:{get:function(){return this.position.x},set:function(u){this.position.x=u}},y:{get:function(){return this.position.y},set:function(u){this.position.y=u}},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}}});c.exports=l},79342:(c,x,t)=>{/**
4226 * @author       Richard Davey <[email protected]>
4227 * @copyright    2013-2025 Phaser Studio Inc.
4228 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4229 */var o=t(83419),p=new o({initialize:function(n,r,e,s,h,i,l){this.world=n,this.name="",this.active=!0,this.overlapOnly=r,this.object1=e,this.object2=s,this.collideCallback=h,this.processCallback=i,this.callbackContext=l},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}});c.exports=p},66022:(c,x,t)=>{/**
4230 * @author       Richard Davey <[email protected]>
4231 * @copyright    2013-2025 Phaser Studio Inc.
4232 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4233 */var o=t(71289),p=t(13759),a=t(37742),n=t(83419),r=t(37747),e=t(60758),s=t(72624),h=t(71464),i=new n({initialize:function(u){this.world=u,this.scene=u.scene,this.sys=u.scene.sys},collider:function(l,u,d,f,v){return this.world.addCollider(l,u,d,f,v)},overlap:function(l,u,d,f,v){return this.world.addOverlap(l,u,d,f,v)},existing:function(l,u){var d=u?r.STATIC_BODY:r.DYNAMIC_BODY;return this.world.enableBody(l,d),l},staticImage:function(l,u,d,f){var v=new o(this.scene,l,u,d,f);return this.sys.displayList.add(v),this.world.enableBody(v,r.STATIC_BODY),v},image:function(l,u,d,f){var v=new o(this.scene,l,u,d,f);return this.sys.displayList.add(v),this.world.enableBody(v,r.DYNAMIC_BODY),v},staticSprite:function(l,u,d,f){var v=new p(this.scene,l,u,d,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,r.STATIC_BODY),v},sprite:function(l,u,d,f){var v=new p(this.scene,l,u,d,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,r.DYNAMIC_BODY),v},staticGroup:function(l,u){return this.sys.updateList.add(new h(this.world,this.world.scene,l,u))},group:function(l,u){return this.sys.updateList.add(new e(this.world,this.world.scene,l,u))},body:function(l,u,d,f){var v=new a(this.world);return v.position.set(l,u),d&&f&&v.setSize(d,f),this.world.add(v,r.DYNAMIC_BODY),v},staticBody:function(l,u,d,f){var v=new s(this.world);return v.position.set(l,u),d&&f&&v.setSize(d,f),this.world.add(v,r.STATIC_BODY),v},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=i},79599:c=>{/**
4234 * @author       Richard Davey <[email protected]>
4235 * @copyright    2013-2025 Phaser Studio Inc.
4236 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4237 */var x=function(t){var o=0;if(!Array.isArray(t))o=t;else for(var p=0;p<t.length;p++)o|=t[p];return o};c.exports=x},64897:(c,x,t)=>{/**
4238 * @author       Richard Davey <[email protected]>
4239 * @copyright    2013-2025 Phaser Studio Inc.
4240 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4241 */var o=t(37747),p=function(a,n,r,e){var s=0,h=a.deltaAbsX()+n.deltaAbsX()+e;return a._dx===0&&n._dx===0?(a.embedded=!0,n.embedded=!0):a._dx>n._dx?(s=a.right-n.x,s>h&&!r||a.checkCollision.right===!1||n.checkCollision.left===!1?s=0:(a.touching.none=!1,a.touching.right=!0,n.touching.none=!1,n.touching.left=!0,n.physicsType===o.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.right=!0),a.physicsType===o.STATIC_BODY&&!r&&(n.blocked.none=!1,n.blocked.left=!0))):a._dx<n._dx&&(s=a.x-n.width-n.x,-s>h&&!r||a.checkCollision.left===!1||n.checkCollision.right===!1?s=0:(a.touching.none=!1,a.touching.left=!0,n.touching.none=!1,n.touching.right=!0,n.physicsType===o.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.left=!0),a.physicsType===o.STATIC_BODY&&!r&&(n.blocked.none=!1,n.blocked.right=!0))),a.overlapX=s,n.overlapX=s,s};c.exports=p},45170:(c,x,t)=>{/**
4242 * @author       Richard Davey <[email protected]>
4243 * @copyright    2013-2025 Phaser Studio Inc.
4244 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4245 */var o=t(37747),p=function(a,n,r,e){var s=0,h=a.deltaAbsY()+n.deltaAbsY()+e;return a._dy===0&&n._dy===0?(a.embedded=!0,n.embedded=!0):a._dy>n._dy?(s=a.bottom-n.y,s>h&&!r||a.checkCollision.down===!1||n.checkCollision.up===!1?s=0:(a.touching.none=!1,a.touching.down=!0,n.touching.none=!1,n.touching.up=!0,n.physicsType===o.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.down=!0),a.physicsType===o.STATIC_BODY&&!r&&(n.blocked.none=!1,n.blocked.up=!0))):a._dy<n._dy&&(s=a.y-n.bottom,-s>h&&!r||a.checkCollision.up===!1||n.checkCollision.down===!1?s=0:(a.touching.none=!1,a.touching.up=!0,n.touching.none=!1,n.touching.down=!0,n.physicsType===o.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.up=!0),a.physicsType===o.STATIC_BODY&&!r&&(n.blocked.none=!1,n.blocked.down=!0))),a.overlapY=s,n.overlapY=s,s};c.exports=p},60758:(c,x,t)=>{/**
4246 * @author       Richard Davey <[email protected]>
4247 * @copyright    2013-2025 Phaser Studio Inc.
4248 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4249 */var o=t(13759),p=t(83419),a=t(78389),n=t(37747),r=t(95540),e=t(26479),s=t(41212),h=new p({Extends:e,Mixins:[a],initialize:function(l,u,d,f){if(!d&&!f)f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(d))f=d,d=null,f.internalCreateCallback=this.createCallbackHandler,f.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(d)&&s(d[0])){var v=this;d.forEach(function(m){m.internalCreateCallback=v.createCallbackHandler,m.internalRemoveCallback=v.removeCallbackHandler,m.classType=r(m,"classType",o)}),f=null}else f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=l,f&&(f.classType=r(f,"classType",o)),this.physicsType=n.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:r(f,"collideWorldBounds",!1),setBoundsRectangle:r(f,"customBoundsRectangle",null),setAccelerationX:r(f,"accelerationX",0),setAccelerationY:r(f,"accelerationY",0),setAllowDrag:r(f,"allowDrag",!0),setAllowGravity:r(f,"allowGravity",!0),setAllowRotation:r(f,"allowRotation",!0),setDamping:r(f,"useDamping",!1),setBounceX:r(f,"bounceX",0),setBounceY:r(f,"bounceY",0),setDragX:r(f,"dragX",0),setDragY:r(f,"dragY",0),setEnable:r(f,"enable",!0),setGravityX:r(f,"gravityX",0),setGravityY:r(f,"gravityY",0),setFrictionX:r(f,"frictionX",0),setFrictionY:r(f,"frictionY",0),setMaxSpeed:r(f,"maxSpeed",-1),setMa
4249xVelocityX:r(f,"maxVelocityX",1e4),setMaxVelocityY:r(f,"maxVelocityY",1e4),setVelocityX:r(f,"velocityX",0),setVelocityY:r(f,"velocityY",0),setAngularVelocity:r(f,"angularVelocity",0),setAngularAcceleration:r(f,"angularAcceleration",0),setAngularDrag:r(f,"angularDrag",0),setMass:r(f,"mass",1),setImmovable:r(f,"immovable",!1)},e.call(this,u,d,f),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,n.DYNAMIC_BODY);var l=i.body;for(var u in this.defaults)l[u](this.defaults[u])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,l,u){u===void 0&&(u=0);for(var d=this.getChildren(),f=0;f<d.length;f++)d[f].body.velocity.set(i+f*u,l+f*u);return this},setVelocityX:function(i,l){l===void 0&&(l=0);for(var u=this.getChildren(),d=0;d<u.length;d++)u[d].body.velocity.x=i+d*l;return this},setVelocityY:function(i,l){l===void 0&&(l=0);for(var u=this.getChildren(),d=0;d<u.length;d++)u[d].body.velocity.y=i+d*l;return this}});c.exports=h},3017:c=>{/**
4250 * @author       Richard Davey <[email protected]>
4251 * @copyright    2013-2025 Phaser Studio Inc.
4252 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4253 */var x,t,o,p,a,n,r,e,s,h,i,l,u,d,f,v,m,y=function(F,A,P){x=F,t=A;var L=x.velocity.x,O=t.velocity.x;return o=x.pushable,s=x._dx<0,h=x._dx>0,i=x._dx===0,f=Math.abs(x.right-t.x)<=Math.abs(t.right-x.x),r=O-L*x.bounce.x,p=t.pushable,l=t._dx<0,u=t._dx>0,d=t._dx===0,v=!f,e=L-O*t.bounce.x,m=Math.abs(P),g()},g=function(){return h&&f&&t.blocked.right?(x.processX(-m,r,!1,!0),1):s&&v&&t.blocked.left?(x.processX(m,r,!0),1):u&&v&&x.blocked.right?(t.processX(-m,e,!1,!0),2):l&&f&&x.blocked.left?(t.processX(m,e,!0),2):0},T=function(){var F=x.velocity.x,A=t.velocity.x,P=Math.sqrt(A*A*t.mass/x.mass)*(A>0?1:-1),L=Math.sqrt(F*F*x.mass/t.mass)*(F>
42530?1:-1),O=(P+L)*.5;return P-=O,L-=O,a=O+P*x.bounce.x,n=O+L*t.bounce.x,s&&v?S(0):l&&f?S(1):h&&f?S(2):u&&v?S(3):!1},S=function(F){if(o&&p)m*=.5,F===0||F===3?(x.processX(m,a),t.processX(-m,n)):(x.processX(-m,a),t.processX(m,n));else if(o&&!p)F===0||F===3?x.processX(m,r,!0):x.processX(-m,r,!1,!0);else if(!o&&p)F===0||F===3?t.processX(-m,e,!1,!0):t.processX(m,e,!0);else{var A=m*.5;F===0?d?(x.processX(m,0,!0),t.processX(0,null,!1,!0)):u?(x.processX(A,0,!0),t.processX(-A,0,!1,!0)):(x.processX(A,t.velocity.x,!0),t.processX(-A,null,!1,!0)):F===1?i?(x.processX(0,null,!1,!0),t.processX(m,0,!0)):h?(x.processX(-A,0,!1,!0),t.processX(A,0,!0)):(x.processX(-A,null,!1,!0),t.processX(A,x.velocity.x,!0)):F===2?d?(x.processX(-m,0,!1,!0),t.processX(0,null,!0)):l?(x.processX(-A,0,!1,!0),t.processX(A,0,!0)):(x.processX(-A,t.velocity.x,!1,!0),t.processX(A,null,!0)):F===3&&(i?(x.processX(0,null,!0),t.processX(-m,0,!1,!0)):s?(x.processX(A,0,!0),t.processX(-A,0,!1,!0)):(x.processX(A,t.velocity.y,!0),t.processX(-A,null,!1,!0)))}return!0},E=function(F){if(F===1?t.velocity.x=0:f?t.processX(m,e,!0):t.processX(-m,e,!1,!0),x.moves){var A=x.directControl?x.y-x.autoFrame.y:x.y-x.prev.y;t.y+=A*x.friction.y,t._dy=t.y-t.prev.y}},M=function(F){if(F===2?x.velocity.x=0:v?x.processX(m,r,!0):x.processX(-m,r,!1,!0),t.moves){var A=t.directControl?t.y-t.autoFrame.y:t.y-t.prev.y;x.y+=A*t.friction.y,x._dy=x.y-x.prev.y}};c.exports={BlockCheck:g,Check:T,Set:y,Run:S,RunImmovableBody1:E,RunImmovableBody2:M}},47962:c=>{/**
4254 * @author       Richard Davey <[email protected]>
4255 * @copyright    2013-2025 Phaser Studio Inc.
4256 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4257 */var x,t,o,p,a,n,r,e,s,h,i,l,u,d,f,v,m,y=function(F,A,P){x=F,t=A;var L=x.velocity.y,O=t.velocity.y;return o=x.pushable,s=x._dy<0,h=x._dy>0,i=x._dy===0,f=Math.abs(x.bottom-t.y)<=Math.abs(t.bottom-x.y),r=O-L*x.bounce.y,p=t.pushable,l=t._dy<0,u=t._dy>0,d=t._dy===0,v=!f,e=L-O*t.bounce.y,m=Math.abs(P),g()},g=function(){return h&&f&&t.blocked.down?(x.processY(-m,r,!1,!0),1):s&&v&&t.blocked.up?(x.processY(m,r,!0),1):u&&v&&x.blocked.down?(t.processY(-m,e,!1,!0),2):l&&f&&x.blocked.up?(t.processY(m,e,!0),2):0},T=function(){var F=x.velocity.y,A=t.velocity.y,P=Math.sqrt(A*A*t.mass/x.mass)*(A>0?1:-1),L=Math.sqrt(F*F*x.mass/t.mass)*(F>
42570?1:-1),O=(P+L)*.5;return P-=O,L-=O,a=O+P*x.bounce.y,n=O+L*t.bounce.y,s&&v?S(0):l&&f?S(1):h&&f?S(2):u&&v?S(3):!1},S=function(F){if(o&&p)m*=.5,F===0||F===3?(x.processY(m,a),t.processY(-m,n)):(x.processY(-m,a),t.processY(m,n));else if(o&&!p)F===0||F===3?x.processY(m,r,!0):x.processY(-m,r,!1,!0);else if(!o&&p)F===0||F===3?t.processY(-m,e,!1,!0):t.processY(m,e,!0);else{var A=m*.5;F===0?d?(x.processY(m,0,!0),t.processY(0,null,!1,!0)):u?(x.processY(A,0,!0),t.processY(-A,0,!1,!0)):(x.processY(A,t.velocity.y,!0),t.processY(-A,null,!1,!0)):F===1?i?(x.processY(0,null,!1,!0),t.processY(m,0,!0)):h?(x.processY(-A,0,!1,!0),t.processY(A,0,!0)):(x.processY(-A,null,!1,!0),t.processY(A,x.velocity.y,!0)):F===2?d?(x.processY(-m,0,!1,!0),t.processY(0,null,!0)):l?(x.processY(-A,0,!1,!0),t.processY(A,0,!0)):(x.processY(-A,t.velocity.y,!1,!0),t.processY(A,null,!0)):F===3&&(i?(x.processY(0,null,!0),t.processY(-m,0,!1,!0)):s?(x.processY(A,0,!0),t.processY(-A,0,!1,!0)):(x.processY(A,t.velocity.y,!0),t.processY(-A,null,!1,!0)))}return!0},E=function(F){if(F===1?t.velocity.y=0:f?t.processY(m,e,!0):t.processY(-m,e,!1,!0),x.moves){var A=x.directControl?x.x-x.autoFrame.x:x.x-x.prev.x;t.x+=A*x.friction.x,t._dx=t.x-t.prev.x}},M=function(F){if(F===2?x.velocity.y=0:v?x.processY(m,r,!0):x.processY(-m,r,!1,!0),t.moves){var A=t.directControl?t.x-t.autoFrame.x:t.x-t.prev.x;x.x+=A*t.friction.x,x._dx=x.x-x.prev.x}};c.exports={BlockCheck:g,Check:T,Set:y,Run:S,RunImmovableBody1:E,RunImmovableBody2:M}},14087:(c,x,t)=>{/**
4258 * @author       Richard Davey <[email protected]>
4259 * @copyright    2013-2025 Phaser Studio Inc.
4260 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4261 */var o=t(64897),p=t(3017),a=function(n,r,e,s,h){h===void 0&&(h=o(n,r,e,s));var i=n.immovable,l=r.immovable;if(e||h===0||i&&l||n.customSeparateX||r.customSeparateX)return h!==0||n.embedded&&r.embedded;var u=p.Set(n,r,h);return!i&&!l?u>0?!0:p.Check():(i?p.RunImmovableBody1(u):l&&p.RunImmovableBody2(u),!0)};c.exports=a},89936:(c,x,t)=>{/**
4262 * @author       Richard Davey <[email protected]>
4263 * @copyright    2013-2025 Phaser Studio Inc.
4264 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4265 */var o=t(45170),p=t(47962),a=function(n,r,e,s,h){h===void 0&&(h=o(n,r,e,s));var i=n.immovable,l=r.immovable;if(e||h===0||i&&l||n.customSeparateY||r.customSeparateY)return h!==0||n.embedded&&r.embedded;var u=p.Set(n,r,h);return!i&&!l?u>0?!0:p.Check():(i?p.RunImmovableBody1(u):l&&p.RunImmovableBody2(u),!0)};c.exports=a},95829:c=>{/**
4266 * @author       Richard Davey <[email protected]>
4267 * @copyright    2013-2025 Phaser Studio Inc.
4268 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4269 */var x=function(t,o){return o===void 0&&(o={}),o.none=t,o.up=!1,o.down=!1,o.left=!1,o.right=!1,t||(o.up=!0,o.down=!0,o.left=!0,o.right=!0),o};c.exports=x},72624:(c,x,t)=>{/**
4270 * @author       Richard Davey <[email protected]>
4271 * @copyright    2013-2025 Phaser Studio Inc.
4272 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4273 */var o=t(87902),p=t(83419),a=t(78389),n=t(37747),r=t(37303),e=t(95829),s=t(26099),h=new p({Mixins:[a],initialize:function(l,u){var d=64,f=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=u!==void 0;m&&u.displayWidth&&(d=u.displayWidth,f=u.displayHeight),m||(u=v),this.world=l,this.gameObject=m?u:void 0,this.isBody=!0,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(u.x-d*u.originX,u.y-f*u.originY),this.width=d,this.height=f,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=n.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,l,u){if(l===void 0&&(l=!0),u===void 0&&(u=!0),!i||!i.hasTransformComponent)return this;var d=this.world;return this.gameObject&&this.gameObject.body&&(d.disable(this.gameObject),this.gameObject.body=null),i.body&&d.disable(i),this.gameObject=i,i.body=this,this.setSize(),l&&this.updateFromGameObject(),this.enable=u,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,l){return l===void 0&&(l=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,l,u){u===void 0&&(u=!0);var d=this.gameObject;if(d&&d.frame&&(i||(i=d.frame.realWidth),l||(l=d.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=l,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(l/2),u&&d&&d.getCenter){var f=d.displayWidth/2,v=d.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(f-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,l,u){return l===void 0&&(l=this.offset.x),u===void 0&&(u=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(l,u),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,l){var u=this.gameObject;i===void 0&&(i=u.x),l===void 0&&(l=u.y),this.world.staticTree.remove(this),u.setPosition(i,l),u.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,l){return this.isCircle?o(this,i,l):r(this,i,l)},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 l=this.position,u=l.x+this.halfWidth,d=l.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(u,d,this.width/2):i.strokeRect(l.x,l.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}}});c.exports=h},71464:(c,x,t)=>{/**
4274 * @author       Richard Davey <[email protected]>
4275 * @copyright    2013-2025 Phaser Studio Inc.
4276 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4277 */var o=t(13759),p=t(83419),a=t(78389),n=t(37747),r=t(95540),e=t(26479),s=t(41212),h=new p({Extends:e,Mixins:[a],initialize:function(l,u,d,f){!d&&!f?f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:o}:s(d)?(f=d,d=null,f.internalCreateCallback=this.createCallbackHandler,f.internalRemoveCallback=this.removeCallbackHandler,f.createMultipleCallback=this.createMultipleCallbackHandler,f.classType=r(f,"classType",o)):Array.isArray(d)&&s(d[0])?(f=d,d=null,f.forEach(function(v){v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=r(v,"classType",o)})):f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=l,this.physicsType=n.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,u,d,f),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,n.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,l=0;l<i.length;l++)i[l].body.reset();return this}});c.exports=h},82248:(c,x,t)=>{/**
4278 * @author       Richard Davey <[email protected]>
4279 * @copyright    2013-2025 Phaser Studio Inc.
4280 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4281 */var o=t(55495),p=t(37742),a=t(45319),n=t(83419),r=t(79342),e=t(37747),s=t(20339),h=t(52816),i=t(50792),l=t(63012),u=t(43855),d=t(5470),f=t(94977),v=t
vendor: 4,096 bytes, line 4281
4281(64897),m=t(45170),y=t(96523),g=t(35154),T=t(36383),S=t(25774),E=t(96602),M=t(87841),F=t(59542),A=t(40012),P=t(14087),L=t(89936),O=t(35072),G=t(72624),z=t(2483),Y=t(61340),X=t(26099),I=t(15994),U=new n({Extends:i,initialize:function(V,B){i.call(this),this.scene=V,this.bodies=new O,this.staticBodies=new O,this.pendingDestroy=new O,this.colliders=new S,this.gravity=new X(g(B,"gravity.x",0),g(B,"gravity.y",0)),this.bounds=new M(g(B,"x",0),g(B,"y",0),g(B,"width",V.sys.scale.width),g(B,"height",V.sys.scale.height)),this.checkCollision={up:g(B,"checkCollision.up",!0),down:g(B,"checkCollision.down",!0),left:g(B,"checkCollision.left",!0),right:g(B,"checkCollision.right",!0)},this.fps=g(B,"fps",60),this.fixedStep=g(B,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(B,"timeScale",1),this.OVERLAP_BIAS=g(B,"overlapBias",4),this.TILE_BIAS=g(B,"tileBias",16),this.forceX=g(B,"forceX",!1),this.isPaused=g(B,"isPaused",!1),this._total=0,this.drawDebug=g(B,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(B,"debugShowBody",!0),debugShowStaticBody:g(B,"debugShowStaticBody",!0),debugShowVelocity:g(B,"debugShowVelocity",!0),bodyDebugColor:g(B,"debugBodyColor",16711935),staticBodyDebugColor:g(B,"debugStaticBodyColor",255),velocityDebugColor:g(B,"debugVelocityColor",65280)},this.maxEntries=g(B,"maxEntries",16),this.useTree=g(B,"useTree",!0),this.tree=new F(this.maxEntries),this.staticTree=new F(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new Y,this._tempMatrix2=new Y,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(D,V){V===void 0&&(V=e.DYNAMIC_BODY),Array.isArray(D)||(D=[D]);for(var B=0;B<D.length;B++){var W=D[B];if(W.isParent)for(var K=W.getChildren(),J=0;J<K.length;J++){var Z=K[J];Z.isParent?this.enable(Z,V):this.enableBody(Z,V)}else this.enableBody(W,V)}},enableBody:function(D,V){return V===void 0&&(V=e.DYNAMIC_BODY),D.hasTransformComponent&&(D.body||(V===e.DYNAMIC_BODY?D.body=new p(this,D):V===e.STATIC_BODY&&(D.body=new G(this,D))),this.add(D.body)),D},add:function(D){return D.physicsType===e.DYNAMIC_BODY?this.bodies.set(D):D.physicsType===e.STATIC_BODY&&(this.staticBodies.set(D),this.staticTree.insert(D)),D.enable=!0,D},disable:function(D){Array.isArray(D)||(D=[D]);for(var V=0;V<D.length;V++){var B=D[V];if(B.isParent)for(var W=B.getChildren(),K=0;K<W.length;K++){var J=W[K];J.isParent?this.disable(J):this.disableBody(J.body)}else this.disableBody(B.body)}},disableBody:function(D){this.remove(D),D.enable=!1},remove:function(D){D.physicsType===e.DYNAMIC_BODY?(this.tree.remove(D),this.bodies.delete(D)):D.physicsType===e.STATIC_BODY&&(this.staticBodies.delete(D),this.staticTree.remove(D))},createDebugGraphic:function(){var D=this.scene.sys.add.graphics({x:0,y:0});return D.setDepth(Number.MAX_VALUE),this.debugGraphic=D,this.drawDebug=!0,D},setBounds:function(D,V,B,W,K,J,Z,j){return this.bounds.setTo(D,V,B,W),K!==void 0&&this.setBoundsCollision(K,J,Z,j),this},setBoundsCollision:function(D,V,B,W){return D===void 0&&(D=!0),V===void 0&&(V=!0),B===void 0&&(B=!0),W===void 0&&(W=!0),this.checkCollision.left=D,this.checkCollision.right=V,this.checkCollision.up=B,this.checkCollision.down=W,this},pause:function(){return this.isPaused=!0,this.emit(l.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(l.RESUME),this},addCollider:function(D,V,B,W,K){B===void 0&&(B=null),W===void 0&&(W=null),K===void 0&&(K=B);var J=new r(this,!1,D,V,B,W,K);return this.colliders.add(J),J},addOverlap:function(D,V,B,W,K){B===void 0&&(B=null),W===void 0&&(W=null),K===void 0&&(K=B);var J=new r(this,!0,D,V,B,W,K);return this.colliders.add(J),J},removeCollider:function(D){return this.colliders.remove(D),this},setFPS:function(D){return this.fps=D,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(D,V){if(!(this.isPaused||this.bodies.size===0)){var B,W=this._frameTime,K=this._frameTimeMS*this.timeScale;this._elapsed+=V;
4281var J,Z=this.bodies.entries,j=this._elapsed>=K;for(this.fixedStep||(W=V*.001,j=!0,this._elapsed=0),B=0;B<Z.length;B++)J=Z[B],J.enable&&J.preUpdate(j,W);if(j){this._elapsed-=K,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(Z));var k=this.colliders.update();for(B=0;B<k.length;B++){var _=k[B];_.active&&_.update()}this.emit(l.WORLD_STEP,W)}for(;this._elapsed>=K;)this._elapsed-=K,this.step(W)}},step:function(D){var V,B,W=this.bodies.entries,K=W.length;for(V=0;V<K;V++)B=W[V],B.enable&&B.update(D);this.useTree&&(this.tree.clear(),this.tree.load(W));var J=this.colliders.update();for(V=0;V<J.length;V++){var Z=J[V];Z.active&&Z.update()}this.emit(l.WORLD_STEP,D),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var D,V,B=this.bodies.entries,W=B.length,K=this.bodies,J=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,D=0;D<W;D++)V=B[D],V.enable&&V.postUpdate();if(this.drawDebug){var Z=this.debugGraphic;for(Z.clear(),D=0;D<W;D++)V=B[D],V.willDrawDebug()&&V.drawDebug(Z);for(B=J.entries,W=B.length,D=0;D<W;D++)V=B[D],V.willDrawDebug()&&V.drawDebug(Z)}var j=this.pendingDestroy;if(j.size>0){var k=this.tree,_=this.staticTree;for(B=j.entries,W=B.length,D=0;D<W;D++)V=B[D],V.physicsType===e.DYNAMIC_BODY?(k.remove(V),K.delete(V)):V.physicsType===e.STATIC_BODY&&(_.remove(V),J.delete(V)),V.world=void 0,V.gameObject=void 0;j.clear()}},updateMotion:function(D,V){D.allowRotation&&this.computeAngularVelocity(D,V),this.computeVelocity(D,V)},computeAngularVelocity:function(D,V){var B=D.angularVelocity,W=D.angularAcceleration,K=D.angularDrag,J=D.maxAngular;W?B+=W*V:D.allowDrag&&K&&(K*=V,d(B-K,0,.1)?B-=K:f(B+K,0,.1)?B+=K:B=0),B=a(B,-J,J);var Z=B-D.angularVelocity;D.angularVelocity+=Z,D.rotation+=D.angularVelocity*V},computeVelocity:function(D,V){var B=D.velocity.x,W=D.acceleration.x,K=D.drag.x,J=D.maxVelocity.x,Z=D.velocity.y,j=D.acceleration.y,k=D.drag.y,_=D.maxVelocity.y,q=D.speed,et=D.maxSpeed,nt=D.allowDrag,tt=D.useDamping;D.allowGravity&&(B+=(this.gravity.x+D.gravity.x)*V,Z+=(this.gravity.y+D.gravity.y)*V),W?B+=W*V:nt&&K&&(tt?(K=Math.pow(K,V),B*=K,q=Math.sqrt(B*B+Z*Z),u(q,0,.001)&&(B=0)):(K*=V,d(B-K,0,.01)?B-=K:f(B+K,0,.01)?B+=K:B=0)),j?Z+=j*V:nt&&k&&(tt?(k=Math.pow(k,V),Z*=k,q=Math.sqrt(B*B+Z*Z),u(q,0,.001)&&(Z=0)):(k*=V,d(Z-k,0,.01)?Z-=k:f(Z+k,0,.01)?Z+=k:Z=0)),B=a(B,-J,J),Z=a(Z,-_,_),D.velocity.set(B,Z),et>-1&&D.velocity.length()>et&&(D.velocity.normalize().scale(et),q=et),D.speed=q},separate:function(D,V,B,W,K){var J,Z,j=!1,k=!0;if(!D.enable||!V.enable||D.checkCollision.none||V.checkCollision.none||!this.intersects(D,V)||!(D.collisionMask&V.collisionCategory)||!(V.collisionMask&D.collisionCategory)||B&&B.call(W,D.gameObject||D,V.gameObject||V)===!1)return j;if(D.isCircle||V.isCircle){var _=this.separateCircle(D,V,K);_.result?(j=!0,k=!1):(J=_.x,Z=_.y,k=!0)}if(k){var q=!1,et=!1,nt=this.OVERLAP_BIAS;K?(q=P(D,V,K,nt,J),et=L(D,V,K,nt,Z)):this.forceX||Math.abs(this.gravity.y+D.gravity.y)<Math.abs(this.gravity.x+D.gravity.x)?(q=P(D,V,K,nt,J),this.intersects(D,V)&&(et=L(D,V,K,nt,Z))):(et=L(D,V,K,nt,Z),this.intersects(D,V)&&(q=P(D,V,K,nt,J))),j=q||et}return j&&(K?(D.onOverlap||V.onOverlap)&&this.emit(l.OVERLAP,D.gameObject,V.gameObject,D,V):(D.onCollide||V.onCollide)&&this.emit(l.COLLIDE,D.gameObject,V.gameObject,D,V)),j},separateCircle:function(D,V,B){v(D,V,!1,0),m(D,V,!1,0);var W=D.isCircle,K=V.isCircle,J=D.center,Z=V.center,j=D.immovable,k=V.immovable,_=D.velocity,q=V.velocity,et=0,nt=!0;if(W!==K){nt=!1;var tt=J.x,ot=J.y,ht=D.halfWidth,lt=V.position.x,it=V.position.y,rt=V.right,at=V.bottom;K&&(tt=Z.x,ot=Z.y,ht=V.halfWidth,lt=D.position.x,it=D.position.y,rt=D.right,at=D.bottom),ot<it?tt<lt?et=s(tt,ot,lt,it)-ht:tt>rt&&(et=s(tt,ot,rt,it)-ht):ot>at&&(tt<lt?et=s(tt,ot,lt,at)-ht:tt>rt&&(et=s(tt,ot,rt,at)-ht)),et*=-1}else et=D.halfWidth+V.halfWidth-h(J,Z);D.overlapR=et,V.overlapR=et;var ct=o(J,Z),Tt=(et+T.EPSILON)*Math.cos(ct),Mt=(et+T.EPSILON)*Math.sin(ct),mt={overlap:et,result:!1,x:Tt,y:Mt};if(B&&(!nt||nt&&et!==0))return mt.result=!0,mt;if(!nt&&et===0||j&&k||D.customSeparateX||V.customSeparateX)return mt.x=void 0,mt.y=void 0,mt;var gt=!D.pushable&&!V.pushable;if(nt){var Rt=J.x-Z.x,Bt=J.y-Z.y,Ct=Math.sqrt(Math.pow(Rt,2)+Math.pow(Bt,2)),wt=(Z.x-J.x)/Ct||0,Lt=(Z.y-J.y)/Ct||0,Ut=2*(_.x*wt+_.y*Lt-q.x*wt-q.y*Lt)/(D.mass+V.mass);(j||k||!D.pushable||!V.pushable)&&(Ut*=2),!j&&D.pushable&&(_.x=_.x-Ut/D.mass*wt,_.y=_.y-Ut/D.mass*Lt,_.multiply(D.bounce)),!k&&V.pushable&&(q.x=q.x+Ut/V.mass*wt,q.y=q.y+Ut/V.mass*Lt,q.multiply(V.bounce)),!j&&!k&&(Tt*=.5,Mt*=.5),(!j||D.pushable||gt)&&(D.x-=Tt,D.y-=Mt,D.updateCenter()),(!k||V.pushable||gt)&&(V.x+=Tt,V.y+=Mt,V.updateCenter()),mt.result=!0}else!j&&(D.pushable||gt)&&(D.x-=Tt,D.y-=Mt,D.updateCenter()),!k&&(V.pushable||gt)&&(V.x+=Tt,V.y+=Mt,V.updateCenter()),mt.x=void 0,mt.y=void 0;return mt},intersects:function(D,V){return D===V?!1:!D.isCircle&&!V.isCircle?!(D.right<=V.left||D.bottom<=V.top||D.left>=V.right||D.top>=V.bottom):D.isCircle?V.isCircle?h(D.center,V.center)<=D.halfWidth+V.halfWidth:this.circleBodyIntersects(D,V):this.circleBodyIntersects(V,D)},circleBodyIntersects:function(D,V){var B=a(D.center.x,V.left,V.right),W=a(D.center.y,V.top,V.bottom),K=(D.center.x-B)*(D.center.x-B),J=(D.center.y-W)*(D.center.y-W);return K+J<=D.halfWidth*D.halfWidth},overlap:function(D,V,B,W,K){return B===void 0&&(B=null),W===void 0&&(W=null),K===void 0&&(K=B),this.collideObjects(D,V,B,W,K,!0)},collide:function(D,V,B,W,K){return B===void 0&&(B=null),W===void 0&&(W=null),K===void 0&&(K=B),this.collideObjects(D,V,B,W,K,!1)},collideObjects:function(D,V,B,W,K,J){var Z,j;D.isParent&&(D.physicsType===void 0||V===void 0||D===V)&&(D=D.children.entries),V&&V.isParent&&V.physicsType===void 0&&(V=V.children.entries);var k=Array.isArray(D),_=Array.isArray(V);if(this._total=0,!k&&!_)this.collideHandler(D,V,B,W,K,J);else if(!k&&_)for(Z=0;Z<V.length;Z++)this.collideHandler(D,V[Z],B,W,K,J);else if(k&&!_)if(V)for(Z=0;Z<D.length;Z++)this.collideHandler(D[Z],V,B,W,K,J);else for(Z=0;Z<D.length;Z++){var q=D[Z];for(j=Z+1;j<D.length;j++)Z!==j&&this.collideHandler(q,D[j],B,W,K,J)}else for(Z=0;Z<D.length;Z++)for(j=0;j<V.length;j++)this.collideHandler(D[Z],V[j],B,W,K,J);return this._total>0},collideHandler:function(D,V,B,W,K,J){if(V===void 0&&D.isParent)return this.collideGroupVsGroup(D,D,B,W,K,J);if(!D||!V)return!1;if(D.body||D.isBody){if(V.body||V.isBody)return this.collideSpriteVsSprite(D,V,B,W,K,J);if(V.isParent)return this.collideSpriteVsGroup(D,V,B,W,K,J);if(V.isTilemap)return this.collideSpriteVsTilemapLayer(D,V,B,W,K,J)}else if(D.isParent){if(V.body||V.isBody)return this.collideSpriteVsGroup(V,D,B,W,K,J);if(V.isParent)return this.collideGroupVsGroup(D,V,B,W,K,J);if(V.isTilemap)return this.collideGroupVsTilemapLayer(D,V,B,W,K,J)}else if(D.isTilemap){if(V.body||V.isBody)return this.collideSpriteVsTilemapLayer(V,D,B,W,K,J);if(V.isParent)return this.collideGroupVsTilemapLayer(V,D,B,W,K,J)}}
4281,canCollide:function(D,V){return D&&V&&(D.collisionMask&V.collisionCategory)!==0&&(V.collisionMask&D.collisionCategory)!==0},collideSpriteVsSprite:function(D,V,B,W,K,J){var Z=D.isBody?D:D.body,j=V.isBody?V:V.body;return this.canCollide(Z,j)?(this.separate(Z,j,W,K,J)&&(B&&B.call(K,D,V),this._total++),!0):!1},collideSpriteVsGroup:function(D,V,B,W,K,J){var Z=D.isBody?D:D.body;if(!(V.getLength()===0||!Z||!Z.enable||Z.checkCollision.none||!this.canCollide(Z,V))){var j,k,_;if(this.useTree||V.physicsType===e.STATIC_BODY){var q=this.treeMinMax;q.minX=Z.left,q.minY=Z.top,q.maxX=Z.right,q.maxY=Z.bottom;var et=V.physicsType===e.DYNAMIC_BODY?this.tree.search(q):this.staticTree.search(q);for(k=et.length,j=0;j<k;j++)_=et[j],!(Z===_||!_.enable||_.checkCollision.none||!V.contains(_.gameObject))&&this.separate(Z,_,W,K,J)&&(B&&B.call(K,Z.gameObject,_.gameObject),this._total++)}else{var nt=V.getChildren(),tt=V.children.entries.indexOf(D);for(k=nt.length,j=0;j<k;j++)_=nt[j].body,!(!_||j===tt||!_.enable)&&this.separate(Z,_,W,K,J)&&(B&&B.call(K,Z.gameObject,_.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(D,V,B,W,K,J){if(!this.canCollide(D,V))return!1;var Z=D.getChildren();if(Z.length===0)return!1;for(var j=!1,k=0;k<Z.length;k++)(Z[k].body||Z[k].isBody)&&this.collideSpriteVsTilemapLayer(Z[k],V,B,W,K,J)&&(j=!0);return j},collideTiles:function(D,V,B,W,K){return V.length===0||D.body&&!D.body.enable||D.isBody&&!D.enable?!1:this.collideSpriteVsTilesHandler(D,V,B,W,K,!1,!1)},overlapTiles:function(D,V,B,W,K){return V.length===0||D.body&&!D.body.enable||D.isBody&&!D.enable?!1:this.collideSpriteVsTilesHandler(D,V,B,W,K,!0,!1)},collideSpriteVsTilemapLayer:function(D,V,B,W,K,J){var Z=D.isBody?D:D.body;if(!Z.enable||Z.checkCollision.none||!this.canCollide(Z,V))return!1;var j=V.layer,k=Z.x-j.tileWidth*V.scaleX,_=Z.y-j.tileHeight*V.scaleY,q=Z.width+j.tileWidth*V.scaleX,et=Z.height+j.tileHeight*V.scaleY,nt=J?null:this.tileFilterOptions,tt=y(k,_,q,et,nt,V.scene.cameras.main,V.layer);return tt.length===0?!1:this.collideSpriteVsTilesHandler(D,tt,B,W,K,J,!0)},collideSpriteVsTilesHandler:function(D,V,B,W,K,J,Z){for(var j=D.isBody?D:D.body,k,_={left:0,right:0,top:0,bottom:0},q,et=!1,nt=0;nt<V.length;nt++){k=V[nt],q=k.tilemapLayer;var tt=q.tileToWorldXY(k.x,k.y);_.left=tt.x,_.top=tt.y,_.right=_.left+k.width*q.scaleX,_.bottom=_.top+k.height*q.scaleY,z(_,j)&&(!W||W.call(K,D,k))&&E(k,D)&&(J||A(nt,j,k,_,q,this.TILE_BIAS,Z))&&(this._total++,et=!0,B&&B.call(K,D,k),J&&j.onOverlap?this.emit(l.TILE_OVERLAP,D,k,j):j.onCollide&&this.emit(l.TILE_COLLIDE,D,k,j))}return et},collideGroupVsGroup:function(D,V,B,W,K,J){if(!(D.getLength()===0||V.getLength()===0||!this.canCollide(D,V)))for(var Z=D.getChildren(),j=0;j<Z.length;j++)this.collideSpriteVsGroup(Z[j],V,B,W,K,J)},wrap:function(D,V){D.body?this.wrapObject(D,V):D.getChildren?this.wrapArray(D.getChildren(),V):Array.isArray(D)?this.wrapArray(D,V):this.wrapObject(D,V)},wrapArray:function(D,V){for(var B=0;B<D.length;B++)this.wrapObject(D[B],V)},wrapObject:function(D,V){V===void 0&&(V=0),D.x=I(D.x,this.bounds.left-V,this.bounds.right+V),D.y=I(D.y,this.bounds.top-V,this.bounds.bottom+V)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null,this.debugGraphic&&(this.debugGraphic.destroy(),this.debugGraphic=null)}});c.exports=U},1093:c=>{/**
4282 * @author       Richard Davey <[email protected]>
4283 * @copyright    2013-2025 Phaser Studio Inc.
4284 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4285 */var x={setAcceleration:function(t,o){return this.body.acceleration.set(t,o),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};c.exports=x},59023:c=>{/**
4286 * @author       Richard Davey <[email protected]>
4287 * @copyright    2013-2025 Phaser Studio Inc.
4288 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4289 */var x={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}};c.exports=x},62069:c=>{/**
4290 * @author       Richard Davey <[email protected]>
4291 * @copyright    2013-2025 Phaser Studio Inc.
4292 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4293 */var x={setBounce:function(t,o){return this.body.bounce.set(t,o),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,o,p,a){return this.body.setCollideWorldBounds(t,o,p,a),this}};c.exports=x},78389:(c,x,t)=>{/**
4294 * @author       Richard Davey <[email protected]>
4295 * @copyright    2013-2025 Phaser Studio Inc.
4296 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4297 */var o=t(79599),p={setCollisionCategory:function(a){var n=this.body?this.body:this;return n.collisionCategory=a,this},willCollideWith:function(a){var n=this.body?this.body:this;return(n.collisionMask&a)!==0},addCollidesWith:function(a){var n=this.body?this.body:this;return n.collisionMask=n.collisionMask|a,this},removeCollidesWith:function(a){var n=this.body?this.body:this;return n.collisionMask=n.collisionMask&~a,this},setCollidesWith:function(a){var n=this.body?this.body:this;return n.collisionMask=o(a),this},resetCollisionCategory:function(){var a=this.body?this.body:this;return a.collisionCategory=1,a.collisionMask=2147483647,this}};c.exports=p},87118:c=>{/**
4298 * @author       Richard Davey <[email protected]>
4299 * @copyright    2013-2025 Phaser Studio Inc.
4300 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4301 */var x={setDebug:function(t,o,p){return this.debugShowBody=t,this.debugShowVelocity=o,this.debugBodyColor=p,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}}};c.exports=x},52819:c=>
4301{/**
4302 * @author       Richard Davey <[email protected]>
4303 * @copyright    2013-2025 Phaser Studio Inc.
4304 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4305 */var x={setDrag:function(t,o){return this.body.drag.set(t,o),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}};c.exports=x},4074:c=>{/**
4306 * @author       Richard Davey <[email protected]>
4307 * @copyright    2013-2025 Phaser Studio Inc.
4308 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4309 */var x={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,o,p,a,n){return t&&this.body.reset(o,p),a&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,o){return t===void 0&&(t=!1),o===void 0&&(o=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),o&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};c.exports=x},40831:c=>{/**
4310 * @author       Richard Davey <[email protected]>
4311 * @copyright    2013-2025 Phaser Studio Inc.
4312 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4313 */var x={setFriction:function(t,o){return this.body.friction.set(t,o),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};c.exports=x},26775:c=>{/**
4314 * @author       Richard Davey <[email protected]>
4315 * @copyright    2013-2025 Phaser Studio Inc.
4316 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4317 */var x={setGravity:function(t,o){return this.body.gravity.set(t,o),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};c.exports=x},9437:c=>{/**
4318 * @author       Richard Davey <[email protected]>
4319 * @copyright    2013-2025 Phaser Studio Inc.
4320 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4321 */var x={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};c.exports=x},30621:c=>{/**
4322 * @author       Richard Davey <[email protected]>
4323 * @copyright    2013-2025 Phaser Studio Inc.
4324 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4325 */var x={setMass:function(t){return this.body.mass=t,this}};c.exports=x},72441:(c,x,t)=>{var o=t(47956),p=t(96503),a=t(2044),n=t(81491),r=function(e,s,h,i,l,u){var d=o(e,s-i,h-i,2*i,2*i,l,u);if(d.length===0)return d;for(var f=new p(s,h,i),v=new p,m=[],y=0;y<d.length;y++){var g=d[y];g.isCircle?(v.setTo(g.center.x,g.center.y,g.halfWidth),a(f,v)&&m.push(g)):n(f,g)&&m.push(g)}return m};c.exports=r},47956:c=>{var x=function(t,o,p,a,n,r,e){r===void 0&&(r=!0),e===void 0&&(e=!1);var s=[],h=[],i=t.treeMinMax;if(i.minX=o,i.minY=p,i.maxX=o+a,i.maxY=p+n,e&&(h=t.staticTree.search(i)),r&&t.useTree)s=t.tree.search(i);else if(r){var l=t.bodies,u={position:{x:o,y:p},left:o,top:p,right:o+a,bottom:p+n,isCircle:!1},d=t.intersects;l.iterate(function(f){d(f,u)&&s.push(f)})}return h.concat(s)};c.exports=x},62121:c=>{/**
4326 * @author       Richard Davey <[email protected]>
4327 * @copyright    2013-2025 Phaser Studio Inc.
4328 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4329 */var x={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};c.exports=x},29384:c=>{/**
4330 * @author       Richard Davey <[email protected]>
4331 * @copyright    2013-2025 Phaser Studio Inc.
4332 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4333 */var x={setOffset:function(t,o){return this.body.setOffset(t,o),this},setSize:function(t,o,p){return this.body.setSize(t,o,p),this},setBodySize:function(t,o,p){return this.body.setSize(t,o,p),this},setCircle:function(t,o,p){return this.body.setCircle(t,o,p),this}};c.exports=x},15098:c=>{/**
4334 * @author       Richard Davey <[email protected]>
4335 * @copyright    2013-2025 Phaser Studio Inc.
4336 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4337 */var x={setVelocity:function(t,o){return this.body.setVelocity(t,o),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,o){return this.body.maxVelocity.set(t,o),this}};c.exports=x},92209:(c,x,t)=>{/**
4338 * @author       Richard Davey <[email protected]>
4339 * @copyright    2013-2025 Phaser Studio Inc.
4340 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4341 */c.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
4341(62121),Size:t(29384),Velocity:t(15098)}},37747:c=>{/**
4342 * @author       Richard Davey <[email protected]>
4343 * @copyright    2013-2025 Phaser Studio Inc.
4344 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4345 */var x={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};c.exports=x},20009:c=>{/**
4346 * @author       Richard Davey <[email protected]>
4347 * @copyright    2013-2025 Phaser Studio Inc.
4348 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4349 */c.exports="collide"},36768:c=>{/**
4350 * @author       Richard Davey <[email protected]>
4351 * @copyright    2013-2025 Phaser Studio Inc.
4352 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4353 */c.exports="overlap"},60473:c=>{/**
4354 * @author       Richard Davey <[email protected]>
4355 * @copyright    2013-2025 Phaser Studio Inc.
4356 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4357 */c.exports="pause"},89954:c=>{/**
4358 * @author       Richard Davey <[email protected]>
4359 * @copyright    2013-2025 Phaser Studio Inc.
4360 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4361 */c.exports="resume"},61804:c=>{/**
4362 * @author       Richard Davey <[email protected]>
4363 * @copyright    2013-2025 Phaser Studio Inc.
4364 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4365 */c.exports="tilecollide"},7161:c=>{/**
4366 * @author       Richard Davey <[email protected]>
4367 * @copyright    2013-2025 Phaser Studio Inc.
4368 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4369 */c.exports="tileoverlap"},34689:c=>{/**
4370 * @author       Richard Davey <[email protected]>
4371 * @copyright    2013-2025 Phaser Studio Inc.
4372 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4373 */c.exports="worldbounds"},16006:c=>{/**
4374 * @author       Richard Davey <[email protected]>
4375 * @copyright    2013-2025 Phaser Studio Inc.
4376 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4377 */c.exports="worldstep"},63012:(c,x,t)=>{/**
4378 * @author       Richard Davey <[email protected]>
4379 * @copyright    2013-2025 Phaser Studio Inc.
4380 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4381 */c.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:(c,x,t)=>{/**
4382 * @author       Richard Davey <[email protected]>
4383 * @copyright    2013-2025 Phaser Studio Inc.
4384 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4385 */var o=t(37747),p=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=p(!1,a,o),c.exports=a},96602:c=>{/**
4386 * @author       Richard Davey <[email protected]>
4387 * @copyright    2013-2025 Phaser Studio Inc.
4388 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4389 */var x=function(t,o){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,o,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,o,t):!0};c.exports=x},36294:c=>{/**
4390 * @author       Richard Davey <[email protected]>
4391 * @copyright    2013-2025 Phaser Studio Inc.
4392 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4393 */var x=function(t,o){o<0?(t.blocked.none=!1,t.blocked.left=!0):o>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=o,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};c.exports=x},67013:c=>{/**
4394 * @author       Richard Davey <[email protected]>
4395 * @copyright    2013-2025 Phaser Studio Inc.
4396 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4397 */var x=function(t,o){o<0?(t.blocked.none=!1,t.blocked.up=!0):o>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=o,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};c.exports=x},40012:(c,x,t)=>{/**
4398 * @author       Richard Davey <[email protected]>
4399 * @copyright    2013-2025 Phaser Studio Inc.
4400 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4401 */var o=t(21329),p=t(53442),a=t(2483),n=function(r,e,s,h,i,l,u){var d=h.left,f=h.top,v=h.right,m=h.bottom,y=s.faceLeft||s.faceRight,g=s.faceTop||s.faceBottom;if(u||(y=!0,g=!0),!y&&!g)return!1;var T=0,S=0,E=0,M=1;if(e.deltaAbsX()>e.deltaAbsY()?E=-1:e.deltaAbsX()<e.deltaAbsY()&&(M=-1),e.deltaX()!==0&&e.deltaY()!==0&&y&&g&&(E=Math.min(Math.abs(e.position.x-v),Math.abs(e.right-d)),M=Math.min(Math.abs(e.position.y-m),Math.abs(e.bottom-f))),E<M){if
4401(y&&(T=o(e,s,d,v,l,u),T!==0&&!a(h,e)))return!0;g&&(S=p(e,s,f,m,l,u))}else{if(g&&(S=p(e,s,f,m,l,u),S!==0&&!a(h,e)))return!0;y&&(T=o(e,s,d,v,l,u))}return T!==0||S!==0};c.exports=n},21329:(c,x,t)=>{/**
4402 * @author       Richard Davey <[email protected]>
4403 * @copyright    2013-2025 Phaser Studio Inc.
4404 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4405 */var o=t(36294),p=function(a,n,r,e,s,h){var i=0,l=n.faceLeft,u=n.faceRight,d=n.collideLeft,f=n.collideRight;return h||(l=!0,u=!0,d=!0,f=!0),a.deltaX()<0&&f&&a.checkCollision.left?u&&a.x<e&&(i=a.x-e,i<-s&&(i=0)):a.deltaX()>0&&d&&a.checkCollision.right&&l&&a.right>r&&(i=a.right-r,i>s&&(i=0)),i!==0&&(a.customSeparateX?a.overlapX=i:o(a,i)),i};c.exports=p},53442:(c,x,t)=>{/**
4406 * @author       Richard Davey <[email protected]>
4407 * @copyright    2013-2025 Phaser Studio Inc.
4408 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4409 */var o=t(67013),p=function(a,n,r,e,s,h){var i=0,l=n.faceTop,u=n.faceBottom,d=n.collideUp,f=n.collideDown;return h||(l=!0,u=!0,d=!0,f=!0),a.deltaY()<0&&f&&a.checkCollision.up?u&&a.y<e&&(i=a.y-e,i<-s&&(i=0)):a.deltaY()>0&&d&&a.checkCollision.down&&l&&a.bottom>r&&(i=a.bottom-r,i>s&&(i=0)),i!==0&&(a.customSeparateY?a.overlapY=i:o(a,i)),i};c.exports=p},2483:c=>{/**
4410 * @author       Richard Davey <[email protected]>
4411 * @copyright    2013-2025 Phaser Studio Inc.
4412 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4413 */var x=function(t,o){return!(o.right<=t.left||o.bottom<=t.top||o.position.x>=t.right||o.position.y>=t.bottom)};c.exports=x},55173:(c,x,t)=>{/**
4414 * @author       Richard Davey <[email protected]>
4415 * @copyright    2013-2025 Phaser Studio Inc.
4416 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4417 */var o={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};c.exports=o},44563:(c,x,t)=>{/**
4418 * @author       Richard Davey <[email protected]>
4419 * @copyright    2013-2025 Phaser Studio Inc.
4420 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4421 */c.exports={Arcade:t(27064),Matter:t(3875)}},68174:(c,x,t)=>{/**
4422 * @author       Richard Davey <[email protected]>
4423 * @copyright    2013-2025 Phaser Studio Inc.
4424 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4425 */var o=t(83419),p=t(26099),a=new o({initialize:function(){this.boundsCenter=new p,this.centerDiff=new p},parseBody:function(n){if(n=n.hasOwnProperty("body")?n.body:n,!n.hasOwnProperty("bounds")||!n.hasOwnProperty("centerOfMass"))return!1;var r=this.boundsCenter,e=this.centerDiff,s=n.bounds.max.x-n.bounds.min.x,h=n.bounds.max.y-n.bounds.min.y,i=s*n.centerOfMass.x,l=h*n.centerOfMass.y;return r.set(s/2,h/2),e.set(i-r.x,l-r.y),!0},getTopLeft:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r+s.x+h.x,e+s.y+h.y)}return!1},getTopCenter:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r+h.x,e+s.y+h.y)}return!1},getTopRight:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r-(s.x-h.x),e+s.y+h.y)}return!1},getLeftCenter:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r+s.x+h.x,e+h.y)}return!1},getCenter:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.centerDiff;return new p(r+s.x,e+s.y)}return!1},getRightCenter:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r-(s.x-h.x),e+h.y)}return!1},getBottomLeft:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r+s.x+h.x,e-(s.y-h.y))}return!1},getBottomCenter:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r+h.x,e-(s.y-h.y))}return!1},getBottomRight:function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(n)){var s=this.boundsCenter,h=this.centerDiff;return new p(r-(s.x-h.x),e-(s.y-h.y))}return!1}});c.exports=a},19933:(c,x,t)=>{/**
4426 * @author       Richard Davey <[email protected]>
4427 * @copyright    2013-2025 Phaser Studio Inc.
4428 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4429 */var o=t(6790);o.Body=t(22562),o.Composite=t(69351),o.World=t(4372),o.Collision=t(52284),o.Detector=t(81388),o.Pairs=t(99561),o.Pair=t(4506),o.Query=t(73296),o.Resolver=t(66272),o.Constraint=t(48140),o.Common=t(53402),o.Engine=t(48413),o.Events=t(35810),o.Sleeping=t(53614),o.Plugin=t(73832),o.Bodies=t(66280),o.Composites=t(74116),o.Axes=t(66615),o.Bounds=t(15647),o.Svg=t(74058),o.Vector=t(31725),o.Vertices=t(41598),o.World.add=o.Composite.add,o.World.remove=o.Composite.remove,o.World.addComposite=o.Composite.addComposite,o.World.addBody=o.Composite.addBody,o.World.addConstraint=o.Composite.addConstraint,o.World.clear=o.Composite.clear,c.exports=o},28137:(c,x,t)=>{/**
4430 * @author       Richard Davey <[email protected]>
4431 * @copyright    2013-2025 Phaser Studio Inc.
4432 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4433 */var o=t(66280),p=t(83419),a=t(74116),n=t(48140),r=t(74058),e=t(75803),s=t(23181),h=t(34803),i=t(73834),l=t(19496),u=t(85791),d=t(98713),f=t(41598),v=new p({initialize:function(y){this.world=y,this.scene=y.scene,this.sys=y.scene.sys},rectangle:function(m,y,g,T,S){var E=o.rectangle(m,y,g,T,S);return this.world.add(E),E},trapezoid:function(m,y,g,T,S,E){var M=o.trapezoid(m,y,g,T,S,E);return this.world.add(M),M},circle:function(m,y,g,T,S){var E=o.circle(m,y,g,T,S);return this.world.add(E),E},polygon:function(m,y,g,T,S){var E=o.polygon(m,y,g,T,S);return this.world.add(E),E},fromVertices:function(m,y,g,T,S,E,M){typeof g=="string"&&(g=f.fromPath(g));var F=o.fromVertices(m,y,g,T,S,E,M);return this.world.add(F),F},fromPhysicsEditor:function(m,y,g,T,S){S===void 0&&(S=!0);var E=l.parseBody(m,y,g,T);return S&&!this.world.has(E)&&this.world.add(E),E},fromSVG:function(m,y,g,T,S,E){T===void 0&&(T=1),S===void 0&&(S={}),E===void 0&&(E=!0);for(var M=g.getElementsByTagName("path"),F=[],A=0;A<M.length;A++){var P=r.pathToVertices(M[A],30);T!==1&&f.scale(P,T,T),F.push(P)}var L=o.fromVertices(m,y,F,S);return E&&this.world.add(L),L},fromJSON:function(m,y,g,T,S){T===void 0&&(T={}),S===void 0&&(S=!0);var E=u.parseBody(m,y,g,T);return E&&S&&this.world.add(E),E},imageStack:function(m,y,g,T,S,E,M,F,A){M===void 0&&(M=0),F===void 0&&(F=0),A===void 0&&(A={});var P=this.world,L=this.sys.displayList;A.addToWorld=!1;var O=a.stack(g,T,S,E,M,F,function(G,z){var Y=new s(P,G,z,m,y,A);return L.add(Y),Y.body});return P.add(O),O},stack:function(m,y,g,T,S,E,M){var F=a.stack(m,y,g,T,S,E,M);return this.world.add(F),F},pyramid:function(m,y,g,T,S,E,M){var F=a.pyramid(m,y,g,T,S,E,M);return this.world.add(F),F},chain:function(m,y,g,T,S,E){return a.chain(m,y,g,T,S,E)},mesh:function(m,y,g,T,S){return a.mesh(m,y,g,T,S)},newtonsCradle:function(m,y,g,T,S){var E=a.newtonsCradle(m,y,g,T,S);return this.world.add(E),E},car:function(m,y,g,T,S){var E=a.car(m,y,g,T,S);return this.world.add(E),E},softBody:function(m,y,g,T,S,E,M,F,A,P){var L=a.softBody(m,y,g,T,S,E,M,F,A,P);return this.world.add(L),L},joint:function(m,y,g,T,S){return this.constraint(m,y,g,T,S)},spring:function(m,y,g,T,S){return this.constraint(m,y,g,T,S)},constraint:function(m,y,g,T,S){T===void 0&&(T=1),S===void 0&&(S={}),S.bodyA=m.type==="body"?m:m.body,S.bodyB=y.type==="body"?y:y.body,isNaN(g)||(S.length=g),S.stiffness=T;var E=n.create(S);return this.world.add(E),E},worldConstraint:function(m,y,g,T){g===void 0&&(g=1),T===void 0&&(T={}),T.bodyB=m.type==="body"?m:m.body,isNaN(y)||(T.length=y),T.stiffness=g;var S=n.create(T);return this.world.add(S),S},mouseSpring:function(m){return this.pointerConstraint(m)},pointerConstraint:function(m){m===void 0&&(m={}),m.hasOwnProperty("render")||(m.render={visible:!1});var y=new d(this.scene,this.world,m);return this.world.add(y.constraint),y},image:function(m,y,g,T,S){var E=new s(this.world,m,y,g,T,S);return this.sys.displayList.add(E),E},tileBody:function(m,y){return new i(this.world,m,y)},sprite:function(m,y,g,T,S){var E=new h(this.world,m,y,g,T,S);return this.sys.displayList.add(E),this.sys.updateList.add(E),E},gameObject:function(m,y,g){return e(this.world,m,y,g)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=v},75803:(c,x,t)=>{/**
4434 * @author       Richard Davey <[email protected]>
4435 * @copyright    2013-2025 Phaser Studio Inc.
4436 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4437 */var o=t(31884),p=t(95540),a=t(26099);function n(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var r=function(e,s,h,i){h===void 0&&(h={}),i===void 0&&(i=!0);var l=s.x,u=s.y;s.body={temp:!0,position:{x:l,y:u}};var d=[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity];
4437if(d.forEach(function(v){for(var m in v)n(v[m])?Object.defineProperty(s,m,{get:v[m].get,set:v[m].set}):Object.defineProperty(s,m,{value:v[m]})}),s.world=e,s._tempVec2=new a(l,u),h.hasOwnProperty("type")&&h.type==="body")s.setExistingBody(h,i);else{var f=p(h,"shape",null);f||(f="rectangle"),h.addToWorld=i,s.setBody(f,h)}return s};c.exports=r},23181:(c,x,t)=>{/**
4438 * @author       Richard Davey <[email protected]>
4439 * @copyright    2013-2025 Phaser Studio Inc.
4440 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4441 */var o=t(83419),p=t(31884),a=t(95643),n=t(95540),r=t(88571),e=t(72699),s=t(26099),h=new o({Extends:r,Mixins:[p.Bounce,p.Collision,p.Force,p.Friction,p.Gravity,p.Mass,p.Sensor,p.SetBody,p.Sleep,p.Static,p.Transform,p.Velocity,e],initialize:function(l,u,d,f,v,m){a.call(this,l.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(f,v),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new s(u,d);var y=n(m,"shape",null);y?this.setBody(y,m):this.setRectangle(this.width,this.height,m),this.setPosition(u,d),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=h},42045:(c,x,t)=>{/**
4442 * @author       Richard Davey <[email protected]>
4443 * @copyright    2013-2025 Phaser Studio Inc.
4444 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4445 */var o=t(60461),p=t(66615),a=t(66280),n=t(22562),r=t(68174),e=t(15647),s=t(83419),h=t(52284),i=t(53402),l=t(69351),u=t(74116),d=t(48140),f=t(81388),v=t(20339),m=t(28137),y=t(95540),g=t(35154),T=t(46975),S=t(4506),E=t(99561),M=t(37277),F=t(73296),A=t(66272),P=t(44594),L=t(74058),O=t(31725),G=t(41598),z=t(68243);i.setDecomp(t(55973));var Y=new s({initialize:function(I){this.scene=I,this.systems=I.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=n,this.composite=l,this.collision=h,this.detector=f,this.pair=S,this.pairs=E,this.query=F,this.resolver=A,this.constraint=d,this.bodies=a,this.composites=u,this.axes=p,this.bounds=e,this.svg=L,this.vector=O,this.vertices=G,this.verts=G,this._tempVec2=O.create(),A._restingThresh=g(this.config,"restingThresh",4),A._restingThreshTangent=g(this.config,"restingThreshTangent",6),A._positionDampen=g(this.config,"positionDampen",.9),A._positionWarming=g(this.config,"positionWarming",.8),A._frictionNormalMultiplier=g(this.config,"frictionNormalMultiplier",5),I.sys.events.once(P.BOOT,this.boot,this),I.sys.events.on(P.START,this.start,this)},boot:function(){this.world=new z(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new r,this.systems.events.once(P.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new z(this.scene,this.config),this.add=new m(this.world));var X=this.systems.events;X.on(P.UPDATE,this.world.update,this.world),X.on(P.POST_UPDATE,this.world.postUpdate,this.world),X.once(P.SHUTDOWN,this.shutdown,this)},getConfig:function(){var X=this.systems.game.config.physics,I=this.systems.settings.physics,U=T(y(I,"matter",{}),y(X,"matter",{}));return U},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(X,I){this.world.step(X,I)},containsPoint:function(X,I,U){X=this.getMatterBodies(X);var D=O.create(I,U),V=F.point(X,D);return V.length>0},intersectPoint:function(X,I,U){U=this.getMatterBodies(U);var D=O.create(X,I),V=[],B=F.point(U,D);return B.forEach(function(W){V.indexOf(W)===-1&&V.push(W)}),V},intersectRect:function(X,I,U,D,V,B){V===void 0&&(V=!1),B=this.getMatterBodies(B);var W={min:{x:X,y:I},max:{x:X+U,y:I+D}},K=[],J=F.region(B,W,V);return J.forEach(function(Z){K.indexOf(Z)===-1&&K.push(Z)}),K},intersectRay:function(X,I,U,D,V,B){V===void 0&&(V=1),B=this.getMatterBodies(B);for(var W=[],K=F.ray(B,O.create(X,I),O.create(U,D),V),J=0;J<K.length;J++)W.push(K[J].body);return W},intersectBody:function(X,I){I=this.getMatterBodies(I);for(var U=[],D=F.collides(X,I),V=0;V<D.length;V++){var B=D[V];B.bodyA===X?U.push(B.bodyB):U.push(B.bodyA)}return U},overlap:function(X,I,U,D,V){U===void 0&&(U=null),D===void 0&&(D=null),V===void 0&&(V=U),Array.isArray(X)||(X=[X]),X=this.getMatterBodies(X),I=this.getMatterBodies(I);for(var B=!1,W=0;W<X.length;W++)for(var K=X[W],J=F.collides(K,I),Z=0;Z<J.length;Z++){var j=J[Z],k=j.bodyA.id===K.id?j.bodyB:j.bodyA;if(!D||D.call(V,K,k,j)){if(B=!0,U)U.call(V,K,k,j);else if(!D)return!0}}return B},setCollisionCategory:function(X,I){return X=this.getMatterBodies(X),X.forEac
vendor: 5,562 bytes, lines 4445-4453
4445h(function(U){U.collisionFilter.category=I}),this},setCollisionGroup:function(X,I){return X=this.getMatterBodies(X),X.forEach(function(U){U.collisionFilter.group=I}),this},setCollidesWith:function(X,I){X=this.getMatterBodies(X);var U=0;if(!Array.isArray(I))U=I;else for(var D=0;D<I.length;D++)U|=I[D];return X.forEach(function(V){V.collisionFilter.mask=U}),this},getMatterBodies:function(X){if(!X)return this.world.getAllBodies();Array.isArray(X)||(X=[X]);for(var I=[],U=0;U<X.length;U++){var D=X[U].hasOwnProperty("body")?X[U].body:X[U];I.push(D)}return I},setVelocity:function(X,I,U){X=this.getMatterBodies(X);var D=this._tempVec2;return D.x=I,D.y=U,X.forEach(function(V){n.setVelocity(V,D)}),this},setVelocityX:function(X,I){X=this.getMatterBodies(X);var U=this._tempVec2;return U.x=I,X.forEach(function(D){U.y=D.velocity.y,n.setVelocity(D,U)}),this},setVelocityY:function(X,I){X=this.getMatterBodies(X);var U=this._tempVec2;return U.y=I,X.forEach(function(D){U.x=D.velocity.x,n.setVelocity(D,U)}),this},setAngularVelocity:function(X,I){return X=this.getMatterBodies(X),X.forEach(function(U){n.setAngularVelocity(U,I)}),this},applyForce:function(X,I){X=this.getMatterBodies(X);var U=this._tempVec2;return X.forEach(function(D){U.x=D.position.x,U.y=D.position.y,n.applyForce(D,U,I)}),this},applyForceFromPosition:function(X,I,U,D){X=this.getMatterBodies(X);var V=this._tempVec2;return X.forEach(function(B){D===void 0&&(D=B.angle),V.x=U*Math.cos(D),V.y=U*Math.sin(D),n.applyForce(B,I,V)}),this},applyForceFromAngle:function(X,I,U){X=this.getMatterBodies(X);var D=this._tempVec2;return X.forEach(function(V){U===void 0&&(U=V.angle),D.x=I*Math.cos(U),D.y=I*Math.sin(U),n.applyForce(V,{x:V.position.x,y:V.position.y},D)}),this},getConstraintLength:function(X){var I=X.pointA.x,U=X.pointA.y,D=X.pointB.x,V=X.pointB.y;return X.bodyA&&(I+=X.bodyA.position.x,U+=X.bodyA.position.y),X.bodyB&&(D+=X.bodyB.position.x,V+=X.bodyB.position.y),v(I,U,D,V)},alignBody:function(X,I,U,D){X=X.hasOwnProperty("body")?X.body:X;var V;switch(D){case o.TOP_LEFT:case o.LEFT_TOP:V=this.bodyBounds.getTopLeft(X,I,U);break;case o.TOP_CENTER:V=this.bodyBounds.getTopCenter(X,I,U);break;case o.TOP_RIGHT:case o.RIGHT_TOP:V=this.bodyBounds.getTopRight(X,I,U);break;case o.LEFT_CENTER:V=this.bodyBounds.getLeftCenter(X,I,U);break;case o.CENTER:V=this.bodyBounds.getCenter(X,I,U);break;case o.RIGHT_CENTER:V=this.bodyBounds.getRightCenter(X,I,U);break;case o.LEFT_BOTTOM:case o.BOTTOM_LEFT:V=this.bodyBounds.getBottomLeft(X,I,U);break;case o.BOTTOM_CENTER:V=this.bodyBounds.getBottomCenter(X,I,U);break;case o.BOTTOM_RIGHT:case o.RIGHT_BOTTOM:V=this.bodyBounds.getBottomRight(X,I,U);break}return V&&n.setPosition(X,V),this},shutdown:function(){var X=this.systems.events;this.world&&(X.off(P.UPDATE,this.world.update,this.world),X.off(P.POST_UPDATE,this.world.postUpdate,this.world)),X.off(P.SHUTDOWN,this.shutdown,this),this.add&&this.add.destroy(),this.world&&this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(P.START,this.start,this),this.scene=null,this.systems=null}});M.register("MatterPhysics",Y,"matterPhysics"),c.exports=Y},34803:(c,x,t)=>{/**
4446 * @author       Richard Davey <[email protected]>
4447 * @copyright    2013-2025 Phaser Studio Inc.
4448 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4449 */var o=t(9674),p=t(83419),a=t(31884),n=t(95643),r=t(95540),e=t(72699),s=t(68287),h=t(26099),i=new p({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(u,d,f,v,m,y){n.call(this,u.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=u,this._tempVec2=new h(d,f);var g=r(y,"shape",null);g?this.setBody(g,y):this.setRectangle(this.width,this.height,y),this.setPosition(d,f),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=i},73834:(c,x,t)=>{/**
4450 * @author       Richard Davey <[email protected]>
4451 * @copyright    2013-2025 Phaser Studio Inc.
4452 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4453 */var o=t(66280),p=t(22562),a=t(83419),n=t(31884),r=t(62644),e=t(50792),s=t(95540),h=t(97022),i=t(41598),l=new a({Extends:e,Mixins:[n.Bounce,n.Collision,n.Friction,n.Gravity,n.Mass,n.Sensor,n.Sleep,n.Static],initialize:function(d,f,v){e.call(this),this.tile=f,this.world=d,f.physics.matterBody&&f.physics.matterBody.destroy(),f.physics.matterBody=this;var m=s(v,"body",null),y=s(v,"addToWorld",!0);if(m)this.setBody(m,y);else{var g=f.getCollisionGroup(),T=s(g,"objects",[]);T.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(f.flipX||f.flipY){var S={x:f.getCenterX(),y:f.getCenterY()},E=f.flipX?-1:1,M=f.flipY?-1:1;p.scale(m,E,M,S)}},setFromTileRectangle:function(u){u===void 0&&(u={}),h(u,"isStatic")||(u.isStatic=!0),h(u,"addToWorld")||(u.addToWorld=!0);var d=this.tile.getBounds(),f=d.x+d.width/2,v=d.y+d.height/2,m=o.rectangle(f,v,d.width,d.height,u);return this.setBody(m,u.addToWorld),this},setFromTileCollision:function(u){u===void 0&&(u={}),h(u,"isStatic")||(u.isStatic=!0),h(u,"addToWorld")||(u.addToWorld=!0);for(var d=this.tile.tilemapLayer.scaleX,f=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),m=this.tile.getTop(),y=this.tile.getCollisionGroup(),g=s(y,"objects",[]),T=[],S=0;S<g.length;S++){var E=g[S],M=v+E.x*d,F=m+E.y*f,A=E.width*d,P=E.height*f,L=null;if(E.rectangle)L=o.rectangle(M+A/2,F+P/2,A,P,u);else if(E.ellipse)L=o.circle(M+A/2,F+P/2,A/2,u);
4453else if(E.polygon||E.polyline){var O=E.polygon?E.polygon:E.polyline,G=O.map(function(I){return{x:I.x*d,y:I.y*f}}),z=i.create(G),Y=i.centre(z);M+=Y.x,F+=Y.y,L=o.fromVertices(M,F,z,u)}L&&T.push(L)}if(T.length===1)this.setBody(T[0],u.addToWorld);else if(T.length>1){var X=r(u);X.parts=T,this.setBody(p.create(X),X.addToWorld)}return this},setBody:function(u,d){return d===void 0&&(d=!0),this.body&&this.removeBody(),this.body=u,this.body.gameObject=this,d&&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()}});c.exports=l},19496:(c,x,t)=>{/**
4454 * @author       Joachim Grill <[email protected]>
4455 * @author       Richard Davey <[email protected]>
4456 * @copyright    2018 CodeAndWeb GmbH
4457 * @copyright    2013-2025 Phaser Studio Inc.
4458 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4459 */var o=t(66280),p=t(22562),a=t(53402),n=t(95540),r=t(41598),e={parseBody:function(s,h,i,l){l===void 0&&(l={});for(var u=n(i,"fixtures",[]),d=[],f=0;f<u.length;f++)for(var v=this.parseFixture(u[f]),m=0;m<v.length;m++)d.push(v[m]);var y=a.clone(i,!0);a.extend(y,l,!0),delete y.fixtures,delete y.type;var g=p.create(y);return p.setParts(g,d),p.setPosition(g,{x:s,y:h}),g},parseFixture:function(s){var h=a.extend({},!1,s);delete h.circle,delete h.vertices;var i;if(s.circle){var l=n(s.circle,"x"),u=n(s.circle,"y"),d=n(s.circle,"radius");i=[o.circle(l,u,d,h)]}else s.vertices&&(i=this.parseVertices(s.vertices,h));return i},parseVertices:function(s,h){h===void 0&&(h={});for(var i=[],l=0;l<s.length;l++)r.clockwiseSort(s[l]),i.push(p.create(a.extend({position:r.centre(s[l]),vertices:s[l]},h)));return o.flagCoincidentParts(i)}};c.exports=e},85791:(c,x,t)=>{/**
4460 * @author       Richard Davey <[email protected]>
4461 * @copyright    2013-2025 Phaser Studio Inc.
4462 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4463 */var o=t(66280),p=t(22562),a={parseBody:function(n,r,e,s){s===void 0&&(s={});var h,i=e.vertices;if(i.length===1)s.vertices=i[0],h=p.create(s),o.flagCoincidentParts(h.parts);else{for(var l=[],u=0;u<i.length;u++){var d=p.create({vertices:i[u]});l.push(d)}o.flagCoincidentParts(l),s.parts=l,h=p.create(s)}return h.label=e.label,p.setPosition(h,{x:n,y:r}),h}};c.exports=a},98713:(c,x,t)=>{/**
4464 * @author       Richard Davey <[email protected]>
4465 * @copyright    2013-2025 Phaser Studio Inc.
4466 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4467 */var o=t(15647),p=t(83419),a=t(69351),n=t(48140),r=t(81388),e=t(1121),s=t(8214),h=t(46975),i=t(53614),l=t(26099),u=t(41598),d=new p({initialize:function(v,m,y){y===void 0&&(y={});var g={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=v,this.world=m,this.camera=null,this.pointer=null,this.active=!0,this.position=new l,this.body=null,this.part=null,this.constraint=n.create(h(y,g)),this.world.on(e.BEFORE_UPDATE,this.update,this),v.sys.input.on(s.POINTER_DOWN,this.onDown,this),v.sys.input.on(s.POINTER_UP,this.onUp,this)},onDown:function(f){this.pointer||(this.pointer=f,this.camera=f.camera)},onUp:function(f){f===this.pointer&&(this.pointer=null)},getBody:function(f){var v=this.position,m=this.constraint;this.camera.getWorldPoint(f.x,f.y,v);for(var y=a.allBodies(this.world.localWorld),g=0;g<y.length;g++){var T=y[g];if(!T.ignorePointer&&o.contains(T.bounds,v)&&r.canCollide(T.collisionFilter,m.collisionFilter)&&this.hitTestBody(T,v))return this.world.emit(e.DRAG_START,T,this.part,this),!0}return!1},hitTestBody:function(f,v){for(var m=this.constraint,y=f.parts.length,g=y>1?1:0,T=g;T<y;T++){var S=f.parts[T];if(u.contains(S.vertices,v))return m.pointA=v,m.pointB={x:v.x-f.position.x,y:v.y-f.position.y},m.bodyB=f,m.angleB=f.angle,i.set(f,!1),this.part=S,this.body=f,!0}return!1},update:function(){var f=this.pointer,v=this.body;
4467if(!this.active||!f){v&&this.stopDrag();return}if(!f.isDown&&v){this.stopDrag();return}else if(f.isDown){if(!this.camera||!v&&!this.getBody(f))return;v=this.body;var m=this.position,y=this.constraint;this.camera.getWorldPoint(f.x,f.y,m),y.pointA.x=m.x,y.pointA.y=m.y,i.set(v,!1),this.world.emit(e.DRAG,v,this)}},stopDrag:function(){var f=this.body,v=this.constraint;v.bodyB=null,v.pointB=null,this.pointer=null,this.body=null,this.part=null,f&&this.world.emit(e.DRAG_END,f,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(e.BEFORE_UPDATE,this.update),this.scene.sys.input.off(s.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(s.POINTER_UP,this.onUp,this)}});c.exports=d},68243:(c,x,t)=>{/**
4468 * @author       Richard Davey <[email protected]>
4469 * @copyright    2013-2025 Phaser Studio Inc.
4470 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4471 */var o=t(66280),p=t(22562),a=t(83419),n=t(53402),r=t(69351),e=t(48413),s=t(50792),h=t(1121),i=t(95540),l=t(35154),u=t(22562),d=t(35810),f=t(73834),v=t(4372),m=t(13037),y=t(31725),g=new a({Extends:s,initialize:function(S,E){s.call(this),this.scene=S,this.engine=e.create(E),this.localWorld=this.engine.world;var M=l(E,"gravity",null);M?this.setGravity(M.x,M.y,M.scale):M===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=l(E,"enabled",!0),this.getDelta=l(E,"getDelta",this.update60Hz);var F=i(E,"runner",{}),A=i(F,"fps",!1);A&&(F.delta=1e3/i(F,"fps",60)),this.runner=m.create(F),this.autoUpdate=l(E,"autoUpdate",!0);var P=l(E,"debug",!1);if(this.drawDebug=typeof P=="object"?!0:P,this.debugGraphic,this.debugConfig={showAxes:i(P,"showAxes",!1),showAngleIndicator:i(P,"showAngleIndicator",!1),angleColor:i(P,"angleColor",15208787),showBroadphase:i(P,"showBroadphase",!1),broadphaseColor:i(P,"broadphaseColor",16757760),showBounds:i(P,"showBounds",!1),boundsColor:i(P,"boundsColor",16777215),showVelocity:i(P,"showVelocity",!1),velocityColor:i(P,"velocityColor",44783),showCollisions:i(P,"showCollisions",!1),collisionColor:i(P,"collisionColor",16094476),showSeparations:i(P,"showSeparations",!1),separationColor:i(P,"separationColor",16753920),showBody:i(P,"showBody",!0),showStaticBody:i(P,"showStaticBody",!0),showInternalEdges:i(P,"showInternalEdges",!1),renderFill:i(P,"renderFill",!1),renderLine:i(P,"renderLine",!0),fillColor:i(P,"fillColor",1075465),fillOpacity:i(P,"fillOpacity",1),lineColor:i(P,"lineColor",2678297),lineOpacity:i(P,"lineOpacity",1),lineThickness:i(P,"lineThickness",1),staticFillColor:i(P,"staticFillColor",857979),staticLineColor:i(P,"staticLineColor",1255396),showSleeping:i(P,"showSleeping",!1),staticBodySleepOpacity:i(P,"staticBodySleepOpacity",.7),sleepFillColor:i(P,"sleepFillColor",4605510),sleepLineColor:i(P,"sleepLineColor",10066585),showSensors:i(P,"showSensors",!0),sensorFillColor:i(P,"sensorFillColor",857979),sensorLineColor:i(P,"sensorLineColor",1255396),showPositions:i(P,"showPositions",!0),positionSize:i(P,"positionSize",4),positionColor:i(P,"positionColor",14697178),showJoint:i(P,"showJoint",!0),jointColor:i(P,"jointColor",14737474),jointLineOpacity:i(P,"jointLineOpacity",1),jointLineThickness:i(P,"jointLineThickness",2),pinSize:i(P,"pinSize",4),pinColor:i(P,"pinColor",4382944),springColor:i(P,"springColor",14697184),anchorColor:i(P,"anchorColor",15724527),anchorSize:i(P,"anchorSize",4),showConvexHulls:i(P,"showConvexHulls",!1),hullColor:i(P,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(E,"setBounds",!1)){var L=E.setBounds;if(typeof L=="boolean")this.setBounds();else{var O=i(L,"x",0),G=i(L,"y",0),z=i(L,"width",S.sys.scale.width),Y=i(L,"height",S.sys.scale.height),X=i(L,"thickness",64),I=i(L,"left",!0),U=i(L,"right",!0),D=i(L,"top",!0),V=i(L,"bottom",!0);this.setBounds(O,G,z,Y,X,I,U,D,V)}}},setCompositeRenderStyle:function(T){var S=T.bodies,E=T.constraints,M=T.composites,F,A,P;for(F=0;F<S.length;F++)A=S[F],P=A.render,this.setBodyRenderStyle(A,P.lineColor,P.lineOpacity,P.lineThickness,P.fillColor,P.fillOpacity);for(F=0;F<E.length;F++)A=E[F],P=A.render,this.setConstraintRenderStyle(A,P.lineColor,P.lineOpacity,P.lineThickness,P.pinSize,P.anchorColor,P.anchorSize);for(F=0;F<M.length;F++)A=M[F],this.setCompositeRenderStyle(A);return this},setBodyRenderStyle:function(T,S,E,M,F,A){var P=T.render,L=this.debugConfig;return P?(S==null&&(S=T.isStatic?L.staticLineColor:L.lineColor),E==null&&(E=L.lineOpacity),M==null&&(M=L.lineThickness),F==null&&(F=T.isStatic?L.staticFillColor:L.fillColor),A==null&&(A=L.fillOpacity),S!==!1&&(P.lineColor=S),E!==!1&&(P.lineOpacity=E),M!==!1&&(P.lineThickness=M),F!==!1&&(P.fillColor=F),A!==!1&&(P.fillOpacity=A),this):this},setConstraintRenderStyle:function(T,S,E,M,F,A,P){var L=T.render,O=this.debugConfig;if(!L)return this;if(S==null){var G=L.type;G==="line"?S=O.jointColor:G==="pin"?S=O.pinColor:G==="spring"&&(S=O.
4471springColor)}return E==null&&(E=O.jointLineOpacity),M==null&&(M=O.jointLineThickness),F==null&&(F=O.pinSize),A==null&&(A=O.anchorColor),P==null&&(P=O.anchorSize),S!==!1&&(L.lineColor=S),E!==!1&&(L.lineOpacity=E),M!==!1&&(L.lineThickness=M),F!==!1&&(L.pinSize=F),A!==!1&&(L.anchorColor=A),P!==!1&&(L.anchorSize=P),this},setEventsProxy:function(){var T=this,S=this.engine,E=this.localWorld;this.drawDebug&&(d.on(E,"compositeModified",function(M){T.setCompositeRenderStyle(M)}),d.on(E,"beforeAdd",function(M){for(var F=[].concat(M.object),A=0;A<F.length;A++){var P=F[A],L=P.render;P.type==="body"?T.setBodyRenderStyle(P,L.lineColor,L.lineOpacity,L.lineThickness,L.fillColor,L.fillOpacity):P.type==="composite"?T.setCompositeRenderStyle(P):P.type==="constraint"&&T.setConstraintRenderStyle(P,L.lineColor,L.lineOpacity,L.lineThickness,L.pinSize,L.anchorColor,L.anchorSize)}})),d.on(E,"beforeAdd",function(M){T.emit(h.BEFORE_ADD,M)}),d.on(E,"afterAdd",function(M){T.emit(h.AFTER_ADD,M)}),d.on(E,"beforeRemove",function(M){T.emit(h.BEFORE_REMOVE,M)}),d.on(E,"afterRemove",function(M){T.emit(h.AFTER_REMOVE,M)}),d.on(S,"beforeUpdate",function(M){T.emit(h.BEFORE_UPDATE,M)}),d.on(S,"afterUpdate",function(M){T.emit(h.AFTER_UPDATE,M)}),d.on(S,"collisionStart",function(M){var F=M.pairs,A,P;F.length>0&&F.map(function(L){A=L.bodyA,P=L.bodyB,A.gameObject&&A.gameObject.emit("collide",A,P,L),P.gameObject&&P.gameObject.emit("collide",P,A,L),d.trigger(A,"onCollide",{pair:L}),d.trigger(P,"onCollide",{pair:L}),A.onCollideCallback&&A.onCollideCallback(L),P.onCollideCallback&&P.onCollideCallback(L),A.onCollideWith[P.id]&&A.onCollideWith[P.id](P,L),P.onCollideWith[A.id]&&P.onCollideWith[A.id](A,L)}),T.emit(h.COLLISION_START,M,A,P)}),d.on(S,"collisionActive",function(M){var F=M.pairs,A,P;F.length>0&&F.map(function(L){A=L.bodyA,P=L.bodyB,A.gameObject&&A.gameObject.emit("collideActive",A,P,L),P.gameObject&&P.gameObject.emit("collideActive",P,A,L),d.trigger(A,"onCollideActive",{pair:L}),d.trigger(P,"onCollideActive",{pair:L}),A.onCollideActiveCallback&&A.onCollideActiveCallback(L),P.onCollideActiveCallback&&P.onCollideActiveCallback(L)}),T.emit(h.COLLISION_ACTIVE,M,A,P)}),d.on(S,"collisionEnd",function(M){var F=M.pairs,A,P;F.length>0&&F.map(function(L){A=L.bodyA,P=L.bodyB,A.gameObject&&A.gameObject.emit("collideEnd",A,P,L),P.gameObject&&P.gameObject.emit("collideEnd",P,A,L),d.trigger(A,"onCollideEnd",{pair:L}),d.trigger(P,"onCollideEnd",{pair:L}),A.onCollideEndCallback&&A.onCollideEndCallback(L),P.onCollideEndCallback&&P.onCollideEndCallback(L)}),T.emit(h.COLLISION_END,M,A,P)})},setBounds:function(T,S,E,M,F,A,P,L,O){return T===void 0&&(T=0),S===void 0&&(S=0),E===void 0&&(E=this.scene.sys.scale.width),M===void 0&&(M=this.scene.sys.scale.height),F===void 0&&(F=64),A===void 0&&(A=!0),P===void 0&&(P=!0),L===void 0&&(L=!0),O===void 0&&(O=!0),this.updateWall(A,"left",T-F,S-F,F,M+F*2),this.updateWall(P,"right",T+E,S-F,F,M+F*2),this.updateWall(L,"top",T,S-F,E,F),this.updateWall(O,"bottom",T,S+M,E,F),this},updateWall:function(T,S,E,M,F,A){var P=this.walls[S];T?(P&&v.remove(this.localWorld,P),E+=F/2,M+=A/2,this.walls[S]=this.create(E,M,F,A,{isStatic:!0,friction:0,frictionStatic:0})):(P&&v.remove(this.localWorld,P),this.walls[S]=null)},createDebugGraphic:function(){var T=this.scene.sys.add.graphics({x:0,y:0});return T.setDepth(Number.MAX_VALUE),this.debugGraphic=T,this.drawDebug=!0,T},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(T,S,E){return T===void 0&&(T=0),S===void 0&&(S=1),E===void 0&&(E=.001),this.localWorld.gravity.x=T,this.localWorld.gravity.y=S,this.localWorld.gravity.scale=E,this},create:function(T,S,E,M,F){var A=o.rectangle(T,S,E,M,F);return v.add(this.localWorld,A),A},add:function(T){return v.add(this.localWorld,T),this},remove:function(T,S){Array.isArray(T)||(T=[T]);for(var E=0;E<T.length;E++){var M=T[E],F=M.body?M.body:M;r.remove(this.localWorld,F,S)}return this},removeConstraint:function(T,S){return r.remove(this.localWorld,T,S),this},convertTilemapLayer:function(T,S){var E=T.layer,M=T.getTilesWithin(0,0,E.width,E.height,{isColliding:!0});return this.convertTiles(M,S),this},convertTiles:function(T,S){if(T.length===0)return this;for(var E=0;E<T.length;E++)new f(this,T[E],S);return this},nextGroup:function(T){return u.nextGroup(T)},nextCategory:function(){return u.nextCategory()}
4471,pause:function(){return this.enabled=!1,this.emit(h.PAUSE),this},resume:function(){return this.enabled=!0,this.runner.timeLastTick=n.now(),this.emit(h.RESUME),this},update:function(T){if(!(!this.enabled||!this.autoUpdate)){var S=this.engine,E=this.runner,M=n.now(),F=E.delta,A=0,P=T-E.timeLastTick;if((!P||!E.timeLastTick||P>Math.max(m._maxFrameDelta,E.maxFrameTime))&&(P=E.frameDelta||m._frameDeltaFallback),E.frameDeltaSmoothing){E.frameDeltaHistory.push(P),E.frameDeltaHistory=E.frameDeltaHistory.slice(-E.frameDeltaHistorySize);var L=E.frameDeltaHistory.slice(0).sort(),O=E.frameDeltaHistory.slice(L.length*m._smoothingLowerBound,L.length*m._smoothingUpperBound),G=m._mean(O);P=G||P}E.frameDeltaSnapping&&(P=1e3/Math.round(1e3/P)),E.frameDelta=P,E.timeLastTick=T,E.timeBuffer+=E.frameDelta,E.timeBuffer=n.clamp(E.timeBuffer,0,E.frameDelta+F*m._timeBufferMargin),E.lastUpdatesDeferred=0;for(var z=E.maxUpdates||Math.ceil(E.maxFrameTime/F),Y=n.now();F>0&&E.timeBuffer>=F*m._timeBufferMargin;){e.update(S,F),E.timeBuffer-=F,A+=1;var X=n.now()-M,I=n.now()-Y,U=X+m._elapsedNextEstimate*I/A;if(A>=z||U>E.maxFrameTime){E.lastUpdatesDeferred=Math.round(Math.max(0,E.timeBuffer/F-m._timeBufferMargin));break}}}},step:function(T){e.update(this.engine,T)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(T){var S=T.hasOwnProperty("body")?T.body:T;return r.get(this.localWorld,S.id,S.type)!==null},getAllBodies:function(){return r.allBodies(this.localWorld)},getAllConstraints:function(){return r.allConstraints(this.localWorld)},getAllComposites:function(){return r.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var T=this.debugConfig,S=this.engine,E=this.debugGraphic,M=r.allBodies(this.localWorld);this.debugGraphic.clear(),T.showBroadphase&&S.broadphase.controller&&this.renderGrid(S.broadphase,E,T.broadphaseColor,.5),T.showBounds&&this.renderBodyBounds(M,E,T.boundsColor,.5),(T.showBody||T.showStaticBody)&&this.renderBodies(M),T.showJoint&&this.renderJoints(),(T.showAxes||T.showAngleIndicator)&&this.renderBodyAxes(M,E,T.showAxes,T.angleColor,.5),T.showVelocity&&this.renderBodyVelocity(M,E,T.velocityColor,1,2),T.showSeparations&&this.renderSeparations(S.pairs.list,E,T.separationColor),T.showCollisions&&this.renderCollisions(S.pairs.list,E,T.collisionColor)}},renderGrid:function(T,S,E,M){S.lineStyle(1,E,M);for(var F=n.keys(T.buckets),A=0;A<F.length;A++){var P=F[A];if(!(T.buckets[P].length<2)){var L=P.split(/C|R/);S.strokeRect(parseInt(L[1],10)*T.bucketWidth,parseInt(L[2],10)*T.bucketHeight,T.bucketWidth,T.bucketHeight)}}return this},renderSeparations:function(T,S,E){S.lineStyle(1,E,1);for(var M=0;M<T.length;M++){var F=T[M];if(F.isActive){var A=F.collision,P=A.bodyA,L=A.bodyB,O=P.position,G=L.position,z=A.penetration,Y=!P.isStatic&&!L.isStatic?4:1;L.isStatic&&(Y=0),S.lineBetween(G.x,G.y,G.x-z.x*Y,G.y-z.y*Y),Y=!P.isStatic&&!L.isStatic?4:1,P.isStatic&&(Y=0),S.lineBetween(O.x,O.y,O.x-z.x*Y,O.y-z.y*Y)}}return this},renderCollisions:function(T,S,E){S.lineStyle(1,E,.5),S.fillStyle(E,1);var M,F;for(M=0;M<T.length;M++)if(F=T[M],!!F.isActive)for(var A=0;A<F.contactCount;A++){var P=F.contacts[A],L=P.vertex;L&&S.fillRect(L.x-2,L.y-2,5,5)}for(M=0;M<T.length;M++)if(F=T[M],!!F.isActive){var O=F.collision,G=F.contacts;if(F.contactCount>0){var z=G[0].vertex.x,Y=G[0].vertex.y;F.contactCount===2&&(z=(G[0].vertex.x+G[1].vertex.x)/2,Y=(G[0].vertex.y+G[1].vertex.y)/2),O.bodyB===O.supports[0].body||O.bodyA.isStatic?S.lineBetween(z-O.normal.x*8,Y-O.normal.y*8,z,Y):S.lineBetween(z+O.normal.x*8,Y+O.normal.y*8,z,Y)}}return this},renderBodyBounds:function(T,S,E,M){S.lineStyle(1,E,M);for(var F=0;F<T.length;F++){var A=T[F];if(A.render.visible){var P=A.bounds;if(P)S.strokeRect(P.min.x,P.min.y,P.max.x-P.min.x,P.max.y-P.min.y);else for(var L=A.parts,O=L.length>1?1:0;O<L.length;O++){var G=L[O];S.strokeRect(G.bounds.min.x,G.bounds.min.y,G.bounds.max.x-G.bounds.min.x,G.bounds.max.y-G.bounds.min.y)}}}return this},renderBodyAxes:function(T,S,E,M,F){S.lineStyle(1,M,F);for(var A=0;A<T.length;A++){var P=T[A],L=P.parts;if(P.render.visible){var O,G,z;if(E)for(G=L.length>1?1:0;G<L.length;G++)for(O=L[G],z=0;z<O.axes.length;z++){var Y=O.axes[z];S.lineBetween(O.position.x,O.position.y,O.position.x+Y.x*20,O.position.y+Y.y*20)}else for(G=L.length>1?1:0;G<L.length;G++)for(O=L[G],z=0;z<O.axes.length;z++)S.lineBetween(O.position.x,O.position.y,(O.vertices[0].x+O.vertices[O.vertices.length-1].x)/2,(O.vertices[0].y+O.vertices[O.vertices.length-1].y)/2)}}return this},renderBodyVelocity:function(T,S,E,M,F){S.lineStyle(F,E,M);for(var A=0;A<T.length;A++){var P=T[A];P.render.visible&&S.lineBetween(P.position.x,P.position.y,P.position.x+(P.position.x-P.positionPrev.x)*2,P.position.y+(P.position.y-P.positionPrev.y)*2)}return this},renderBodies:function(T){for(var S=this.debugGraphic,E=this.debugConfig,M=E.showBody,F=E.showStaticBody,A=E.showSleeping,P=E.showInternalEdges,L=E.showConvexHulls,O=E.renderFill,G=E.renderLine,z=E.staticBodySleepOpacity,Y=E.sleepFillColor,X=E.sleepLineColor,I=E.hullColor,U=0;U<T.length;U++){var D=T[U];if(D.render.visible&&!(!F&&D.isStatic||!M&&!D.isStatic)){var V=D.render.lineColor,B=D.render.lineOpacity,W=D.render.lineThickness,K=D.render.fillColor,J=D.render.fillOpacity;A&&D.isSleeping&&(D.isStatic?(B*=z,J*=z):(V=X,K=Y)),O||(K=null),G||(V=null),this.renderBody(D,S,P,V,B,W,K,J);var Z=D.parts.length;L&&Z>1&&this.renderConvexHull(D,S,I,W)}}},renderBody:function(T,S,E,M,F,A,P,L){M===void 0&&(M=null),F===void 0&&(F=null),A===void 0&&(A=1),P===void 0&&(P=null),L===void 0&&(L=null);for(var O=this.debugConfig,G=O.sensorFillColor,z=O.sensorLineColor,Y=T.parts,X=Y.length,I=X>1?1:0;I<X;I++){var U=Y[I],D=U.render,V=D.opacity;if(!(!D.visible||V===0||U.isSensor&&!O.showSensors)){var B=U.circleRadius;if(S.beginPath(),U.isSensor?(P!==null&&S.fillStyle(G,L*V),M!==null&&S.lineStyle(A,z,F*V)):(P!==null&&S.fillStyle(P,L*V),M!==null&&S.lineStyle(A,M,F*V)),B)S.arc(U.position.x,U.position.y,B,0,2*Math.PI);else{var W=U.vertices,K=W.length;S.moveTo(W[0].x,W[0].y);for(var J=1;J<K;J++){var Z=W[J];if(!W[J-1].isInternal||E?S.lineTo(Z.x,Z.y):S.moveTo(Z.x,Z.y),J<K&&Z.isInternal&&!E){var j=(J+1)%K;S.moveTo(W[j].x,W[j].y)}}S.closePath()}P!==null&&S.fillPath(),M!==null&&S.strokePath()}}if(O.showPositions&&!T.isStatic){var k=T.position.x,_=T.position.y,q=Math.ceil(O.positionSize/2);S.fillStyle(O.positionColor,1),S.fillRect(k-q,_-q,O.positionSize,O.positionSize)}return this},renderConvexHull:function(T,S,E,M){M===void 0&&(M=1);var F=T.parts,A=F.length;if(A>1){var P=T.vertices;S.lineStyle(M,E),S.beginPath(),S.moveTo(P[0].x,P[0].y);for(var L=1;L<P.length;L++)S.lineTo(P[L].x,P[L].y);S.lineTo(P[0].x,P[0].y),S.strokePath()}return this},renderJoints:function(){for(var T=this.debugGraphic,S=r.allConstraints(this.localWorld),E=0;E<S.length;E++){var M=S[E].render,F=M.lineColor,A=M.lineOpacity,P=M.lineThickness,L=M.pinSize,O=M.anchorColor,G=M.anchorSize;this.renderConstraint(S[E],T,F,A,P,L,O,G)}},renderConstraint:function(T,S,E,M,F,A,P,L){var O=T.render;if(!O.visible||!T.pointA||!T.pointB)return this;S.lineStyle(F,E,M);var G=T.bodyA,z=T.bodyB,Y,X;if(G?Y=y.add(G.position,T.pointA):Y=T.pointA,O.type==="pin")S.strokeCircle(Y.x,Y.y,A);else{if(z?X=y.add(z.position,T.pointB):X=T.pointB,S.beginPath(),S.moveTo(Y.x,Y.y),O.type==="spring")for(var I=y.sub(X,Y),U=y.perp(y.normalise(I)),D=Math.ceil(n.clamp(T.length/5,12,20)),V,B=1;B<D;
vendor: 24,274 bytes, lines 4471-4595
4471B+=1)V=B%2===0?1:-1,S.lineTo(Y.x+I.x*(B/D)+U.x*V*4,Y.y+I.y*(B/D)+U.y*V*4);S.lineTo(X.x,X.y)}return S.strokePath(),O.anchors&&L>0&&(S.fillStyle(P),S.fillCircle(Y.x,Y.y,L),S.fillCircle(X.x,X.y,L)),this},resetCollisionIDs:function(){return p._nextCollidingGroupId=1,p._nextNonCollidingGroupId=-1,p._nextCategory=1,this},shutdown:function(){d.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});c.exports=g},70410:c=>{/**
4472 * @author       Richard Davey <[email protected]>
4473 * @copyright    2013-2025 Phaser Studio Inc.
4474 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4475 */var x={setBounce:function(t){return this.body.restitution=t,this}};c.exports=x},66968:c=>{/**
4476 * @author       Richard Davey <[email protected]>
4477 * @copyright    2013-2025 Phaser Studio Inc.
4478 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4479 */var x={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var o=0;if(!Array.isArray(t))o=t;else for(var p=0;p<t.length;p++)o|=t[p];return this.body.collisionFilter.mask=o,this},setOnCollide:function(t){return this.body.onCollideCallback=t,this},setOnCollideEnd:function(t){return this.body.onCollideEndCallback=t,this},setOnCollideActive:function(t){return this.body.onCollideActiveCallback=t,this},setOnCollideWith:function(t,o){Array.isArray(t)||(t=[t]);for(var p=0;p<t.length;p++){var a=t[p].hasOwnProperty("body")?t[p].body:t[p];this.body.setOnCollideWith(a,o)}return this}};c.exports=x},51607:(c,x,t)=>{/**
4480 * @author       Richard Davey <[email protected]>
4481 * @copyright    2013-2025 Phaser Studio Inc.
4482 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4483 */var o=t(22562),p={applyForce:function(a){return this._tempVec2.set(this.body.position.x,this.body.position.y),o.applyForce(this.body,this._tempVec2,a),this},applyForceFrom:function(a,n){return o.applyForce(this.body,a,n),this},thrust:function(a){var n=this.body.angle;return this._tempVec2.set(a*Math.cos(n),a*Math.sin(n)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(a){var n=this.body.angle-Math.PI/2;return this._tempVec2.set(a*Math.cos(n),a*Math.sin(n)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(a){var n=this.body.angle+Math.PI/2;return this._tempVec2.set(a*Math.cos(n),a*Math.sin(n)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(a){var n=this.body.angle-Math.PI;return this._tempVec2.set(a*Math.cos(n),a*Math.sin(n)),o.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};c.exports=p},5436:c=>{/**
4484 * @author       Richard Davey <[email protected]>
4485 * @copyright    2013-2025 Phaser Studio Inc.
4486 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4487 */var x={setFriction:function(t,o,p){return this.body.friction=t,o!==void 0&&(this.body.frictionAir=o),p!==void 0&&(this.body.frictionStatic=p),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};c.exports=x},39858:c=>{/**
4488 * @author       Richard Davey <[email protected]>
4489 * @copyright    2013-2025 Phaser Studio Inc.
4490 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4491 */var x={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};c.exports=x},37302:(c,x,t)=>{/**
4492 * @author       Richard Davey <[email protected]>
4493 * @copyright    2013-2025 Phaser Studio Inc.
4494 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4495 */var o=t(22562),p=t(26099),a={setMass:function(n){return o.setMass(this.body,n),this},setDensity:function(n){return o.setDensity(this.body,n),this},centerOfMass:{get:function(){return new p(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};c.exports=a},39132:c=>{/**
4496 * @author       Richard Davey <[email protected]>
4497 * @copyright    2013-2025 Phaser Studio Inc.
4498 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4499 */var x={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};c.exports=x},57772:(c,x,t)=>{/**
4500 * @author       Richard Davey <[email protected]>
4501 * @copyright    2013-2025 Phaser Studio Inc.
4502 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4503 */var o=t(66280),p=t(22562),a=t(43855),n=t(95540),r=t(19496),e=t(85791),s=t(41598),h={setRectangle:function(i,l,u){return this.setBody({type:"rectangle",width:i,height:l},u)},setCircle:function(i,l){return this.setBody({type:"circle",radius:i},l)},setPolygon:function(i,l,u){return this.setBody({type:"polygon",sides:l,radius:i},u)},setTrapezoid:function(i,l,u,d){return this.setBody({type:"trapezoid",width:i,height:l,slope:u},d)},setExistingBody:function(i,l){l===void 0&&(l=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var u=0;u<i.parts.length;u++)i.parts[u].gameObject=this;var d=this;if(i.destroy=function(){d.world.remove(d.body,!0),d.body.gameObject=null},l&&(this.world.has(i)&&this.world.remove(i,!0),this.world.add(i)),this._originComponent){var f=i.render.sprite.xOffset,v=i.render.sprite.yOffset,m=i.centerOfMass.x,y=i.centerOfMass.y;if(a(m,.5)&&a(y,.5))this.setOrigin(f+.5,v+.5);else{var g=i.centerOffset.x,T=i.centerOffset.y;this.setOrigin(f+g/this.displayWidth,v+T/this.displayHeight)}}return this},setBody:function(i,l){if(!i)return this;var u;typeof i=="string"&&(i={type:i});var d=n(i,"type","rectangle"),f=n(i,"x",this._tempVec2.x),v=n(i,"y",this._tempVec2.y),m=n(i,"width",this.width),y=n(i,"height",this.height);switch(d){case"rectangle":u=o.rectangle(f,v,m,y,l);break;case"circle":var g=n(i,"radius",Math.max(m,y)/2),T=n(i,"maxSides",25);u=o.circle(f,v,g,l,T);break;case"trapezoid":var S=n(i,"slope",.5);u=o.trapezoid(f,v,m,y,S,l);break;case"polygon":var E=n(i,"sides",5),M=n(i,"radius",Math.max(m,y)/2);u=o.polygon(f,v,E,M,l);break;case"fromVertices":case"fromVerts":var F=n(i,"verts",null);if(F)if(typeof F=="string"&&(F=s.fromPath(F)),this.body&&!this.body.hasOwnProperty("temp"))p.setVertices(this.body,F),u=this.body;else{var A=n(i,"flagInternal",!1),P=n(i,"removeCollinear",.01),L=n(i,"minimumArea",10);u=o.fromVertices(f,v,F,l,A,P,L)}break;case"fromPhysicsEditor":u=r.parseBody(f,v,i,l);break;case"fromPhysicsTracer":u=e.parseBody(f,v,i,l);break}return u&&this.setExistingBody(u,i.addToWorld),this}};c.exports=h},38083:(c,x,t)=>{/**
4504 * @author       Richard Davey <[email protected]>
4505 * @copyright    2013-2025 Phaser Studio Inc.
4506 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4507 */var o=t(1121),p=t(53614),a=t(35810),n={setToSleep:function(){return p.set(this.body,!0),this},setAwake:function(){return p.set(this.body,!1),this},setSleepThreshold:function(r){return r===void 0&&(r=60),this.body.sleepThreshold=r,this},setSleepEvents:function(r,e){return this.setSleepStartEvent(r),this.setSleepEndEvent(e),this},setSleepStartEvent:function(r){if(r){var e=this.world;a.on(this.body,"sleepStart",function(s){e.emit(o.SLEEP_START,s,this)})}else a.off(this.body,"sleepStart");return this},setSleepEndEvent:function(r){if(r){var e=this.world;a.on(this.body,"sleepEnd",function(s){e.emit(o.SLEEP_END,s,this)})}else a.off(this.body,"sleepEnd");return this}};c.exports=n},90556:(c,x,t)=>{/**
4508 * @author       Richard Davey <[email protected]>
4509 * @copyright    2013-2025 Phaser Studio Inc.
4510 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4511 */var o=t(22562),p={setStatic:function(a){return o.setStatic(this.body,a),this},isStatic:function(){return this.body.isStatic}};c.exports=p},85436:(c,x,t)=>{/**
4512 * @author       Richard Davey <[email protected]>
4513 * @copyright    2013-2025 Phaser Studio Inc.
4514 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4515 */var o=t(22562),p=t(36383),a=t(86554),n=t(30954),r=4,e={x:{get:function(){return this.body.position.x},set:function(s){this._tempVec2.set(s,this.y),o.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(s){this._tempVec2.set(this.x,s),o.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(s){this.setScale(s,s)}},scaleX:{get:function(){return this._scaleX},set:function(s){var h=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~r:this.renderFlags|=r,o.scale(this.body,h,i),o.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&=~r:this.renderFlags|=r,o.scale(this.body,h,i),o.scale(this.body,this._scaleX,s)}},angle:{get:function(){return n(this.body.angle*p.RAD_TO_DEG)},set:function(s){this.rotation=n(s)*p.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(s){this._rotation=a(s),o.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),o.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=a(s),o.setAngle(this.body,s),this},setFixedRotation:function(){return o.setInertia(this.body,1/0),this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,o.setAngle(this.body,this.rotation),this},setScale:function(s,h,i){s===void 0&&(s=1),h===void 0&&(h=s);var l=1/this._scaleX,u=1/this._scaleY;return this._scaleX=s,this._scaleY=h,o.scale(this.body,l,u,i),o.scale(this.body,s,h,i),this}};c.exports=e},42081:(c,x,t)=>{/**
4516 * @author       Richard Davey <[email protected]>
4517 * @copyright    2013-2025 Phaser Studio Inc.
4518 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4519 */var o=t(22562),p={setVelocityX:function(a){return this._tempVec2.set(a,this.body.velocity.y),o.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(a){return this._tempVec2.set(this.body.velocity.x,a),o.setVelocity(this.body,this._tempVec2),this},setVelocity:function(a,n){return this._tempVec2.set(a,n),o.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return o.getVelocity(this.body)},setAngularVelocity:function(a){return o.setAngularVelocity(this.body,a),this},getAngularVelocity:function(){return o.getAngularVelocity(this.body)},setAngularSpeed:function(a){return o.setAngularSpeed(this.body,a),this},getAngularSpeed:function(){return o.getAngularSpeed(this.body)}};c.exports=p},31884:(c,x,t)=>{/**
4520 * @author       Richard Davey <[email protected]>
4521 * @copyright    2013-2025 Phaser Studio Inc.
4522 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4523 */c.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:c=>{/**
4524 * @author       Richard Davey <[email protected]>
4525 * @copyright    2013-2025 Phaser Studio Inc.
4526 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4527 */c.exports="afteradd"},1213:c=>{/**
4528 * @author       Richard Davey <[email protected]>
4529 * @copyright    2013-2025 Phaser Studio Inc.
4530 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4531 */c.exports="afterremove"},25968:c=>{/**
4532 * @author       Richard Davey <[email protected]>
4533 * @copyright    2013-2025 Phaser Studio Inc.
4534 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4535 */c.exports="afterupdate"},67205:c=>{/**
4536 * @author       Richard Davey <[email protected]>
4537 * @copyright    2013-2025 Phaser Studio Inc.
4538 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4539 */c.exports="beforeadd"},39438:c=>{/**
4540 * @author       Richard Davey <[email protected]>
4541 * @copyright    2013-2025 Phaser Studio Inc.
4542 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4543 */c.exports="beforeremove"},44823:c=>{/**
4544 * @author       Richard Davey <[email protected]>
4545 * @copyright    2013-2025 Phaser Studio Inc.
4546 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4547 */c.exports="beforeupdate"},92593:c=>{/**
4548 * @author       Richard Davey <[email protected]>
4549 * @copyright    2013-2025 Phaser Studio Inc.
4550 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4551 */c.exports="collisionactive"},60128:c=>{/**
4552 * @author       Richard Davey <[email protected]>
4553 * @copyright    2013-2025 Phaser Studio Inc.
4554 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4555 */c.exports="collisionend"},76861:c=>{/**
4556 * @author       Richard Davey <[email protected]>
4557 * @copyright    2013-2025 Phaser Studio Inc.
4558 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4559 */c.exports="collisionstart"},92362:c=>{/**
4560 * @author       Richard Davey <[email protected]>
4561 * @copyright    2013-2025 Phaser Studio Inc.
4562 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4563 */c.exports="dragend"},76408:c=>{/**
4564 * @author       Richard Davey <[email protected]>
4565 * @copyright    2013-2025 Phaser Studio Inc.
4566 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4567 */c.exports="drag"},93971:c=>{/**
4568 * @author       Richard Davey <[email protected]>
4569 * @copyright    2013-2025 Phaser Studio Inc.
4570 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4571 */c.exports="dragstart"},5656:c=>{/**
4572 * @author       Richard Davey <[email protected]>
4573 * @copyright    2013-2025 Phaser Studio Inc.
4574 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4575 */c.exports="pause"},47861:c=>{/**
4576 * @author       Richard Davey <[email protected]>
4577 * @copyright    2013-2025 Phaser Studio Inc.
4578 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4579 */c.exports="resume"},79099:c=>{/**
4580 * @author       Richard Davey <[email protected]>
4581 * @copyright    2013-2025 Phaser Studio Inc.
4582 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4583 */c.exports="sleepend"},35906:c=>{/**
4584 * @author       Richard Davey <[email protected]>
4585 * @copyright    2013-2025 Phaser Studio Inc.
4586 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4587 */c.exports="sleepstart"},1121:(c,x,t)=>{/**
4588 * @author       Richard Davey <[email protected]>
4589 * @copyright    2013-2025 Phaser Studio Inc.
4590 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4591 */c.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:(c,x,t)=>{/**
4592 * @author       Richard Davey <[email protected]>
4593 * @copyright    2013-2025 Phaser Studio Inc.
4594 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4595 */c.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:(c,x,t)=>{var o={};c.exports=o;var p=t(41598),a=t(31725),n=t(53614),r=t(53402),e=t(15647),s=t(66615);(function(){o._timeCorrection=!0,o._inertiaScale=4,o._nextCollidingGroupId=1,o._nextNonCollidingGroupId=-1,o._nextCategory=1,o._baseDelta=16.666666666666668,o.create=function(i){var l={id:r.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:i.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=p.centre(i.vertices):i.hasOwnProperty("vertices")||(l.vertices=p.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var u=r.extend(l,i);return h(u,i),u.setOnCollideWith=function(d,f){return f?this.onCollideWith[d.id]=f:delete this.onCollideWith[d.id],this},u},o.nextGroup=function(i){return i?o._nextNonCollidingGroupId--:o._nextCollidingGroupId++},o.nextCategory=function(){return o._nextCategory=o._nextCategory<<1,o._nextCategory};var h=function(i,l){if(l=l||{},o.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}),p.rotate(i.vertices,i.angle,i.position),s.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),o.set(i,{axes:l.axes||i.axes,area:l.area||i.area,mass:l.mass||i.mass,inertia:l.inertia||i.inertia}),i.parts.length===1){var u=i.bounds,d=i.centerOfMass,f=i.centerOffset,v=u.max.x-u.min.x,m=u.max.y-u.min.y;d.x=-(u.min.x-i.position.x)/v,d.y=-(u.min.y-i.position.y)/m,f.x=v*d.x,f.y=m*d.y}};o.set=function(i,l,u){var d;typeof l=="string"&&(d=l,l={},l[d]=u);for(d in l)if(Object.prototype.hasOwnProperty.call(l,d))switch(u=l[d],d){case"isStatic":o.setStatic(i,u);break;case"isSleeping":n.set(i,u);break;case"mass":o.setMass(i,u);break;case"density":o.setDensity(i,u);break;case"inertia":o.setInertia(i,u);break;case"vertices":o.setVertices(i,u);break;case"position":o.setPosition(i,u);break;case"angle":o.setAngle(i,u);break;case"velocity":o.setVelocity(i,u);break;case"angularVelocity":o.setAngularVelocity(i,u);break;case"speed":o.setSpeed(i,u);break;case"angularSpeed":o.setAngularSpeed(i,u);break;case"parts":o.setParts(i,u);break;case"centre":o.setCentre(i,u);break;default:i[d]=u}},o.setStatic=function(i,l){for(var u=0;u<i.parts.length;u++){var d=i.parts[u];l?(d.isStatic||(d._original={restitution:d.restitution,friction:d.friction,mass:d.mass,inertia:d.inertia,density:d.density,inverseMass:d.inverseMass,inverseInertia:d.inverseInertia}),d.restitution=0,d.friction=1,d.mass=d.inertia=d.density=1/0,d.inverseMass=d.inverseInertia=0,d.positionPrev.x=d.position.x,d.positionPrev.y=d.position.y,d.anglePrev=d.angle,d.angularVelocity=0,d.speed=0,d.angularSpeed=0,d.motion=0):d._original&&(d.restitution=d._original.restitution,d.friction=d._original.friction,d.mass=d._original.mass,d.inertia=d._original.inertia,d.density=d._original.density,d.inverseMass=d._original.inverseMass,d.inverseInertia=d._original.inverseInertia,d._original=null),d.isStatic=l}},o.setMass=function(i,l){var u=i.inertia/(i.mass/6);i.inertia=u*(l/6),i.inverseInertia=1/i.inertia,i.mass=l,i.inverseMass=1/i.mass,i.density=i.mass/i.area},o.setDensity=function(i,l){o.setMass(i,l*i.area),i.density=l},o.setInertia=function(i,l){i.inertia=l,i.inverseInertia=1/i.inertia},o.setVertices=function(i,l){l[0].body===i?i.vertices=l:i.vertices=p.create(l,i),i.axes=s.fromVertices(i.vertices),i.area=p.area(i.vertices),o.setMass(i,i.density*i.area);var u=p.centre(i.vertices);p.translate(i.vertices,u,-1),o.setInertia(i,o._inertiaScale*p.inertia(i.vertices,i.mass)),p.translate(i.vertices,i.position),e.update(i.bounds,i.vertices,i.velocity)},o.setParts=function(i,l,u){var d;for(l=l.slice(0),i.parts.length=0,i.parts.push(i),i.parent=i,d=0;d<l.length;d++){var f=l[d];f!==i&&(f.parent=i,i.parts.push(f))}if(i.parts.length!==1){if(u=typeof u<"u"?u:!0,u){var v=[];for(d=0;d<l.length;d++)v=v.concat(l[d].vertices);p.clockwiseSort(v);var m=p.hull(v),y=p.centre(m);o.setVertices(i,m),p.translate(i.vertices,y)}var g=o._totalProperties(i),T=g.centre.x,S=g.centre.y,E=i.bounds,M=i.centerOfMass,F=i.centerOffset;e.update(E,i.vertices,i.velocity),M.x=-(E.min.x-T)/(E.max.x-E.min.x),M.y=-(E.min.y-S)/(E.max.y-E.min.y),F.x=T,F.y=S,i.area=g.area,i.parent=i,i.position.x=T,i.position.y=S,i.positionPrev.x=T,i.positionPrev.y=S,o.setMass(i,g.mass),o.setInertia(i,g.inertia),o.setPosition(i,g.centre)}},o.setCentre=function(i,l,u){u?(i.positionPrev.x+=l.x,i.positionPrev.y+=l.y,i.position.x+=l.x,i.position.y+=l.y):(i.positionPrev.x=l.x-(i.position.x-i.positionPrev.x),i.positionPrev.y=l.y-(i.position.y-i.positionPrev.y),i.position.x=l.x,i.position.y=l.y)},o.setPosition=function(i,l,u){var d=a.sub(l,i.position);u?(i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.velocity.x=d.x,i.velocity.y=d.y,i.speed=a.magnitude(d)):(i.positionPrev.x+=d.x,i.positionPrev.y+=d.y);for(var f=0;f<i.parts.length;f++){var v=i.parts[f];v.position.x+=d.x,v.position.y+=d.y,p.translate(v.vertices,d),e.update(v.bounds,v.vertices,i.velocity)}},o.setAngle=function(i,l,u){var d=l-i.angle;u?(i.anglePrev=i.angle,i.angularVelocity=d,i.angularSpeed=Math.abs(d)):i.anglePrev+=d;for(var f=0;f<i.parts.length;f++){var v=i.parts[f];v.angle+=d,p.rotate(v.vertices,d,i.position),s.rotate(v.axes,d),e.update(v.bounds,v.vertices,i.velocity),f>0&&a.rotateAbout(v.position,d,i.position,v.position)}},o.setVelocity=function(i,l){var u=i.deltaTime/o._baseDelta;i.positionPrev.x=i.position.x-l.x*u,i.positionPrev.y=i.position.y-l.y*u,i.velocity.x=(i.position.x-i.positionPrev.x)/u,i.velocity.y=(i.position.y-i.positionPrev.y)/u,i.speed=a.magnitude(i.velocity)},o.getVelocity=function(i){var l=o._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*l,y:(i.position.y-i.positionPrev.y)*l}},o.getSpeed=function(i){return a.magnitude(o.getVelocity(i))},o.setSpeed=function(i,l){o.setVelocity(i,a.mult(a.normalise(o.getVelocity(i)),l))},o.setAngularVelocity=function(i,l){var u=i.deltaTime/o._baseDelta;i.anglePrev=i.angle-l*u,i.angularVelocity=(i.angle-i.anglePrev)/u,i.angularSpeed=Math.abs(i.angularVelocity)},o.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*o._baseDelta/i.deltaTime},o.getAngularSpeed=function(i){return Math.abs(o.getAngularVelocity(i))},o.setAngularSpeed=function(i,l){o.setAngularVelocity(i,r.sign(o.getAngularVelocity(i))*l)},o.translate=function(i,l,u){o.setPosition(i,a.add(i.position,l),u)},o.rotate=function(i,l,u,d){if(!u)o.setAngle(i,i.angle+l,d);else{var f=Math.cos(l),v=Math.sin(l),m=i.position.x-u.x,y=i.position.y-u.y;o.setPosition(i,{x:u.x+(m*f-y*v),y:u.y+(m*v+y*f)},d),o.setAngle(i,i.angle+l,d)}},o.scale=function(i,l,u,d){var f=0,v=0;d=d||i.position;for(var m=i.inertia===1/0,y=0;y<i.parts.length;y++){var g=i.parts[y];g.scale.x=l,g.scale.y=u,p.scale(g.vertices,l,u,d),g.axes=s.fromVertices(g.vertices),g.area=p.area(g.vertices),o.setMass(g,i.density*g.area),p.translate(g.vertices,{x:-g.position.x,y:-g.position.y}),o.setInertia(g,o._inertiaScale*p.inertia(g.vertices,g.mass)),p.translate(g.vertices,{x:g.position.x,y:g.position.y}),y>0&&(f+=g.area,v+=g.inertia),g.position.x=d.x+(g.position.x-d.x)*l,g.position.y=d.y+(g.position.y-d.y)*u,e.update(g.bounds,g.vertices,i.velocity)}i.parts.length>1&&(i.area=f,i.isStatic||(o.setMass(i,i.density*f),o.setInertia(i,v))),i.circleRadius&&(l===u?i.circleRadius*=l:i.circleRadius=null),m&&o.setInertia(i,1/0)},o.update=function(i,l){l=(typeof l<"u"?l:16.666666666666668)*i.timeScale;var u=l*l,d=o._timeCorrection?l/(i.deltaTime||l):1,f=1-i.frictionAir*(l/r._baseDelta),v=(i.position.x-i.positionPrev.x)*d,m=(i.position.y-i.positionPrev.y)*d;i.velocity.x=v*f+i.force.x/i.mass*u,i.velocity.y=m*f+i.force.y/i.mass*u,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.deltaT
4595ime=l,i.angularVelocity=(i.angle-i.anglePrev)*f*d+i.torque/i.inertia*u,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=a.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var y=0;y<i.parts.length;y++){var g=i.parts[y];p.translate(g.vertices,i.velocity),y>0&&(g.position.x+=i.velocity.x,g.position.y+=i.velocity.y),i.angularVelocity!==0&&(p.rotate(g.vertices,i.angularVelocity,i.position),s.rotate(g.axes,i.angularVelocity),y>0&&a.rotateAbout(g.position,i.angularVelocity,i.position,g.position)),e.update(g.bounds,g.vertices,i.velocity)}},o.updateVelocities=function(i){var l=o._baseDelta/i.deltaTime,u=i.velocity;u.x=(i.position.x-i.positionPrev.x)*l,u.y=(i.position.y-i.positionPrev.y)*l,i.speed=Math.sqrt(u.x*u.x+u.y*u.y),i.angularVelocity=(i.angle-i.anglePrev)*l,i.angularSpeed=Math.abs(i.angularVelocity)},o.applyForce=function(i,l,u){var d={x:l.x-i.position.x,y:l.y-i.position.y};i.force.x+=u.x,i.force.y+=u.y,i.torque+=d.x*u.y-d.y*u.x},o._totalProperties=function(i){for(var l={mass:0,area:0,inertia:0,centre:{x:0,y:0}},u=i.parts.length===1?0:1;u<i.parts.length;u++){var d=i.parts[u],f=d.mass!==1/0?d.mass:1;l.mass+=f,l.area+=d.area,l.inertia+=d.inertia,l.centre=a.add(l.centre,a.mult(d.position,f))}return l.centre=a.div(l.centre,l.mass),l},o.wrap=function(i,l){var u=e.wrap(i.bounds,l);return u&&o.translate(i,u),u}})()},69351:(c,x,t)=>{var o={};c.exports=o;var p=t(35810),a=t(53402),n=t(15647),r=t(22562);(function(){o.create=function(e){return a.extend({id:a.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},o.setModified=function(e,s,h,i){if(p.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&&o.setModified(e.parent,s,h,i),i)for(var l=0;l<e.composites.length;l++){var u=e.composites[l];o.setModified(u,s,h,i)}},o.add=function(e,s){var h=[].concat(s);p.trigger(e,"beforeAdd",{object:s});for(var i=0;i<h.length;i++){var l=h[i];switch(l.type){case"body":if(l.parent!==l){a.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}o.addBody(e,l);break;case"constraint":o.addConstraint(e,l);break;case"composite":o.addComposite(e,l);break;case"mouseConstraint":o.addConstraint(e,l.constraint);break}}return p.trigger(e,"afterAdd",{object:s}),e},o.remove=function(e,s,h){var i=[].concat(s);p.trigger(e,"beforeRemove",{object:s});for(var l=0;l<i.length;l++){var u=i[l];switch(u.type){case"body":o.removeBody(e,u,h);break;case"constraint":o.removeConstraint(e,u,h);break;case"composite":o.removeComposite(e,u,h);break;case"mouseConstraint":o.removeConstraint(e,u.constraint);break}}return p.trigger(e,"afterRemove",{object:s}),e},o.addComposite=function(e,s){return e.composites.push(s),s.parent=e,o.setModified(e,!0,!0,!1),e},o.removeComposite=function(e,s,h){var i=a.indexOf(e.composites,s);if(i!==-1){var l=o.allBodies(s);o.removeCompositeAt(e,i);for(var u=0;u<l.length;u++)l[u].sleepCounter=0}if(h)for(var u=0;u<e.composites.length;u++)o.removeComposite(e.composites[u],s,!0);return e},o.removeCompositeAt=function(e,s){return e.composites.splice(s,1),o.setModified(e,!0,!0,!1),e},o.addBody=function(e,s){return e.bodies.push(s),o.setModified(e,!0,!0,!1),e},o.removeBody=function(e,s,h){var i=a.indexOf(e.bodies,s);if(i!==-1&&(o.removeBodyAt(e,i),s.sleepCounter=0),h)for(var l=0;l<e.composites.length;l++)o.removeBody(e.composites[l],s,!0);return e},o.removeBodyAt=function(e,s){return e.bodies.splice(s,1),o.setModified(e,!0,!0,!1),e},o.addConstraint=function(e,s){return e.constraints.push(s),o.setModified(e,!0,!0,!1),e},o.removeConstraint=function(e,s,h){var i=a.indexOf(e.constraints,s);if(i!==-1&&o.removeConstraintAt(e,i),h)for(var l=0;l<e.composites.length;l++)o.removeConstraint(e.composites[l],s,!0);return e},o.removeConstraintAt=function(e,s){return e.constraints.splice(s,1),o.setModified(e,!0,!0,!1),e},o.clear=function(e,s,h){if(h)for(var i=0;i<e.composites.length;i++)o.clear(e.composites[i],s,!0);return s?e.bodies=e.bodies.filter(function(l){return l.isStatic}):e.bodies.length=0,e.constraints.length=0,e.composites.length=0,o.setModified(e,!0,!0,!1),e}
4595,o.allBodies=function(e){if(e.cache&&e.cache.allBodies)return e.cache.allBodies;for(var s=[].concat(e.bodies),h=0;h<e.composites.length;h++)s=s.concat(o.allBodies(e.composites[h]));return e.cache&&(e.cache.allBodies=s),s},o.allConstraints=function(e){if(e.cache&&e.cache.allConstraints)return e.cache.allConstraints;for(var s=[].concat(e.constraints),h=0;h<e.composites.length;h++)s=s.concat(o.allConstraints(e.composites[h]));return e.cache&&(e.cache.allConstraints=s),s},o.allComposites=function(e){if(e.cache&&e.cache.allComposites)return e.cache.allComposites;for(var s=[].concat(e.composites),h=0;h<e.composites.length;h++)s=s.concat(o.allComposites(e.composites[h]));return e.cache&&(e.cache.allComposites=s),s},o.get=function(e,s,h){var i,l;switch(h){case"body":i=o.allBodies(e);break;case"constraint":i=o.allConstraints(e);break;case"composite":i=o.allComposites(e).concat(e);break}return i?(l=i.filter(function(u){return u.id.toString()===s.toString()}),l.length===0?null:l[0]):null},o.move=function(e,s,h){return o.remove(e,s),o.add(h,s),e},o.rebase=function(e){for(var s=o.allBodies(e).concat(o.allConstraints(e)).concat(o.allComposites(e)),h=0;h<s.length;h++)s[h].id=a.nextId();return e},o.translate=function(e,s,h){for(var i=h?o.allBodies(e):e.bodies,l=0;l<i.length;l++)r.translate(i[l],s);return e},o.rotate=function(e,s,h,i){for(var l=Math.cos(s),u=Math.sin(s),d=i?o.allBodies(e):e.bodies,f=0;f<d.length;f++){var v=d[f],m=v.position.x-h.x,y=v.position.y-h.y;r.setPosition(v,{x:h.x+(m*l-y*u),y:h.y+(m*u+y*l)}),r.rotate(v,s)}return e},o.scale=function(e,s,h,i,l){for(var u=l?o.allBodies(e):e.bodies,d=0;d<u.length;d++){var f=u[d],v=f.position.x-i.x,m=f.position.y-i.y;r.setPosition(f,{x:i.x+v*s,y:i.y+m*h}),r.scale(f,s,h)}return e},o.bounds=function(e){for(var s=o.allBodies(e),h=[],i=0;i<s.length;i+=1){var l=s[i];h.push(l.bounds.min,l.bounds.max)}return n.create(h)},o.wrap=function(e,s){var h=n.wrap(o.bounds(e),s);return h&&o.translate(e,h),h}})()},4372:(c,x,t)=>{var o={};c.exports=o;var p=t(69351);(function(){o.create=p.create,o.add=p.add,o.remove=p.remove,o.clear=p.clear,o.addComposite=p.addComposite,o.addBody=p.addBody,o.addConstraint=p.addConstraint})()},52284:(c,x,t)=>{var o={};c.exports=o;var p=t(41598),a=t(4506);(function(){var n=[],r={overlap:0,axis:null},e={overlap:0,axis:null};o.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:[null,null],supportCount:0}},o.collides=function(s,h,i){if(o._overlapAxes(r,s.vertices,h.vertices,s.axes),r.overlap<=0||(o._overlapAxes(e,h.vertices,s.vertices,h.axes),e.overlap<=0))return null;var l=i&&i.table[a.id(s,h)],u;l?u=l.collision:(u=o.create(s,h),u.collided=!0,u.bodyA=s.id<h.id?s:h,u.bodyB=s.id<h.id?h:s,u.parentA=u.bodyA.parent,u.parentB=u.bodyB.parent),s=u.bodyA,h=u.bodyB;var d;r.overlap<e.overlap?d=r:d=e;var f=u.normal,v=u.tangent,m=u.penetration,y=u.supports,g=d.overlap,T=d.axis,S=T.x,E=T.y,M=h.position.x-s.position.x,F=h.position.y-s.position.y;S*M+E*F>=0&&(S=-S,E=-E),f.x=S,f.y=E,v.x=-E,v.y=S,m.x=S*g,m.y=E*g,u.depth=g;var A=o._findSupports(s,h,f,1),P=0;if(p.contains(s.vertices,A[0])&&(y[P++]=A[0]),p.contains(s.vertices,A[1])&&(y[P++]=A[1]),P<2){var L=o._findSupports(h,s,f,-1);p.contains(h.vertices,L[0])&&(y[P++]=L[0]),P<2&&p.contains(h.vertices,L[1])&&(y[P++]=L[1])}return P===0&&(y[P++]=A[0]),u.supportCount=P,u},o._overlapAxes=function(s,h,i,l){var u=h.length,d=i.length,f=h[0].x,v=h[0].y,m=i[0].x,y=i[0].y,g=l.length,T=Number.MAX_VALUE,S=0,E,M,F,A,P,L;for(P=0;P<g;P++){var O=l[P],G=O.x,z=O.y,Y=f*G+v*z,X=m*G+y*z,I=Y,U=X;for(L=1;L<u;L+=1)A=h[L].x*G+h[L].y*z,A>I?I=A:A<Y&&(Y=A);for(L=1;L<d;L+=1)A=i[L].x*G+i[L].y*z,A>U?U=A:A<X&&(X=A);if(M=I-X,F=U-Y,E=M<F?M:F,E<T&&(T=E,S=P,E<=0))break}s.axis=l[S],s.overlap=T},o._findSupports=function(s,h,i,l){var u=h.vertices,d=u.length,f=s.position.x,v=s.position.y,m=i.x*l,y=i.y*l,g=u[0],T=g,S=m*(f-T.x)+y*(v-T.y),E,M,F;for(F=1;F<d;F+=1)T=u[F],M=m*(f-T.x)+y*(v-T.y),M<S&&(S=M,g=T);return E=u[(d+g.index-1)%d],S=m*(f-E.x)+y*(v-E.y),T=u[(g.index+1)%d],m*(f-T.x)+y*(v-T.y)<S?(n[0]=g,n[1]=T,n):(n[0]=g,n[1]=E,n)}})()},43424:c=>{var x={};
4595c.exports=x,function(){x.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(c,x,t)=>{var o={};c.exports=o;var p=t(53402),a=t(52284);(function(){o.create=function(n){var r={bodies:[],collisions:[],pairs:null};return p.extend(r,n)},o.setBodies=function(n,r){n.bodies=r.slice(0)},o.clear=function(n){n.bodies=[],n.collisions=[]},o.collisions=function(n){var r=n.pairs,e=n.bodies,s=e.length,h=o.canCollide,i=a.collides,l=n.collisions,u=0,d,f;for(e.sort(o._compareBoundsX),d=0;d<s;d++){var v=e[d],m=v.bounds,y=v.bounds.max.x,g=v.bounds.max.y,T=v.bounds.min.y,S=v.isStatic||v.isSleeping,E=v.parts.length,M=E===1;for(f=d+1;f<s;f++){var F=e[f],A=F.bounds;if(A.min.x>y)break;if(!(g<A.min.y||T>A.max.y)&&!(S&&(F.isStatic||F.isSleeping))&&h(v.collisionFilter,F.collisionFilter)){var P=F.parts.length;if(M&&P===1){var L=i(v,F,r);L&&(l[u++]=L)}else for(var O=E>1?1:0,G=P>1?1:0,z=O;z<E;z++)for(var Y=v.parts[z],m=Y.bounds,X=G;X<P;X++){var I=F.parts[X],A=I.bounds;if(!(m.min.x>A.max.x||m.max.x<A.min.x||m.max.y<A.min.y||m.min.y>A.max.y)){var L=i(Y,I,r);L&&(l[u++]=L)}}}}}return l.length!==u&&(l.length=u),l},o.canCollide=function(n,r){return n.group===r.group&&n.group!==0?n.group>0:(n.mask&r.category)!==0&&(r.mask&n.category)!==0},o._compareBoundsX=function(n,r){return n.bounds.min.x-r.bounds.min.x}})()},4506:(c,x,t)=>{var o={};c.exports=o;var p=t(43424);(function(){o.create=function(a,n){var r=a.bodyA,e=a.bodyB,s={id:o.id(r,e),bodyA:r,bodyB:e,collision:a,contacts:[p.create(),p.create()],contactCount:0,separation:0,isActive:!0,isSensor:r.isSensor||e.isSensor,timeCreated:n,timeUpdated:n,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return o.update(s,a,n),s},o.update=function(a,n,r){var e=n.supports,s=n.supportCount,h=a.contacts,i=n.parentA,l=n.parentB;a.isActive=!0,a.timeUpdated=r,a.collision=n,a.separation=n.depth,a.inverseMass=i.inverseMass+l.inverseMass,a.friction=i.friction<l.friction?i.friction:l.friction,a.frictionStatic=i.frictionStatic>l.frictionStatic?i.frictionStatic:l.frictionStatic,a.restitution=i.restitution>l.restitution?i.restitution:l.restitution,a.slop=i.slop>l.slop?i.slop:l.slop,a.contactCount=s,n.pair=a;var u=e[0],d=h[0],f=e[1],v=h[1];(v.vertex===u||d.vertex===f)&&(h[1]=d,h[0]=d=v,v=h[1]),d.vertex=u,v.vertex=f},o.setActive=function(a,n,r){n?(a.isActive=!0,a.timeUpdated=r):(a.isActive=!1,a.contactCount=0)},o.id=function(a,n){return a.id<n.id?a.id.toString(36)+":"+n.id.toString(36):n.id.toString(36)+":"+a.id.toString(36)}})()},99561:(c,x,t)=>{var o={};c.exports=o;var p=t(4506),a=t(53402);(function(){o.create=function(n){return a.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},n)},o.update=function(n,r,e){var s=p.update,h=p.create,i=p.setActive,l=n.table,u=n.list,d=u.length,f=d,v=n.collisionStart,m=n.collisionEnd,y=n.collisionActive,g=r.length,T=0,S=0,E=0,M,F,A;for(A=0;A<g;A++)M=r[A],F=M.pair,F?(F.isActive&&(y[E++]=F),s(F,M,e)):(F=h(M,e),l[F.id]=F,v[T++]=F,u[f++]=F);for(f=0,d=u.length,A=0;A<d;A++)F=u[A],F.timeUpdated>=e?u[f++]=F:(i(F,!1,e),F.collision.bodyA.sleepCounter>0&&F.collision.bodyB.sleepCounter>0?u[f++]=F:(m[S++]=F,delete l[F.id]));u.length!==f&&(u.length=f),v.length!==T&&(v.length=T),m.length!==S&&(m.length=S),y.length!==E&&(y.length=E)},o.clear=function(n){return n.table={},n.list.length=0,n.collisionStart.length=0,n.collisionActive.length=0,n.collisionEnd.length=0,n}})()},73296:(c,x,t)=>{var o={};c.exports=o;var p=t(31725),a=t(52284),n=t(15647),r=t(66280),e=t(41598);(function(){o.collides=function(s,h){for(var i=[],l=h.length,u=s.bounds,d=a.collides,f=n.overlaps,v=0;v<l;v++){var m=h[v],y=m.parts.length,g=y===1?0:1;if(s!==m&&f(m.bounds,u))for(var T=g;T<y;T++){var S=m.parts[T];if(f(S.bounds,u)){var E=d(S,s);if(E){i.push(E);break}}}}return i},o.ray=function(s,h,i,l){l=l||1e-100;for(var u=p.angle(h,i),d=p.magnitude(p.sub(h,i)),f=(i.x+h.x)*.5,v=(i.y+h.y)*.5,m=r.rectangle(f,v,d,l,{angle:u}),y=o.collides(m,s),g=0;g<y.length;g+=1){var T=y[g];T.body=T.bodyB=T.bodyA}return y},o.region=function(s,h,i){for(var l=[],u=0;u<s.length;u++){var d=s[u],f=n.overlaps(d.bounds,h);(f&&!i||!f&&i)&&l.push(d)}return l},o.point=function(s,h){for(var i=[],l=0;l<s.length;l++){var u=s[l];if(n.contains(u.bounds,h))for(var d=u.parts.length===1?0:1;d<u.parts.length;d++){var f=u.parts[d];if(n.contains(f.bounds,h)&&e.contains(f.vertices,h)){i.push(u);break}}}return i}})()},66272:(c,x,t)=>{var o={};c.exports=o;var p=t(41598),a=t(53402),n=t(15647);(function(){o._restingThresh=2,o._restingThreshTangent=Math.sqrt(6),o._positionDampen=.9,o._positionWarming=.8,o._frictionNormalMultiplier=5,o._frictionMaxStatic=Number.MAX_VALUE,o.preSolvePosition=function(r){var e,s,h,i=r.length;for(e=0;e<i;e++)s=r[e],s.isActive&&(h=s.contactCount,s.collision.parentA.totalContacts+=h,s.collision.parentB.totalContacts+=h)},o.solvePosition=function(r,e,s){var h,i,l,u,d,f,v,m,y=o._positionDampen*(s||1),g=a.clamp(e/a._baseDelta,0,1),T=r.length;for(h=0;h<T;h++)i=r[h],!(!i.isActive||i.isSensor)&&(l=i.collision,u=l.parentA,d=l.parentB,f=l.normal,i.separation=l.depth+f.x*(d.positionImpulse.x-u.positionImpulse.x)+f.y*(d.positionImpulse.y-u.positionImpulse.y));for(h=0;h<T;h++)i=r[h],!(!i.isActive||i.isSensor)&&(l=i.collision,u=l.parentA,d=l.parentB,f=l.normal,m=i.separation-i.slop*g,(u.isStatic||d.isStatic)&&(m*=2),u.isStatic||u.isSleeping||(v=y/u.totalContacts,u.positionImpulse.x+=f.x*m*v,u.positionImpulse.y+=f.y*m*v),d.isStatic||d.isSleeping||(v=y/d.totalContacts,d.positionImpulse.x-=f.x*m*v,d.positionImpulse.y-=f.y*m*v))},o.postSolvePosition=function(r){for(var e=o._positionWarming,s=r.length,h=p.translate,i=n.update,l=0;l<s;l++){var u=r[l],d=u.positionImpulse,f=d.x,v=d.y,m=u.velocity;if(u.totalContacts=0,f!==0||v!==0){for(var y=0;y<u.parts.length;y++){var g=u.parts[y];h(g.vertices,d),i(g.bounds,g.vertices,m),g.position.x+=f,g.position.y+=v}u.positionPrev.x+=f,u.positionPrev.y+=v,f*m.x+v*m.y<0?(d.x=0,d.y=0):(d.x*=e,d.y*=e)}}},o.preSolveVelocity=function(r){var e=r.length,s,h;for(s=0;s<e;s++){var i=r[s];if(!(!i.isActive||i.isSensor)){var l=i.contacts,u=i.contactCount,d=i.collision,f=d.parentA,v=d.parentB,m=d.normal,y=d.tangent;for(h=0;h<u;h++){var g=l[h],T=g.vertex,S=g.normalImpulse,E=g.tangentImpulse;if(S!==0||E!==0){var M=m.x*S+y.x*E,F=m.y*S+y.y*E;f.isStatic||f.isSleeping||(f.positionPrev.x+=M*f.inverseMass,f.positionPrev.y+=F*f.inverseMass,f.anglePrev+=f.inverseInertia*((T.x-f.position.x)*F-(T.y-f.position.y)*M)),v.isStatic||v.isSleeping||(v.positionPrev.x-=M*v.inverseMass,v.positionPrev.y-=F*v.inverseMass,v.anglePrev-=v.inverseInertia*((T.x-v.position.x)*F-(T.y-v.position.y)*M))}}}}},o.solveVelocity=function(r,e){var s=e/a._baseDelta,h=s*s,i=h*s,l=-o._restingThresh*s,u=o._restingThreshTangent,d=o._frictionNormalMultiplier*s,f=o._frictionMaxStatic,v=r.length,m,y,g,T;for(g=0;g<v;g++){var S=r[g];if(!(!S.isActive||S.isSensor)){var E=S.collision,M=E.parentA,F=E.parentB,A=E.normal.x,P=E.normal.y,L=E.tangent.x,O=E.tangent.y,G=S.inverseMass,z=S.friction*S.frictionStatic*d,Y=S.contacts,X=S.contactCount,I=1/X,U=M.position.x-M.positionPrev.x,D=M.position.y-M.positionPrev.y,V=M.angle-M.anglePrev,B=F.position.x-F.positionPrev.x,W=F.position.y-F.positionPrev.y,K=F.angle-F.anglePrev;for(T=0;T<X;T++){var J=Y[T],Z=J.vertex,j=Z.x-M.position.x,k=Z.y-M.position.y,_=Z.x-F.position.x,q=Z.y-F.position.y,et=U-k*V,nt=D+j*V,tt=B-q*K,ot=W+_*K,ht=et-tt,lt=nt-ot,it=A*ht+P*lt,rt
4595=L*ht+O*lt,at=S.separation+it,ct=Math.min(at,1);ct=at<0?0:ct;var Tt=ct*z;rt<-Tt||rt>Tt?(y=rt>0?rt:-rt,m=S.friction*(rt>0?1:-1)*i,m<-y?m=-y:m>y&&(m=y)):(m=rt,y=f);var Mt=j*P-k*A,mt=_*P-q*A,gt=I/(G+M.inverseInertia*Mt*Mt+F.inverseInertia*mt*mt),Rt=(1+S.restitution)*it*gt;if(m*=gt,it<l)J.normalImpulse=0;else{var Bt=J.normalImpulse;J.normalImpulse+=Rt,J.normalImpulse>0&&(J.normalImpulse=0),Rt=J.normalImpulse-Bt}if(rt<-u||rt>u)J.tangentImpulse=0;else{var Ct=J.tangentImpulse;J.tangentImpulse+=m,J.tangentImpulse<-y&&(J.tangentImpulse=-y),J.tangentImpulse>y&&(J.tangentImpulse=y),m=J.tangentImpulse-Ct}var wt=A*Rt+L*m,Lt=P*Rt+O*m;M.isStatic||M.isSleeping||(M.positionPrev.x+=wt*M.inverseMass,M.positionPrev.y+=Lt*M.inverseMass,M.anglePrev+=(j*Lt-k*wt)*M.inverseInertia),F.isStatic||F.isSleeping||(F.positionPrev.x-=wt*F.inverseMass,F.positionPrev.y-=Lt*F.inverseMass,F.anglePrev-=(_*Lt-q*wt)*F.inverseInertia)}}}}})()},48140:(c,x,t)=>{var o={};c.exports=o;var p=t(41598),a=t(31725),n=t(53614),r=t(15647),e=t(66615),s=t(53402);(function(){o._warming=.4,o._torqueDampen=1,o._minLength=1e-6,o.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 l=i.bodyA?a.add(i.bodyA.position,i.pointA):i.pointA,u=i.bodyB?a.add(i.bodyB.position,i.pointB):i.pointB,d=a.magnitude(a.sub(l,u));i.length=typeof i.length<"u"?i.length:d,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 f={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?(f.type="pin",f.anchors=!1):i.stiffness<.9&&(f.type="spring"),i.render=s.extend(f,i.render),i},o.preSolveAll=function(h){for(var i=0;i<h.length;i+=1){var l=h[i],u=l.constraintImpulse;l.isStatic||u.x===0&&u.y===0&&u.angle===0||(l.position.x+=u.x,l.position.y+=u.y,l.angle+=u.angle)}},o.solveAll=function(h,i){for(var l=s.clamp(i/s._baseDelta,0,1),u=0;u<h.length;u+=1){var d=h[u],f=!d.bodyA||d.bodyA&&d.bodyA.isStatic,v=!d.bodyB||d.bodyB&&d.bodyB.isStatic;(f||v)&&o.solve(h[u],l)}for(u=0;u<h.length;u+=1)d=h[u],f=!d.bodyA||d.bodyA&&d.bodyA.isStatic,v=!d.bodyB||d.bodyB&&d.bodyB.isStatic,!f&&!v&&o.solve(h[u],l)},o.solve=function(h,i){var l=h.bodyA,u=h.bodyB,d=h.pointA,f=h.pointB;if(!(!l&&!u)){l&&!l.isStatic&&(a.rotate(d,l.angle-h.angleA,d),h.angleA=l.angle),u&&!u.isStatic&&(a.rotate(f,u.angle-h.angleB,f),h.angleB=u.angle);var v=d,m=f;if(l&&(v=a.add(l.position,d)),u&&(m=a.add(u.position,f)),!(!v||!m)){var y=a.sub(v,m),g=a.magnitude(y);g<o._minLength&&(g=o._minLength);var T=(g-h.length)/g,S=h.stiffness>=1||h.length===0,E=S?h.stiffness*i:h.stiffness*i*i,M=h.damping*i,F=a.mult(y,T*E),A=(l?l.inverseMass:0)+(u?u.inverseMass:0),P=(l?l.inverseInertia:0)+(u?u.inverseInertia:0),L=A+P,O,G,z,Y,X;if(M>0){var I=a.create();z=a.div(y,g),X=a.sub(u&&a.sub(u.position,u.positionPrev)||I,l&&a.sub(l.position,l.positionPrev)||I),Y=a.dot(z,X)}l&&!l.isStatic&&(G=l.inverseMass/A,l.constraintImpulse.x-=F.x*G,l.constraintImpulse.y-=F.y*G,l.position.x-=F.x*G,l.position.y-=F.y*G,M>0&&(l.positionPrev.x-=M*z.x*Y*G,l.positionPrev.y-=M*z.y*Y*G),O=a.cross(d,F)/L*o._torqueDampen*l.inverseInertia*(1-h.angularStiffness),l.constraintImpulse.angle-=O,l.angle-=O),u&&!u.isStatic&&(G=u.inverseMass/A,u.constraintImpulse.x+=F.x*G,u.constraintImpulse.y+=F.y*G,u.position.x+=F.x*G,u.position.y+=F.y*G,M>0&&(u.positionPrev.x+=M*z.x*Y*G,u.positionPrev.y+=M*z.y*Y*G),O=a.cross(f,F)/L*o._torqueDampen*u.inverseInertia*(1-h.angularStiffness),u.constraintImpulse.angle+=O,u.angle+=O)}}},o.postSolveAll=function(h){for(var i=0;i<h.length;i++){var l=h[i],u=l.constraintImpulse;if(!(l.isStatic||u.x===0&&u.y===0&&u.angle===0)){n.set(l,!1);for(var d=0;d<l.parts.length;d++){var f=l.parts[d];p.translate(f.vertices,u),d>0&&(f.position.x+=u.x,f.position.y+=u.y),u.angle!==0&&(p.rotate(f.vertices,u.angle,l.position),e.rotate(f.axes,u.angle),d>0&&a.rotateAbout(f.position,u.angle,l.position,f.position)),r.update(f.bounds,f.vertices,l.velocity)}u.angle*=o._warming,u.x*=o._warming,u.y*=o._warming}}},o.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)}},o.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)}},o.currentLength=function(h){var i=(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),l=(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0),u=(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),d=(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0),f=i-u,v=l-d;return Math.sqrt(f*f+v*v)}})()},53402:(c,x,t)=>{var o={};c.exports=o,function(){o._baseDelta=16.666666666666668,o._nextId=0,o._seed=0,o._nowStartTime=+new Date,o._warnedOnce={},o._decomp=null,o.extend=function(a,n){var r,e;typeof n=="boolean"?(r=2,e=n):(r=1,e=!0);for(var s=r;s<arguments.length;s++){var h=arguments[s];if(h)for(var i in h)e&&h[i]&&h[i].constructor===Object&&(!a[i]||a[i].constructor===Object)?(a[i]=a[i]||{},o.extend(a[i],e,h[i])):a[i]=h[i]}return a},o.clone=function(a,n){return o.extend({},n,a)}
4595,o.keys=function(a){if(Object.keys)return Object.keys(a);var n=[];for(var r in a)n.push(r);return n},o.values=function(a){var n=[];if(Object.keys){for(var r=Object.keys(a),e=0;e<r.length;e++)n.push(a[r[e]]);return n}for(var s in a)n.push(a[s]);return n},o.get=function(a,n,r,e){n=n.split(".").slice(r,e);for(var s=0;s<n.length;s+=1)a=a[n[s]];return a},o.set=function(a,n,r,e,s){var h=n.split(".").slice(e,s);return o.get(a,n,0,-1)[h[h.length-1]]=r,r},o.shuffle=function(a){for(var n=a.length-1;n>0;n--){var r=Math.floor(o.random()*(n+1)),e=a[n];a[n]=a[r],a[r]=e}return a},o.choose=function(a){return a[Math.floor(o.random()*a.length)]},o.isElement=function(a){return typeof HTMLElement<"u"?a instanceof HTMLElement:!!(a&&a.nodeType&&a.nodeName)},o.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"},o.isFunction=function(a){return typeof a=="function"},o.isPlainObject=function(a){return typeof a=="object"&&a.constructor===Object},o.isString=function(a){return toString.call(a)==="[object String]"},o.clamp=function(a,n,r){return a<n?n:a>r?r:a},o.sign=function(a){return a<0?-1:1},o.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-o._nowStartTime},o.random=function(a,n){return a=typeof a<"u"?a:0,n=typeof n<"u"?n:1,a+p()*(n-a)};var p=function(){return o._seed=(o._seed*9301+49297)%233280,o._seed/233280};o.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)},o.logLevel=1,o.log=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.info=function(){console&&o.logLevel>0&&o.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warn=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warnOnce=function(){var a=Array.prototype.slice.call(arguments).join(" ");o._warnedOnce[a]||(o.warn(a),o._warnedOnce[a]=!0)},o.deprecated=function(a,n,r){a[n]=o.chain(function(){o.warnOnce("🔅 deprecated 🔅",r)},a[n])},o.nextId=function(){return o._nextId++},o.indexOf=function(a,n){if(a.indexOf)return a.indexOf(n);for(var r=0;r<a.length;r++)if(a[r]===n)return r;return-1},o.map=function(a,n){if(a.map)return a.map(n);for(var r=[],e=0;e<a.length;e+=1)r.push(n(a[e]));return r},o.topologicalSort=function(a){var n=[],r=[],e=[];for(var s in a)!r[s]&&!e[s]&&o._topologicalSort(s,r,e,a,n);return n},o._topologicalSort=function(a,n,r,e,s){var h=e[a]||[];r[a]=!0;for(var i=0;i<h.length;i+=1){var l=h[i];r[l]||n[l]||o._topologicalSort(l,n,r,e,s)}r[a]=!1,n[a]=!0,s.push(a)},o.chain=function(){for(var a=[],n=0;n<arguments.length;n+=1){var r=arguments[n];r._chained?a.push.apply(a,r._chained):a.push(r)}var e=function(){for(var s,h=new Array(arguments.length),i=0,l=arguments.length;i<l;i++)h[i]=arguments[i];for(i=0;i<a.length;i+=1){var u=a[i].apply(s,h);typeof u<"u"&&(s=u)}return s};return e._chained=a,e},o.chainPathBefore=function(a,n,r){return o.set(a,n,o.chain(r,o.get(a,n)))},o.chainPathAfter=function(a,n,r){return o.set(a,n,o.chain(o.get(a,n),r))},o.setDecomp=function(a){o._decomp=a},o.getDecomp=function(){var a=o._decomp;try{!a&&typeof window<"u"&&(a=window.decomp),!a&&typeof t.g<"u"&&(a=t.g.decomp)}catch{a=null}return a}}()},48413:(c,x,t)=>{var o={};c.exports=o;var p=t(53614),a=t(66272),n=t(81388),r=t(99561),e=t(35810),s=t(69351),h=t(48140),i=t(53402),l=t(22562);(function(){o._deltaMax=16.666666666666668,o.create=function(u){u=u||{};var d={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},f=i.extend(d,u);return f.world=u.world||s.create({label:"World"}),f.pairs=u.pairs||r.create(),f.detector=u.detector||n.create(),f.detector.pairs=f.pairs,f.grid={buckets:[]},f.world.gravity=f.gravity,f.broadphase=f.grid,f.metrics={},f},o.update=function(u,d){var f=i.now(),v=u.world,m=u.detector,y=u.pairs,g=u.timing,T=g.timestamp,S;d>o._deltaMax&&i.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",o._deltaMax.toFixed(3),"ms."),d=typeof d<"u"?d:i._baseDelta,d*=g.timeScale,g.timestamp+=d,g.lastDelta=d;var E={timestamp:g.timestamp,delta:d};e.trigger(u,"beforeUpdate",E);var M=s.allBodies(v),F=s.allConstraints(v),A=s.allComposites(v);for(v.isModified&&(n.setBodies(m,M),s.setModified(v,!1,!1,!0)),u.enableSleeping&&p.update(M,d),o._bodiesApplyGravity(M,u.gravity),o.wrap(M,A),o.attractors(M),d>0&&o._bodiesUpdate(M,d),e.trigger(u,"beforeSolve",E),h.preSolveAll(M),S=0;S<u.constraintIterations;S++)h.solveAll(F,d);h.postSolveAll(M);var P=n.collisions(m);r.update(y,P,T),u.enableSleeping&&p.afterCollisions(y.list),y.collisionStart.length>0&&e.trigger(u,"collisionStart",{pairs:y.collisionStart,timestamp:g.timestamp,delta:d});var L=i.clamp(20/u.positionIterations,0,1);for(a.preSolvePosition(y.list),S=0;S<u.positionIterations;S++)a.solvePosition(y.list,d,L);for(a.postSolvePosition(M),h.preSolveAll(M),S=0;S<u.constraintIterations;S++)h.solveAll(F,d);for(h.postSolveAll(M),a.preSolveVelocity(y.list),S=0;S<u.velocityIterations;S++)a.solveVelocity(y.list,d);
4595return o._bodiesUpdateVelocities(M),y.collisionActive.length>0&&e.trigger(u,"collisionActive",{pairs:y.collisionActive,timestamp:g.timestamp,delta:d}),y.collisionEnd.length>0&&e.trigger(u,"collisionEnd",{pairs:y.collisionEnd,timestamp:g.timestamp,delta:d}),o._bodiesClearForces(M),e.trigger(u,"afterUpdate",E),u.timing.lastElapsed=i.now()-f,u},o.merge=function(u,d){if(i.extend(u,d),d.world){u.world=d.world,o.clear(u);for(var f=s.allBodies(u.world),v=0;v<f.length;v++){var m=f[v];p.set(m,!1),m.id=i.nextId()}}},o.clear=function(u){r.clear(u.pairs),n.clear(u.detector)},o._bodiesClearForces=function(u){for(var d=u.length,f=0;f<d;f++){var v=u[f];v.force.x=0,v.force.y=0,v.torque=0}},o._bodiesApplyGravity=function(u,d){var f=typeof d.scale<"u"?d.scale:.001,v=u.length;if(!(d.x===0&&d.y===0||f===0))for(var m=0;m<v;m++){var y=u[m];y.ignoreGravity||y.isStatic||y.isSleeping||(y.force.y+=y.mass*d.y*f,y.force.x+=y.mass*d.x*f)}},o._bodiesUpdate=function(u,d){for(var f=u.length,v=0;v<f;v++){var m=u[v];m.isStatic||m.isSleeping||l.update(m,d)}},o._bodiesUpdateVelocities=function(u){for(var d=u.length,f=0;f<d;f++)l.updateVelocities(u[f])},o.wrap=function(u,d){for(var f=0;f<u.length;f+=1){var v=u[f];v.wrapBounds!==null&&l.wrap(v,v.wrapBounds)}for(f=0;f<d.length;f+=1){var m=d[f];m.wrapBounds!==null&&s.wrap(m,m.wrapBounds)}},o.attractors=function(u){for(var d=0;d<u.length;d++){var f=u[d],v=f.attractors;if(v&&v.length>0)for(var m=0;m<u.length;m++){var y=u[m];if(d!==m)for(var g=0;g<v.length;g++){var T=v[g],S=T;i.isFunction(T)&&(S=T(f,y)),S&&l.applyForce(y,y.position,S)}}}}})()},35810:(c,x,t)=>{var o={};c.exports=o;var p=t(53402);(function(){o.on=function(a,n,r){for(var e=n.split(" "),s,h=0;h<e.length;h++)s=e[h],a.events=a.events||{},a.events[s]=a.events[s]||[],a.events[s].push(r);return r},o.off=function(a,n,r){if(!n){a.events={};return}typeof n=="function"&&(r=n,n=p.keys(a.events).join(" "));for(var e=n.split(" "),s=0;s<e.length;s++){var h=a.events[e[s]],i=[];if(r&&h)for(var l=0;l<h.length;l++)h[l]!==r&&i.push(h[l]);a.events[e[s]]=i}},o.trigger=function(a,n,r){var e,s,h,i,l=a.events;if(l&&p.keys(l).length>0){r||(r={}),e=n.split(" ");for(var u=0;u<e.length;u++)if(s=e[u],h=l[s],h){i=p.clone(r,!1),i.name=s,i.source=a;for(var d=0;d<h.length;d++)h[d].apply(a,[i])}}}})()},6790:(c,x,t)=>{var o={};c.exports=o;var p=t(73832),a=t(53402);(function(){o.name="matter-js",o.version="0.20.0",o.uses=[],o.used=[],o.use=function(){p.use(o,Array.prototype.slice.call(arguments))},o.before=function(n,r){return n=n.replace(/^Matter./,""),a.chainPathBefore(o,n,r)},o.after=function(n,r){return n=n.replace(/^Matter./,""),a.chainPathAfter(o,n,r)}})()},73832:(c,x,t)=>{var o={};c.exports=o;var p=t(53402);(function(){o._registry={},o.register=function(a){if(o.isPlugin(a)||p.warn("Plugin.register:",o.toString(a),"does not implement all required fields."),a.name in o._registry){var n=o._registry[a.name],r=o.versionParse(a.version).number,e=o.versionParse(n.version).number;r>e?(p.warn("Plugin.register:",o.toString(n),"was upgraded to",o.toString(a)),o._registry[a.name]=a):r<e?p.warn("Plugin.register:",o.toString(n),"can not be downgraded to",o.toString(a)):a!==n&&p.warn("Plugin.register:",o.toString(a),"is already registered to different plugin object")}else o._registry[a.name]=a;return a},o.resolve=function(a){return o._registry[o.dependencyParse(a).name]},o.toString=function(a){return typeof a=="string"?a:(a.name||"anonymous")+"@"+(a.version||a.range||"0.0.0")},o.isPlugin=function(a){return a&&a.name&&a.version&&a.install},o.isUsed=function(a,n){return a.used.indexOf(n)>-1},o.isFor=function(a,n){var r=a.for&&o.dependencyParse(a.for);return!a.for||n.name===r.name&&o.versionSatisfies(n.version,r.range)},o.use=function(a,n){if(a.uses=(a.uses||[]).concat(n||[]),a.uses.length===0){p.warn("Plugin.use:",o.toString(a),"does not specify any dependencies to install.");return}for(var r=o.dependencies(a),e=p.topologicalSort(r),s=[],h=0;h<e.length;h+=1)if(e[h]!==a.name){var i=o.resolve(e[h]);if(!i){s.push("❌ "+e[h]);continue}o.isUsed(a,i.name)||(o.isFor(i,a)||(p.warn("Plugin.use:",o.toString(i),"is for",i.for,"but installed on",o.toString(a)+"."),i._warned=!0),i.install?i.install(a):(p.warn("Plugin.use:",o.toString(i),"does not specify an install function."),i._warned=!0),i._warned?(s.push("🔶 "+o.toString(i)),delete i._warned):s.push("✅ "+o.toString(i)),a.used.push(i.name))}s.length>0&&!i.silent&&p.info(s.join("  "))},o.dependencies=function(a,n){var r=o.dependencyParse(a),e=r.name;if(n=n||{},!(e in n)){a=o.resolve(a)||a,n[e]=p.map(a.uses||[],function(h){o.isPlugin(h)&&o.register(h);var i=o.dependencyParse(h),l=o.resolve(h);return l&&!o.versionSatisfies(l.version,i.range)?(p.warn("Plugin.dependencies:",o.toString(l),"does not satisfy",o.toString(i),"used by",o.toString(r)+"."),l._warned=!0,a._warned=!0):l||(p.warn("Plugin.dependencies:",o.toString(h),"used by",o.toString(r),"could not be resolved."),a._warned=!0),i.name});for(var s=0;s<n[e].length;s+=1)o.dependencies(n[e][s],n);return n}}
4595,o.dependencyParse=function(a){if(p.isString(a)){var n=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;return n.test(a)||p.warn("Plugin.dependencyParse:",a,"is not a valid dependency string."),{name:a.split("@")[0],range:a.split("@")[1]||"*"}}return{name:a.name,range:a.range||a.version}},o.versionParse=function(a){var n=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;n.test(a)||p.warn("Plugin.versionParse:",a,"is not a valid version or range.");var r=n.exec(a),e=Number(r[4]),s=Number(r[5]),h=Number(r[6]);return{isRange:!!(r[1]||r[2]),version:r[3],range:a,operator:r[1]||r[2]||"",major:e,minor:s,patch:h,parts:[e,s,h],prerelease:r[7],number:e*1e8+s*1e4+h}},o.versionSatisfies=function(a,n){n=n||"*";var r=o.versionParse(n),e=o.versionParse(a);if(r.isRange){if(r.operator==="*"||a==="*")return!0;if(r.operator===">")return e.number>r.number;if(r.operator===">=")return e.number>=r.number;if(r.operator==="~")return e.major===r.major&&e.minor===r.minor&&e.patch>=r.patch;if(r.operator==="^")return r.major>0?e.major===r.major&&e.number>=r.number:r.minor>0?e.minor===r.minor&&e.patch>=r.patch:e.patch===r.patch}return a===n||a==="*"}})()},13037:(c,x,t)=>{var o={};c.exports=o;var p=t(35810),a=t(48413),n=t(53402);(function(){o._maxFrameDelta=66.66666666666667,o._frameDeltaFallback=16.666666666666668,o._timeBufferMargin=1.5,o._elapsedNextEstimate=1,o._smoothingLowerBound=.1,o._smoothingUpperBound=.9,o.create=function(e){var s={delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},h=n.extend(s,e);return h.fps=0,h},o.run=function(e,s){return e.timeBuffer=o._frameDeltaFallback,function h(i){e.frameRequestId=o._onNextFrame(e,h),i&&e.enabled&&o.tick(e,s,i)}(),e},o.tick=function(e,s,h){var i=n.now(),l=e.delta,u=0,d=h-e.timeLastTick;if((!d||!e.timeLastTick||d>Math.max(o._maxFrameDelta,e.maxFrameTime))&&(d=e.frameDelta||o._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(d),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var f=e.frameDeltaHistory.slice(0).sort(),v=e.frameDeltaHistory.slice(f.length*o._smoothingLowerBound,f.length*o._smoothingUpperBound),m=r(v);d=m||d}e.frameDeltaSnapping&&(d=1e3/Math.round(1e3/d)),e.frameDelta=d,e.timeLastTick=h,e.timeBuffer+=e.frameDelta,e.timeBuffer=n.clamp(e.timeBuffer,0,e.frameDelta+l*o._timeBufferMargin),e.lastUpdatesDeferred=0;var y=e.maxUpdates||Math.ceil(e.maxFrameTime/l),g={timestamp:s.timing.timestamp};p.trigger(e,"beforeTick",g),p.trigger(e,"tick",g);for(var T=n.now();l>0&&e.timeBuffer>=l*o._timeBufferMargin;){p.trigger(e,"beforeUpdate",g),a.update(s,l),p.trigger(e,"afterUpdate",g),e.timeBuffer-=l,u+=1;var S=n.now()-i,E=n.now()-T,M=S+o._elapsedNextEstimate*E/u;if(u>=y||M>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/l-o._timeBufferMargin));break}}s.timing.lastUpdatesPerFrame=u,p.trigger(e,"afterTick",g),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/l)>y?n.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&n.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof e.isFixed<"u"&&n.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&n.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),e.fps!==0&&n.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},o.stop=function(e){o._cancelNextFrame(e)},o._onNextFrame=function(e,s){if(typeof window<"u"&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(s);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},o._cancelNextFrame=function(e){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var r=function(e){for(var s=0,h=e.length,i=0;i<h;i+=1)s+=e[i];return s/h||0};o._mean=r})()},53614:(c,x,t)=>{var o={};c.exports=o;var p=t(22562),a=t(35810),n=t(53402);(function(){o._motionWakeThreshold=.18,o._motionSleepThreshold=.08,o._minBias=.9,o.update=function(r,e){for(var s=e/n._baseDelta,h=o._motionSleepThreshold,i=0;i<r.length;i++){var l=r[i],u=p.getSpeed(l),d=p.getAngularSpeed(l),f=u*u+d*d;if(l.force.x!==0||l.force.y!==0){o.set(l,!1);continue}var v=Math.min(l.motion,f),m=Math.max(l.motion,f);l.motion=o._minBias*v+(1-o._minBias)*m,l.sleepThreshold>0&&l.motion<h?(l.sleepCounter+=1,l.sleepCounter>=l.sleepThreshold/s&&o.set(l,!0)):l.sleepCounter>0&&(l.sleepCounter-=1)}},o.afterCollisions=function(r){for(var e=o._motionSleepThreshold,s=0;s<r.length;s++){var h=r[s];if(h.isActive){var i=h.collision,l=i.bodyA.parent,u=i.bodyB.parent;if(!(l.isSleeping&&u.isSleeping||l.isStatic||u.isStatic)&&(l.isSleeping||u.isSleeping)){var d=l.isSleeping&&!l.isStatic?l:u,f=d===l?u:l;!d.isStatic&&f.motion>e&&o.set(d,!1)}}}},o.set=function(r,e){var s=r.isSleeping;e?(r.isSleeping=!0,r.sleepCounter=r.sleepThreshold,r.positionImpulse.x=0,r.positionImpulse.y=0,r.positionPrev.x=r.position.x,r.positionPrev.y=r.position.y,r.anglePrev=r.angle,r.speed=0,r.angularSpeed=0,r.motion=0,s||a.trigger(r,"sleepStart")):(r.isSleeping=!1,r.sleepCounter=0,s&&a.trigger(r,"sleepEnd"))}})()},66280:(c,x,t)=>{var o={};c.exports=o;var p=t(41598),a=t(53402),n=t(22562),r=t(15647),e=t(31725);(function(){o.rectangle=function(s,h,i,l,u){u=u||{};var d={label:"Rectangle Body",position:{x:s,y:h},vertices:p.fromPath("L 0 0 L "+i+" 0 L "+i+" "+l+" L 0 "+l)};if(u.chamfer){var f=u.chamfer;
4595d.vertices=p.chamfer(d.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete u.chamfer}return n.create(a.extend({},d,u))},o.trapezoid=function(s,h,i,l,u,d){d=d||{},u>=1&&a.warn("Bodies.trapezoid: slope parameter must be < 1."),u*=.5;var f=(1-u*2)*i,v=i*u,m=v+f,y=m+v,g;u<.5?g="L 0 0 L "+v+" "+-l+" L "+m+" "+-l+" L "+y+" 0":g="L 0 0 L "+m+" "+-l+" L "+y+" 0";var T={label:"Trapezoid Body",position:{x:s,y:h},vertices:p.fromPath(g)};if(d.chamfer){var S=d.chamfer;T.vertices=p.chamfer(T.vertices,S.radius,S.quality,S.qualityMin,S.qualityMax),delete d.chamfer}return n.create(a.extend({},T,d))},o.circle=function(s,h,i,l,u){l=l||{};var d={label:"Circle Body",circleRadius:i};u=u||25;var f=Math.ceil(Math.max(10,Math.min(u,i)));return f%2===1&&(f+=1),o.polygon(s,h,f,i,a.extend({},d,l))},o.polygon=function(s,h,i,l,u){if(u=u||{},i<3)return o.circle(s,h,l,u);for(var d=2*Math.PI/i,f="",v=d*.5,m=0;m<i;m+=1){var y=v+m*d,g=Math.cos(y)*l,T=Math.sin(y)*l;f+="L "+g.toFixed(3)+" "+T.toFixed(3)+" "}var S={label:"Polygon Body",position:{x:s,y:h},vertices:p.fromPath(f)};if(u.chamfer){var E=u.chamfer;S.vertices=p.chamfer(S.vertices,E.radius,E.quality,E.qualityMin,E.qualityMax),delete u.chamfer}return n.create(a.extend({},S,u))},o.fromVertices=function(s,h,i,l,u,d,f,v){var m=a.getDecomp(),y,g,T,S,E,M,F,A,P,L,O;for(y=!!(m&&m.quickDecomp),l=l||{},T=[],u=typeof u<"u"?u:!1,d=typeof d<"u"?d:.01,f=typeof f<"u"?f:10,v=typeof v<"u"?v:.01,a.isArray(i[0])||(i=[i]),L=0;L<i.length;L+=1)if(M=i[L],S=p.isConvex(M),E=!S,E&&!y&&a.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),S||!y)S?M=p.clockwiseSort(M):M=p.hull(M),T.push({position:{x:s,y:h},vertices:M});else{var G=M.map(function(J){return[J.x,J.y]});m.makeCCW(G),d!==!1&&m.removeCollinearPoints(G,d),v!==!1&&m.removeDuplicatePoints&&m.removeDuplicatePoints(G,v);var z=m.quickDecomp(G);for(F=0;F<z.length;F++){var Y=z[F],X=Y.map(function(J){return{x:J[0],y:J[1]}});f>0&&p.area(X)<f||T.push({position:p.centre(X),vertices:X})}}for(F=0;F<T.length;F++)T[F]=n.create(a.extend(T[F],l));if(u){var I=5;for(F=0;F<T.length;F++){var U=T[F];for(A=F+1;A<T.length;A++){var D=T[A];if(r.overlaps(U.bounds,D.bounds)){var V=U.vertices,B=D.vertices;for(P=0;P<U.vertices.length;P++)for(O=0;O<D.vertices.length;O++){var W=e.magnitudeSquared(e.sub(V[(P+1)%V.length],B[O])),K=e.magnitudeSquared(e.sub(V[P],B[(O+1)%B.length]));W<I&&K<I&&(V[P].isInternal=!0,B[O].isInternal=!0)}}}}}return T.length>1?(g=n.create(a.extend({parts:T.slice(0)},l)),n.setPosition(g,{x:s,y:h}),g):T[0]},o.flagCoincidentParts=function(s,h){h===void 0&&(h=5);for(var i=0;i<s.length;i++)for(var l=s[i],u=i+1;u<s.length;u++){var d=s[u];if(r.overlaps(l.bounds,d.bounds))for(var f=l.vertices,v=d.vertices,m=0;m<l.vertices.length;m++)for(var y=0;y<d.vertices.length;y++){var g=e.magnitudeSquared(e.sub(f[(m+1)%f.length],v[y])),T=e.magnitudeSquared(e.sub(f[m],v[(y+1)%v.length]));g<h&&T<h&&(f[m].isInternal=!0,v[y].isInternal=!0)}}return s}})()},74116:(c,x,t)=>{var o={};c.exports=o;var p=t(69351),a=t(48140),n=t(53402),r=t(22562),e=t(66280);(function(){o.stack=function(s,h,i,l,u,d,f){for(var v=p.create({label:"Stack"}),m=s,y=h,g,T=0,S=0;S<l;S++){for(var E=0,M=0;M<i;M++){var F=f(m,y,M,S,g,T);if(F){var A=F.bounds.max.y-F.bounds.min.y,P=F.bounds.max.x-F.bounds.min.x;A>E&&(E=A),r.translate(F,{x:P*.5,y:A*.5}),m=F.bounds.max.x+u,p.addBody(v,F),g=F,T+=1}else m+=u}y+=E+d,m=s}return v},o.chain=function(s,h,i,l,u,d){for(var f=s.bodies,v=1;v<f.length;v++){var m=f[v-1],y=f[v],g=m.bounds.max.y-m.bounds.min.y,T=m.bounds.max.x-m.bounds.min.x,S=y.bounds.max.y-y.bounds.min.y,E=y.bounds.max.x-y.bounds.min.x,M={bodyA:m,pointA:{x:T*h,y:g*i},bodyB:y,pointB:{x:E*l,y:S*u}},F=n.extend(M,d);p.addConstraint(s,a.create(F))}return s.label+=" Chain",s},o.mesh=function(s,h,i,l,u){var d=s.bodies,f,v,m,y,g;for(f=0;f<i;f++){for(v=1;v<h;v++)m=d[v-1+f*h],y=d[v+f*h],p.addConstraint(s,a.create(n.extend({bodyA:m,bodyB:y},u)));if(f>0)for(v=0;v<h;v++)m=d[v+(f-1)*h],y=d[v+f*h],p.addConstraint(s,a.create(n.extend({bodyA:m,bodyB:y},u))),l&&v>0&&(g=d[v-1+(f-1)*h],p.addConstraint(s,a.create(n.extend({bodyA:g,bodyB:y},u)))),l&&v<h-1&&(g=d[v+1+(f-1)*h],p.addConstraint(s,a.create(n.extend({bodyA:g,bodyB:y},u))))}return s.label+=" Mesh",s},o.pyramid=function(s,h,i,l,u,d,f){return o.stack(s,h,i,l,u,d,function(v,m,y,g,T,S){var E=Math.min(l,Math.ceil(i/2)),M=T?T.bounds.max.x-T.bounds.min.x:0;if(!(g>E)){g=E-g;var F=g,A=i-1-g;if(!(y<F||y>A)){S===1&&r.translate(T,{x:(y+(i%2===1?1:-1))*M,y:0}
4595);var P=T?y*M:0;return f(s+P+y*u,m,y,g,T,S)}}})},o.newtonsCradle=function(s,h,i,l,u){for(var d=p.create({label:"Newtons Cradle"}),f=0;f<i;f++){var v=1.9,m=e.circle(s+f*(l*v),h+u,l,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),y=a.create({pointA:{x:s+f*(l*v),y:h},bodyB:m});p.addBody(d,m),p.addConstraint(d,y)}return d},o.car=function(s,h,i,l,u){var d=r.nextGroup(!0),f=20,v=-i*.5+f,m=i*.5-f,y=0,g=p.create({label:"Car"}),T=e.rectangle(s,h,i,l,{collisionFilter:{group:d},chamfer:{radius:l*.5},density:2e-4}),S=e.circle(s+v,h+y,u,{collisionFilter:{group:d},friction:.8}),E=e.circle(s+m,h+y,u,{collisionFilter:{group:d},friction:.8}),M=a.create({bodyB:T,pointB:{x:v,y},bodyA:S,stiffness:1,length:0}),F=a.create({bodyB:T,pointB:{x:m,y},bodyA:E,stiffness:1,length:0});return p.addBody(g,T),p.addBody(g,S),p.addBody(g,E),p.addConstraint(g,M),p.addConstraint(g,F),g},o.softBody=function(s,h,i,l,u,d,f,v,m,y){m=n.extend({inertia:1/0},m),y=n.extend({stiffness:.2,render:{type:"line",anchors:!1}},y);var g=o.stack(s,h,i,l,u,d,function(T,S){return e.circle(T,S,v,m)});return o.mesh(g,i,l,f,y),g.label="Soft Body",g}})()},66615:(c,x,t)=>{var o={};c.exports=o;var p=t(31725),a=t(53402);(function(){o.fromVertices=function(n){for(var r={},e=0;e<n.length;e++){var s=(e+1)%n.length,h=p.normalise({x:n[s].y-n[e].y,y:n[e].x-n[s].x}),i=h.y===0?1/0:h.x/h.y;i=i.toFixed(3).toString(),r[i]=h}return a.values(r)},o.rotate=function(n,r){if(r!==0)for(var e=Math.cos(r),s=Math.sin(r),h=0;h<n.length;h++){var i=n[h],l;l=i.x*e-i.y*s,i.y=i.x*s+i.y*e,i.x=l}}})()},15647:c=>{var x={};c.exports=x,function(){x.create=function(t){var o={min:{x:0,y:0},max:{x:0,y:0}};return t&&x.update(o,t),o},x.update=function(t,o,p){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var a=0;a<o.length;a++){var n=o[a];n.x>t.max.x&&(t.max.x=n.x),n.x<t.min.x&&(t.min.x=n.x),n.y>t.max.y&&(t.max.y=n.y),n.y<t.min.y&&(t.min.y=n.y)}p&&(p.x>0?t.max.x+=p.x:t.min.x+=p.x,p.y>0?t.max.y+=p.y:t.min.y+=p.y)},x.contains=function(t,o){return o.x>=t.min.x&&o.x<=t.max.x&&o.y>=t.min.y&&o.y<=t.max.y},x.overlaps=function(t,o){return t.min.x<=o.max.x&&t.max.x>=o.min.x&&t.max.y>=o.min.y&&t.min.y<=o.max.y},x.translate=function(t,o){t.min.x+=o.x,t.max.x+=o.x,t.min.y+=o.y,t.max.y+=o.y},x.shift=function(t,o){var p=t.max.x-t.min.x,a=t.max.y-t.min.y;t.min.x=o.x,t.max.x=o.x+p,t.min.y=o.y,t.max.y=o.y+a},x.wrap=function(t,o,p){var a=null,n=null;if(typeof o.min.x<"u"&&typeof o.max.x<"u"&&(t.min.x>o.max.x?a=o.min.x-t.max.x:t.max.x<o.min.x&&(a=o.max.x-t.min.x)),typeof o.min.y<"u"&&typeof o.max.y<"u"&&(t.min.y>o.max.y?n=o.min.y-t.max.y:t.max.y<o.min.y&&(n=o.max.y-t.min.y)),a!==null||n!==null)return{x:a||0,y:n||0}}}()},74058:(c,x,t)=>{var o={};c.exports=o,t(15647);var p=t(53402);(function(){o.pathToVertices=function(a,n){typeof window<"u"&&!("SVGPathSeg"in window)&&p.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var r,e,s,h,i,l,u,d,f,v,m=[],y,g,T=0,S=0,E=0;n=n||15;var M=function(A,P,L){var O=L%2===1&&L>1;if(!f||A!=f.x||P!=f.y){f&&O?(y=f.x,g=f.y):(y=0,g=0);var G={x:y+A,y:g+P};(O||!f)&&(f=G),m.push(G),S=y+A,E=g+P}},F=function(A){var P=A.pathSegTypeAsLetter.toUpperCase();if(P!=="Z"){switch(P){case"M":case"L":case"T":case"C":case"S":case"Q":S=A.x,E=A.y;break;case"H":S=A.x;break;case"V":E=A.y;break}M(S,E,A.pathSegType)}};for(o._svgPathToAbsolute(a),s=a.getTotalLength(),l=[],r=0;r<a.pathSegList.numberOfItems;r+=1)l.push(a.pathSegList.getItem(r));for(u=l.concat();T<s;){if(v=a.getPathSegAtLength(T),i=l[v],i!=d){for(;u.length&&u[0]!=i;)F(u.shift());d=i}switch(i.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":h=a.getPointAtLength(T),M(h.x,h.y,0);break}T+=n}for(r=0,e=u.length;r<e;++r)F(u[r]);return m},o._svgPathToAbsolute=function(a){for(var n,r,e,s,h,i,l=a.pathSegList,u=0,d=0,f=l.numberOfItems,v=0;v<f;++v){var m=l.getItem(v),y=m.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(y))"x"in m&&(u=m.x),"y"in m&&(d=m.y);else switch("x1"in m&&(e=u+m.x1),"x2"in m&&(h=u+m.x2),"y1"in m&&(s=d+m.y1),"y2"in m&&(i=d+m.y2),"x"in m&&(u+=m.x),"y"in m&&(d+=m.y),y){case"m":l.replaceItem(a.createSVGPathSegMovetoAbs(u,d),v);break;case"l":l.replaceItem(a.createSVGPathSegLinetoAbs(u,d),v);break;case"h":l.replaceItem(a.createSVGPathSegLinetoHorizontalAbs(u),v);break;case"v":l.replaceItem(a.createSVGPathSegLinetoVerticalAbs(d),v);break;case"c":l.replaceItem(a.createSVGPathSegCurvetoCubicAbs(u,d,e,s,h,i),v);break;case"s":l.replaceItem(a.createSVGPathSegCurvetoCubicSmoothAbs(u,d,h,i),v);break;case"q":l.replaceItem(a.createSVGPathSegCurvetoQuadraticAbs(u,d,e,s),v);break;case"t":l.replaceItem(a.createSVGPathSegCurvetoQuadraticSmoothAbs(u,d),v);break;case"a":l.replaceItem(a.createSVGPathSegArcAbs(u,d,m.r1,m.r2,m.angle,m.largeArcFlag,m.sweepFlag),v);break;case"z":case"Z":u=n,d=r;break}(y=="M"||y=="m")&&(n=u,r=d)}}})()},31725:c=>{var x={};c.exports=x,function(){x.create=function(t,o){return{x:t||0,y:o||0}},x.clone=function(t){return{x:t.x,y:t.y}},x.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},x.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},x.rotate=function(t,o,p){var a=Math.cos(o),n=Math.sin(o);p||(p={});var r=t.x*a-t.y*n;return p.y=t.x*n+t.y*a,p.x=r,p}
4595,x.rotateAbout=function(t,o,p,a){var n=Math.cos(o),r=Math.sin(o);a||(a={});var e=p.x+((t.x-p.x)*n-(t.y-p.y)*r);return a.y=p.y+((t.x-p.x)*r+(t.y-p.y)*n),a.x=e,a},x.normalise=function(t){var o=x.magnitude(t);return o===0?{x:0,y:0}:{x:t.x/o,y:t.y/o}},x.dot=function(t,o){return t.x*o.x+t.y*o.y},x.cross=function(t,o){return t.x*o.y-t.y*o.x},x.cross3=function(t,o,p){return(o.x-t.x)*(p.y-t.y)-(o.y-t.y)*(p.x-t.x)},x.add=function(t,o,p){return p||(p={}),p.x=t.x+o.x,p.y=t.y+o.y,p},x.sub=function(t,o,p){return p||(p={}),p.x=t.x-o.x,p.y=t.y-o.y,p},x.mult=function(t,o){return{x:t.x*o,y:t.y*o}},x.div=function(t,o){return{x:t.x/o,y:t.y/o}},x.perp=function(t,o){return o=o===!0?-1:1,{x:o*-t.y,y:o*t.x}},x.neg=function(t){return{x:-t.x,y:-t.y}},x.angle=function(t,o){return Math.atan2(o.y-t.y,o.x-t.x)},x._temp=[x.create(),x.create(),x.create(),x.create(),x.create(),x.create()]}()},41598:(c,x,t)=>{var o={};c.exports=o;var p=t(31725),a=t(53402);(function(){o.create=function(n,r){for(var e=[],s=0;s<n.length;s++){var h=n[s],i={x:h.x,y:h.y,index:s,body:r,isInternal:!1};e.push(i)}return e},o.fromPath=function(n,r){var e=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,s=[];return n.replace(e,function(h,i,l){s.push({x:parseFloat(i),y:parseFloat(l)})}),o.create(s,r)},o.centre=function(n){for(var r=o.area(n,!0),e={x:0,y:0},s,h,i,l=0;l<n.length;l++)i=(l+1)%n.length,s=p.cross(n[l],n[i]),h=p.mult(p.add(n[l],n[i]),s),e=p.add(e,h);return p.div(e,6*r)},o.mean=function(n){for(var r={x:0,y:0},e=0;e<n.length;e++)r.x+=n[e].x,r.y+=n[e].y;return p.div(r,n.length)},o.area=function(n,r){for(var e=0,s=n.length-1,h=0;h<n.length;h++)e+=(n[s].x-n[h].x)*(n[s].y+n[h].y),s=h;return r?e/2:Math.abs(e)/2},o.inertia=function(n,r){for(var e=0,s=0,h=n,i,l,u=0;u<h.length;u++)l=(u+1)%h.length,i=Math.abs(p.cross(h[l],h[u])),e+=i*(p.dot(h[l],h[l])+p.dot(h[l],h[u])+p.dot(h[u],h[u])),s+=i;return r/6*(e/s)},o.translate=function(n,r,e){e=typeof e<"u"?e:1;var s=n.length,h=r.x*e,i=r.y*e,l;for(l=0;l<s;l++)n[l].x+=h,n[l].y+=i;return n},o.rotate=function(n,r,e){if(r!==0){var s=Math.cos(r),h=Math.sin(r),i=e.x,l=e.y,u=n.length,d,f,v,m;for(m=0;m<u;m++)d=n[m],f=d.x-i,v=d.y-l,d.x=i+(f*s-v*h),d.y=l+(f*h+v*s);return n}},o.contains=function(n,r){for(var e=r.x,s=r.y,h=n.length,i=n[h-1],l,u=0;u<h;u++){if(l=n[u],(e-i.x)*(l.y-i.y)+(s-i.y)*(i.x-l.x)>0)return!1;i=l}return!0},o.scale=function(n,r,e,s){if(r===1&&e===1)return n;s=s||o.centre(n);for(var h,i,l=0;l<n.length;l++)h=n[l],i=p.sub(h,s),n[l].x=s.x+i.x*r,n[l].y=s.y+i.y*e;return n},o.chamfer=function(n,r,e,s,h){typeof r=="number"?r=[r]:r=r||[8],e=typeof e<"u"?e:-1,s=s||2,h=h||14;for(var i=[],l=0;l<n.length;l++){var u=n[l-1>=0?l-1:n.length-1],d=n[l],f=n[(l+1)%n.length],v=r[l<r.length?l:r.length-1];if(v===0){i.push(d);continue}var m=p.normalise({x:d.y-u.y,y:u.x-d.x}),y=p.normalise({x:f.y-d.y,y:d.x-f.x}),g=Math.sqrt(2*Math.pow(v,2)),T=p.mult(a.clone(m),v),S=p.normalise(p.mult(p.add(m,y),.5)),E=p.sub(d,p.mult(S,g)),M=e;e===-1&&(M=Math.pow(v,.32)*1.75),M=a.clamp(M,s,h),M%2===1&&(M+=1);for(var F=Math.acos(p.dot(m,y)),A=F/M,P=0;P<M;P++)i.push(p.add(p.rotate(T,A*P),E))}return i},o.clockwiseSort=function(n){var r=o.mean(n);return n.sort(function(e,s){return p.angle(r,e)-p.angle(r,s)}),n},o.isConvex=function(n){var r=0,e=n.length,s,h,i,l;if(e<3)return null;for(s=0;s<e;s++)if(h=(s+1)%e,i=(s+2)%e,l=(n[h].x-n[s].x)*(n[i].y-n[h].y),l-=(n[h].y-n[s].y)*(n[i].x-n[h].x),l<0?r|=1:l>0&&(r|=2),r===3)return!1;return r!==0?!0:null},o.hull=function(n){var r=[],e=[],s,h;for(n=n.slice(0),n.sort(function(i,l){var u=i.x-l.x;return u!==0?u:i.y-l.y}),h=0;h<n.length;h+=1){for(s=n[h];e.length>=2&&p.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(h=n.length-1;h>=0;h-=1){for(s=n[h];r.length>=2&&p.cross3(r[r.length-2],r[r.length-1],s)<=0;)r.pop();r.push(s)}return r.pop(),e.pop(),r.concat(e)}})()},55973:c=>{/**
4596 * @author       Stefan Hedman <[email protected]> (http://steffe.se)
4597 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4598 */c.exports={decomp:F,quickDecomp:O,isSimple:P,removeCollinearPoints:G,removeDuplicatePoints:z,makeCCW:f};function x(I,U,D){D=D||0;var V=[0,0],B,W,K,J,Z,j,k;return B=I[1][1]-I[0][1],W=I[0][0]-I[1][0],K=B*I[0][0]+W*I[0][1],J=U[1][1]-U[0][1],Z=U[0][0]-U[1][0],j=J*U[0][0]+Z*U[0][1],k=B*Z-J*W,Y(k,0,D)||(V[0]=(Z*K-W*j)/k,V[1]=(B*j-J*K)/k),V}function t(I,U,D,V){var B=U[0]-I[0],W=U[1]-I[1],K=V[0]-D[0],J=V[1]-D[1];if(K*W-J*B===0)return!1;var Z=(B*(D[1]-I[1])+W*(I[0]-D[0]))/(K*W-J*B),j=(K*(I[1]-D[1])+J*(D[0]-I[0]))/(J*B-K*W);return Z>=0&&Z<=1&&j>=0&&j<=1}function o(I,U,D){return(U[0]-I[0])*(D[1]-I[1])-(D[0]-I[0])*(U[1]-I[1])}function p(I,U,D){return o(I,U,D)>0}function a(I,U,D){return o(I,U,D)>=0}function n(I,U,D){return o(I,U,D)<0}function r(I,U,D){return o(I,U,D)<=0}var e=[],s=[];function h(I,U,D,V){if(V){var B=e,W=s;B[0]=U[0]-I[0],B[1]=U[1]-I[1],W[0]=D[0]-U[0],W[1]=D[1]-U[1];
4598var K=B[0]*W[0]+B[1]*W[1],J=Math.sqrt(B[0]*B[0]+B[1]*B[1]),Z=Math.sqrt(W[0]*W[0]+W[1]*W[1]),j=Math.acos(K/(J*Z));return j<V}else return o(I,U,D)===0}function i(I,U){var D=U[0]-I[0],V=U[1]-I[1];return D*D+V*V}function l(I,U){var D=I.length;return I[U<0?U%D+D:U%D]}function u(I){I.length=0}function d(I,U,D,V){for(var B=D;B<V;B++)I.push(U[B])}function f(I){for(var U=0,D=I,V=1;V<I.length;++V)(D[V][1]<D[U][1]||D[V][1]===D[U][1]&&D[V][0]>D[U][0])&&(U=V);return p(l(I,U-1),l(I,U),l(I,U+1))?!1:(v(I),!0)}function v(I){for(var U=[],D=I.length,V=0;V!==D;V++)U.push(I.pop());for(var V=0;V!==D;V++)I[V]=U[V]}function m(I,U){return n(l(I,U-1),l(I,U),l(I,U+1))}var y=[],g=[];function T(I,U,D){var V,B,W=y,K=g;if(a(l(I,U+1),l(I,U),l(I,D))&&r(l(I,U-1),l(I,U),l(I,D)))return!1;B=i(l(I,U),l(I,D));for(var J=0;J!==I.length;++J)if(!((J+1)%I.length===U||J===U)&&a(l(I,U),l(I,D),l(I,J+1))&&r(l(I,U),l(I,D),l(I,J))&&(W[0]=l(I,U),W[1]=l(I,D),K[0]=l(I,J),K[1]=l(I,J+1),V=x(W,K),i(l(I,U),V)<B))return!1;return!0}function S(I,U,D){for(var V=0;V!==I.length;++V)if(!(V===U||V===D||(V+1)%I.length===U||(V+1)%I.length===D)&&t(l(I,U),l(I,D),l(I,V),l(I,V+1)))return!1;return!0}function E(I,U,D,V){var B=V||[];if(u(B),U<D)for(var W=U;W<=D;W++)B.push(I[W]);else{for(var W=0;W<=D;W++)B.push(I[W]);for(var W=U;W<I.length;W++)B.push(I[W])}return B}function M(I){for(var U=[],D=[],V=[],B=[],W=Number.MAX_VALUE,K=0;K<I.length;++K)if(m(I,K)){for(var J=0;J<I.length;++J)if(T(I,K,J)){D=M(E(I,K,J,B)),V=M(E(I,J,K,B));for(var Z=0;Z<V.length;Z++)D.push(V[Z]);D.length<W&&(U=D,W=D.length,U.push([l(I,K),l(I,J)]))}}return U}function F(I){var U=M(I);return U.length>0?A(I,U):[I]}function A(I,U){if(U.length===0)return[I];if(U instanceof Array&&U.length&&U[0]instanceof Array&&U[0].length===2&&U[0][0]instanceof Array){for(var D=[I],V=0;V<U.length;V++)for(var B=U[V],W=0;W<D.length;W++){var K=D[W],J=A(K,B);if(J){D.splice(W,1),D.push(J[0],J[1]);break}}return D}else{var B=U,V=I.indexOf(B[0]),W=I.indexOf(B[1]);return V!==-1&&W!==-1?[E(I,V,W),E(I,W,V)]:!1}}function P(I){var U=I,D;for(D=0;D<U.length-1;D++)for(var V=0;V<D-1;V++)if(t(U[D],U[D+1],U[V],U[V+1]))return!1;for(D=1;D<U.length-2;D++)if(t(U[0],U[U.length-1],U[D],U[D+1]))return!1;return!0}function L(I,U,D,V,B){B=B||0;var W=U[1]-I[1],K=I[0]-U[0],J=W*I[0]+K*I[1],Z=V[1]-D[1],j=D[0]-V[0],k=Z*D[0]+j*D[1],_=W*j-Z*K;return Y(_,0,B)?[0,0]:[(j*J-K*k)/_,(W*k-Z*J)/_]}function O(I,U,D,V,B,W,K){W=W||100,K=K||0,B=B||25,U=typeof U<"u"?U:[],D=D||[],V=V||[];var J=[0,0],Z=[0,0],j=[0,0],k=0,_=0,q=0,et=0,nt=0,tt=0,ot=0,ht=[],lt=[],it=I,rt=I;if(rt.length<3)return U;if(K++,K>W)return console.warn("quickDecomp: max level ("+W+") reached."),U;for(var at=0;at<I.length;++at)if(m(it,at)){D.push(it[at]),k=_=Number.MAX_VALUE;for(var ct=0;ct<I.length;++ct)p(l(it,at-1),l(it,at),l(it,ct))&&r(l(it,at-1),l(it,at),l(it,ct-1))&&(j=L(l(it,at-1),l(it,at),l(it,ct),l(it,ct-1)),n(l(it,at+1),l(it,at),j)&&(q=i(it[at],j),q<_&&(_=q,Z=j,tt=ct))),p(l(it,at+1),l(it,at),l(it,ct+1))&&r(l(it,at+1),l(it,at),l(it,ct))&&(j=L(l(it,at+1),l(it,at),l(it,ct),l(it,ct+1)),p(l(it,at-1),l(it,at),j)&&(q=i(it[at],j),q<k&&(k=q,J=j,nt=ct)));if(tt===(nt+1)%I.length)j[0]=(Z[0]+J[0])/2,j[1]=(Z[1]+J[1])/2,V.push(j),at<nt?(d(ht,it,at,nt+1),ht.push(j),lt.push(j),tt!==0&&d(lt,it,tt,it.length),d(lt,it,0,at+1)):(at!==0&&d(ht,it,at,it.length),d(ht,it,0,nt+1),ht.push(j),lt.push(j),d(lt,it,tt,at+1));else{if(tt>nt&&(nt+=I.length),et=Number.MAX_VALUE,nt<tt)return U;for(var ct=tt;ct<=nt;++ct)a(l(it,at-1),l(it,at),l(it,ct))&&r(l(it,at+1),l(it,at),l(it,ct))&&(q=i(l(it,at),l(it,ct)),q<et&&S(it,at,ct)&&(et=q,ot=ct%I.length));at<ot?(d(ht,it,at,ot+1),ot!==0&&d(lt,it,ot,rt.length),d(lt,it,0,at+1)):(at!==0&&d(ht,it,at,rt.length),d(ht,it,0,ot+1),d(lt,it,ot,at+1))}return ht.length<lt.length?(O(ht,U,D,V,B,W,K),O(lt,U,D,V,B,W,K)):(O(lt,U,D,V,B,W,K),O(ht,U,D,V,B,W,K)),U}return U.push(I),U}function G(I,U){for(var D=0,V=I.length-1;I.length>3&&V>=0;--V)h(l(I,V-1),l(I,V),l(I,V+1),U)&&(I.splice(V%I.length,1),D++);return D}function z(I,U){for(var D=I.length-1;D>=1;--D)for(var V=I[D],B=D-1;B>=0;--B)if(X(V,I[B],U)){I.splice(D,1);continue}}function Y(I,U,D){return D=D||0,Math.abs(I-U)<=D}function X(I,U,D){return Y(I[0],U[0],D)&&Y(I[1],U[1],D)}},52018:(c,x,t)=>{/**
4599* @author       Richard Davey <[email protected]>
4600* @copyright    2013-2025 Phaser Studio Inc.
4601* @license      {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
4602*/var o=t(83419),p=new o({initialize:function(n){this.pluginManager=n,this.game=n.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=p},42363:c=>{/**
4603 * @author       Richard Davey <[email protected]>
4604 * @copyright    2013-2025 Phaser Studio Inc.
4605 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4606 */var x={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loa
4606der","TweenManager","LightsPlugin"]};c.exports=x},37277:c=>{/**
4607 * @author       Richard Davey <[email protected]>
4608 * @copyright    2013-2025 Phaser Studio Inc.
4609 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4610 */var x={},t={},o={};o.register=function(p,a,n,r){r===void 0&&(r=!1),x[p]={plugin:a,mapping:n,custom:r}},o.registerCustom=function(p,a,n,r){t[p]={plugin:a,mapping:n,data:r}},o.hasCore=function(p){return x.hasOwnProperty(p)},o.hasCustom=function(p){return t.hasOwnProperty(p)},o.getCore=function(p){return x[p]},o.getCustom=function(p){return t[p]},o.getCustomClass=function(p){return t.hasOwnProperty(p)?t[p].plugin:null},o.remove=function(p){x.hasOwnProperty(p)&&delete x[p]},o.removeCustom=function(p){t.hasOwnProperty(p)&&delete t[p]},o.destroyCorePlugins=function(){for(var p in x)x.hasOwnProperty(p)&&delete x[p]},o.destroyCustomPlugins=function(){for(var p in t)t.hasOwnProperty(p)&&delete t[p]},c.exports=o},77332:(c,x,t)=>{/**
4611 * @author       Richard Davey <[email protected]>
4612 * @copyright    2013-2025 Phaser Studio Inc.
4613 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4614 */var o=t(83419),p=t(8443),a=t(50792),n=t(74099),r=t(44603),e=t(39429),s=t(95540),h=t(37277),i=t(72905),l=t(8054),u=new o({Extends:a,initialize:function(f){a.call(this),this.game=f,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],f.isBooted||f.config.renderType===l.HEADLESS?this.boot():f.events.once(p.BOOT,this.boot,this)},boot:function(){var d,f,v,m,y,g,T,S=this.game.config,E=S.installGlobalPlugins;for(E=E.concat(this._pendingGlobal),d=0;d<E.length;d++)f=E[d],v=s(f,"key",null),m=s(f,"plugin",null),y=s(f,"start",!1),g=s(f,"mapping",null),T=s(f,"data",null),v&&(m?this.install(v,m,y,g,T):console.warn("Missing `plugin` for key: "+v));for(E=S.installScenePlugins,E=E.concat(this._pendingScene),d=0;d<E.length;d++)f=E[d],v=s(f,"key",null),m=s(f,"plugin",null),g=s(f,"mapping",null),v&&(m?this.installScenePlugin(v,m,g):console.warn("Missing `plugin` for key: "+v));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(p.DESTROY,this.destroy,this)},addToScene:function(d,f,v){var m,y,g,T=this.game,S=d.scene,E=d.settings.map,M=d.settings.isBooted;for(m=0;m<f.length;m++)y=f[m],T[y]?(d[y]=T[y],E.hasOwnProperty(y)&&(S[E[y]]=d[y])):y==="game"&&E.hasOwnProperty(y)&&(S[E[y]]=T);for(var F=0;F<v.length;F++)for(g=v[F],m=0;m<g.length;m++)if(y=g[m],!!h.hasCore(y)){var A=h.getCore(y),P=A.mapping,L=new A.plugin(S,this,P);d[P]=L,A.custom?S[P]=L:E.hasOwnProperty(P)&&(S[E[P]]=L),M&&L.boot()}for(g=this.plugins,m=0;m<g.length;m++){var O=g[m];O.mapping&&(S[O.mapping]=O.plugin)}},getDefaultScenePlugins:function(){var d=this.game.config.defaultPlugins;return d=d.concat(this.scenePlugins),d},installScenePlugin:function(d,f,v,m,y){if(y===void 0&&(y=!1),typeof f!="function"){console.warn("Invalid Scene Plugin: "+d);return}if(h.hasCore(d)||h.register(d,f,v,!0),this.scenePlugins.indexOf(d)===-1)this.scenePlugins.push(d);else if(!y&&h.hasCore(d)){console.warn("Scene Plugin key in use: "+d);return}if(m){var g=new f(m,this,d);m.sys[d]=g,v&&v!==""&&(m[v]=g),g.boot()}},install:function(d,f,v,m,y){if(v===void 0&&(v=!1),m===void 0&&(m=null),y===void 0&&(y=null),typeof f!="function")return console.warn("Invalid Plugin: "+d),null;if(h.hasCustom(d))return console.warn("Plugin key in use: "+d),null;if(m!==null&&(v=!0),!this.game.isBooted)this._pendingGlobal.push({key:d,plugin:f,start:v,mapping:m,data:y});else if(h.registerCustom(d,f,m,y),v)return this.start(d);return null},getIndex:function(d){for(var f=this.plugins,v=0;v<f.length;v++){var m=f[v];if(m.key===d)return v}return-1},getEntry:function(d){var f=this.getIndex(d);if(f!==-1)return this.plugins[f]},isActive:function(d){var f=this.getEntry(d);return f&&f.active},start:function(d,f){f===void 0&&(f=d);var v=this.getEntry(f);return v&&!v.active?(v.active=!0,v.plugin.start()):v||(v=this.createEntry(d,f)),v?v.plugin:null},createEntry:function(d,f){var v=h.getCustom(d);if(v){var m=new v.plugin(this);v={key:f,plugin:m,active:!0,mapping:v.mapping,data:v.data},this.plugins.push(v),m.init(v.data),m.start()}return v},stop:function(d){var f=this.getEntry(d);return f&&f.active&&(f.active=!1,f.plugin.stop()),this},get:function(d,f){f===void 0&&(f=!0);var v=this.getEntry(d);if(v)return v.plugin;var m=this.getClass(d);return m&&f?(v=this.createEntry(d,d),v?v.plugin:null):m||null},getClass:function(d){return h.getCustomClass(d)},removeGlobalPlugin:function(d){var f=this.getEntry(d);f&&i(this.plugins,f),h.removeCustom(d)},removeScenePlugin:function(d){i(this.scenePlugins,d),h.remove(d)},registerGameObject:function(d,f,v){return f&&e.register(d,f),v&&r.register(d,v),this},removeGameObject:function(d,f,v){return f===void 0&&(f=!0),v===void 0&&(v=!0),f&&e.remove(d),v&&r.remove(d),this},registerFileType:function(d,f,v){n.register(d,f),v&&v.sys.load&&(v.sys.load[d]=f)},destroy:function(){for(var d=0;d<this.plugins.length;d++)this.plugins[d].plugin.destroy();
vendor: 4,582 bytes, lines 4614-4635
4614h.destroyCustomPlugins(),this.game.noReturn&&h.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});c.exports=u},45145:(c,x,t)=>{/**
4615* @author       Richard Davey <[email protected]>
4616* @copyright    2013-2025 Phaser Studio Inc.
4617* @license      {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
4618*/var o=t(52018),p=t(83419),a=t(44594),n=new p({Extends:o,initialize:function(e,s,h){o.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}});c.exports=n},18922:(c,x,t)=>{/**
4619 * @author       Richard Davey <[email protected]>
4620 * @copyright    2013-2025 Phaser Studio Inc.
4621 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4622 */c.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(c){const x=performance.now(),t=this.getVideoPlaybackQuality(),o=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,p=(a,n)=>{const r=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||r.totalVideoFrames-r.droppedVideoFrames;if(e>o){const s=this.mozFrameDelay||r.totalFrameDelay-t.totalFrameDelay||0,h=n-a;c(n,{presentationTime:n+s*1e3,expectedDisplayTime:n+h,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+h/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[x]}else this._rvfcpolyfillmap[x]=requestAnimationFrame(s=>p(n,s))};return this._rvfcpolyfillmap[x]=requestAnimationFrame(a=>p(x,a)),x},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(c){cancelAnimationFrame(this._rvfcpolyfillmap[c]),delete this._rvfcpolyfillmap[c]})},10312:c=>{/**
4623 * @author       Richard Davey <[email protected]>
4624 * @copyright    2013-2025 Phaser Studio Inc.
4625 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4626 */c.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:c=>{/**
4627 * @author       Richard Davey <[email protected]>
4628 * @copyright    2013-2025 Phaser Studio Inc.
4629 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4630 */var x={DEFAULT:0,LINEAR:0,NEAREST:1};c.exports=x},68627:(c,x,t)=>{/**
4631 * @author       Richard Davey <[email protected]>
4632 * @author       Felipe Alfonso <@bitnenfer>
4633 * @copyright    2013-2025 Phaser Studio Inc.
4634 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4635 */var o=t(19715),p=t(32880),a=t(83419),n=t(8054),r=t(50792),e=t(92503),s=t(56373),h=t(97480),i=t(69442),l=t(8443),u=t(61340),d=new a({Extends:r,initialize:function(v){r.call(this);var m=v.config;this.config={clearBeforeRender:m.clearBeforeRender,backgroundColor:m.backgroundColor,antialias:m.antialias,roundPixels:m.roundPixels,transparent:m.transparent},this.game=v,this.type=n.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=v.canvas;var y={alpha:m.transparent,desynchronized:m.desynchronized,willReadFrequently:!1};this.gameContext=m.context?m.context:this.gameCanvas.getContext("2d",y),this.currentContext=this.gameContext,this.antialias=m.antialias,this.blendModes=s(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.isBooted=!1,this.init()},init:function(){var f=this.game;f.events.once(l.BOOT,function(){var v=this.config;if(!v.transparent){var m=this.gameContext,y=this.gameCanvas;m.fillStyle=v.backgroundColor.rgba,m.fillRect(0,0,y.width,y.height)}},this),f.textures.once(i.READY,this.boot,this)},boot:function(){var f=this.game,v=f.scale.baseSize;this.width=v.width,this.height=v.height,this.isBooted=!0,f.scale.on(h.RESIZE,this.onResize,this),this.resize(v.width,v.height)},onResize:function(f,v){(v.width!==this.width||v.height!==this.height)&&this.resize(v.width,v.height)}
vendor: 4,201 bytes, lines 4635-4638
4635,resize:function(f,v){this.width=f,this.height=v,this.emit(e.RESIZE,f,v)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(f){return this.currentContext.globalCompositeOperation=f,this},setContext:function(f){return this.currentContext=f||this.gameContext,this},setAlpha:function(f){return this.currentContext.globalAlpha=f,this},preRender:function(){var f=this.gameContext,v=this.config,m=this.width,y=this.height;f.globalAlpha=1,f.globalCompositeOperation="source-over",f.setTransform(1,0,0,1,0,0),this.emit(e.PRE_RENDER_CLEAR),v.clearBeforeRender&&(f.clearRect(0,0,m,y),v.transparent||(f.fillStyle=v.backgroundColor.rgba,f.fillRect(0,0,m,y))),f.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(f,v,m){var y=v.length;this.emit(e.RENDER,f,m);var g=m.x,T=m.y,S=m.width,E=m.height,M=m.renderToTexture?m.context:f.sys.context;M.save(),this.game.scene.customViewports&&(M.beginPath(),M.rect(g,T,S,E),M.clip()),m.emit(o.PRE_RENDER,m),this.currentContext=M;var F=m.mask;F&&F.preRenderCanvas(this,null,m._maskCamera),m.transparent||(M.fillStyle=m.backgroundColor.rgba,M.fillRect(g,T,S,E)),M.globalAlpha=m.alpha,M.globalCompositeOperation="source-over",this.drawCount+=y,m.renderToTexture&&m.emit(o.PRE_RENDER,m),m.matrix.copyToContext(M);for(var A=0;A<y;A++){var P=v[A];P.mask&&P.mask.preRenderCanvas(this,P,m),P.renderCanvas(this,P,m),P.mask&&P.mask.postRenderCanvas(this,P,m)}M.setTransform(1,0,0,1,0,0),M.globalCompositeOperation="source-over",M.globalAlpha=1,m.flashEffect.postRenderCanvas(M),m.fadeEffect.postRenderCanvas(M),m.dirty=!1,F&&F.postRenderCanvas(this),M.restore(),m.renderToTexture&&(m.emit(o.POST_RENDER,m),m.renderToGame&&f.sys.context.drawImage(m.canvas,g,T)),m.emit(o.POST_RENDER,m)},postRender:function(){var f=this.gameContext;f.restore(),this.emit(e.POST_RENDER);var v=this.snapshotState;v.callback&&(p(this.gameCanvas,v),v.callback=null)},snapshotCanvas:function(f,v,m,y,g,T,S,E,M){m===void 0&&(m=!1),this.snapshotArea(y,g,T,S,v,E,M);var F=this.snapshotState;return F.getPixel=m,p(f,F),F.callback=null,this},snapshot:function(f,v,m){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,f,v,m)},snapshotArea:function(f,v,m,y,g,T,S){var E=this.snapshotState;return E.callback=g,E.type=T,E.encoder=S,E.getPixel=!1,E.x=f,E.y=v,E.width=Math.min(m,this.gameCanvas.width),E.height=Math.min(y,this.gameCanvas.height),this},snapshotPixel:function(f,v,m){return this.snapshotArea(f,v,1,1,m),this.snapshotState.getPixel=!0,this},batchSprite:function(f,v,m,y){var g=m.alpha*f.alpha;if(g!==0){var T=this.currentContext,S=this._tempMatrix1,E=this._tempMatrix2,M=v.canvasData,F=M.x,A=M.y,P=v.cutWidth,L=v.cutHeight,O=v.customPivot,G=v.source.resolution,z=f.displayOriginX,Y=f.displayOriginY,X=-z+v.x,I=-Y+v.y;if(f.isCropped){var U=f._crop;(U.flipX!==f.flipX||U.flipY!==f.flipY)&&v.updateCropUVs(U,f.flipX,f.flipY),P=U.cw,L=U.ch,F=U.cx,A=U.cy,X=-z+U.x,I=-Y+U.y,f.flipX&&(X>=0?X=-(X+P):X<0&&(X=Math.abs(X)-P)),f.flipY&&(I>=0?I=-(I+L):I<0&&(I=Math.abs(I)-L))}var D=1,V=1;f.flipX&&(O||(X+=-v.realWidth+z*2),D=-1),f.flipY&&(O||(I+=-v.realHeight+Y*2),V=-1);var B=f.x,W=f.y;if(m.roundPixels&&(B=Math.floor(B),W=Math.floor(W)),E.applyITRS(B,W,f.rotation,f.scaleX*D,f.scaleY*V),S.copyFrom(m.matrix),y?(S.multiplyWithOffset(y,-m.scrollX*f.scrollFactorX,-m.scrollY*f.scrollFactorY),E.e=B,E.f=W):(E.e-=m.scrollX*f.scrollFactorX,E.f-=m.scrollY*f.scrollFactorY),S.multiply(E),m.renderRoundPixels&&(S.e=Math.floor(S.e+.5),S.f=Math.floor(S.f+.5)),T.save(),S.setToContext(T),T.globalCompositeOperation=this.blendModes[f.blendMode],T.globalAlpha=g,T.imageSmoothingEnabled=!v.source.scaleMode,f.mask&&f.mask.preRenderCanvas(this,f,m),P>0&&L>0){var K=P/G,J=L/G;m.roundPixels&&(X=Math.floor(X+.5),I=Math.floor(I+.5),K+=.5,J+=.5),T.drawImage(v.source.image,F,A,P,L,X,I,K,J)}f.mask&&f.mask.postRenderCanvas(this,f,m),T.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});c.exports=d},55830:(c,x,t)=>{/**
4636 * @author       Richard Davey <[email protected]>
4637 * @copyright    2013-2025 Phaser Studio Inc.
4638 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4639 */c.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(c,x,t)=>{/**
4640 * @author       Richard Davey <[email protected]>
4641 * @copyright    2013-2025 Phaser Studio Inc.
4642 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4643 */var o=t(10312),p=t(89289),a=function(){var n=[],r=p.supportNewBlendModes,e="source-over";return n[o.NORMAL]=e,n[o.ADD]="lighter",n[o.MULTIPLY]=r?"multiply":e,n[o.SCREEN]=r?"screen":e,n[o.OVERLAY]=r?"overlay":e,n[o.DARKEN]=r?"darken":e,n[o.LIGHTEN]=r?"lighten":e,n[o.COLOR_DODGE]=r?"color-dodge":e,n[o.COLOR_BURN]=r?"color-burn":e,n[o.HARD_LIGHT]=r?"hard-light":e,n[o.SOFT_LIGHT]=r?"soft-light":e,n[o.DIFFERENCE]=r?"difference":e,n[o.EXCLUSION]=r?"exclusion":e,n[o.HUE]=r?"hue":e,n[o.SATURATION]=r?"saturation":e,n[o.COLOR]=r?"color":e,n[o.LUMINOSITY]=r?"luminosity":e,n[o.ERASE]="destination-out",n[o.SOURCE_IN]="source-in",n[o.SOURCE_OUT]="source-out",n[o.SOURCE_ATOP]="source-atop",n[o.DESTINATION_OVER]="destination-over",n[o.DESTINATION_IN]="destination-in",n[o.DESTINATION_OUT]="destination-out",n[o.DESTINATION_ATOP]="destination-atop",n[o.LIGHTER]="lighter",n[o.COPY]="copy",n[o.XOR]="xor",n};c.exports=a},20926:(c,x,t)=>{/**
4644 * @author       Richard Davey <[email protected]>
4645 * @copyright    2013-2025 Phaser Studio Inc.
4646 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4647 */var o=t(91296),p=function(a,n,r,e,s){var h=e.alpha*r.alpha;if(h<=0)return!1;var i=o(r,e,s).calc;return n.globalCompositeOperation=a.blendModes[r.blendMode],n.globalAlpha=h,n.save(),i.setToContext(n),n.imageSmoothingEnabled=r.frame?!r.frame.source.scaleMode:a.antialias,!0};c.exports=p},63899:c=>{/**
4648 * @author       Benjamin D. Richards <[email protected]>
4649 * @copyright    2013-2025 Phaser Studio Inc.
4650 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4651 */c.exports="losewebgl"},6119:c=>{/**
4652 * @author       Richard Davey <[email protected]>
4653 * @copyright    2013-2025 Phaser Studio Inc.
4654 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4655 */c.exports="postrender"},48070:c=>{/**
4656 * @author       Richard Davey <[email protected]>
4657 * @copyright    2013-2025 Phaser Studio Inc.
4658 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4659 */c.exports="prerender"},15640:c=>{/**
4660 * @author       Richard Davey <[email protected]>
4661 * @copyright    2013-2025 Phaser Studio Inc.
4662 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4663 */c.exports="render"},8912:c=>{/**
4664 * @author       Richard Davey <[email protected]>
4665 * @copyright    2013-2025 Phaser Studio Inc.
4666 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4667 */c.exports="resize"},87124:c=>{/**
4668 * @author       Benjamin D. Richards <[email protected]>
4669 * @copyright    2013-2025 Phaser Studio Inc.
4670 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4671 */c.exports="restorewebgl"},92503:(c,x,t)=>{/**
4672 * @author       Richard Davey <[email protected]>
4673 * @copyright    2013-2025 Phaser Studio Inc.
4674 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4675 */c.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(c,x,t)=>{/**
4676 * @author       Richard Davey <[email protected]>
4677 * @copyright    2013-2025 Phaser Studio Inc.
4678 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4679 */c.exports={Events:t(92503),Snapshot:t(89966)},c.exports.Canvas=t(55830),c.exports.WebGL=t(4159)},32880:(c,x,t)=>{/**
4680 * @author       Richard Davey <[email protected]>
4681 * @copyright    2013-2025 Phaser Studio Inc.
4682 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4683 */var o=t(27919),p=t(40987),a=t(95540),n=function(r,e){var s=a(e,"callback"),h=a(e,"type","image/png"),i=a(e,"encoder",.92),l=Math.abs(Math.round(a(e,"x",0))),u=Math.abs(Math.round(a(e,"y",0))),d=Math.floor(a(e,"width",r.width)),f=Math.floor(a(e,"height",r.height)),v=a(e,"getPixel",!1);if(v){var m=r.getContext("2d",{willReadFrequently:!1}),y=m.getImageData(l,u,1,1),g=y.data;
4683s.call(null,new p(g[0],g[1],g[2],g[3]))}else if(l!==0||u!==0||d!==r.width||f!==r.height){var T=o.createWebGL(this,d,f),S=T.getContext("2d",{willReadFrequently:!0});d>0&&f>0&&S.drawImage(r,l,u,d,f,0,0,d,f);var E=new Image;E.onerror=function(){s.call(null),o.remove(T)},E.onload=function(){s.call(null,E),o.remove(T)},E.src=T.toDataURL(h,i)}else{var M=new Image;M.onerror=function(){s.call(null)},M.onload=function(){s.call(null,M)},M.src=r.toDataURL(h,i)}};c.exports=n},88815:(c,x,t)=>{/**
4684 * @author       Richard Davey <[email protected]>
4685 * @copyright    2013-2025 Phaser Studio Inc.
4686 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4687 */var o=t(27919),p=t(40987),a=t(95540),n=function(r,e){var s=r,h=a(e,"callback"),i=a(e,"type","image/png"),l=a(e,"encoder",.92),u=Math.abs(Math.round(a(e,"x",0))),d=Math.abs(Math.round(a(e,"y",0))),f=a(e,"getPixel",!1),v=a(e,"isFramebuffer",!1),m=v?a(e,"bufferWidth",1):s.drawingBufferWidth,y=v?a(e,"bufferHeight",1):s.drawingBufferHeight;if(f){var g=new Uint8Array(4),T=v?d:y-d;s.readPixels(u,T,1,1,s.RGBA,s.UNSIGNED_BYTE,g),h.call(null,new p(g[0],g[1],g[2],g[3]))}else{var S=Math.floor(a(e,"width",m)),E=Math.floor(a(e,"height",y)),M=S*E*4,F=new Uint8Array(M);s.readPixels(u,y-d-E,S,E,s.RGBA,s.UNSIGNED_BYTE,F);for(var A=o.createWebGL(this,S,E),P=A.getContext("2d",{willReadFrequently:!0}),L=P.getImageData(0,0,S,E),O=L.data,G=0;G<E;G++)for(var z=0;z<S;z++){var Y=((E-G-1)*S+z)*4,X=v?M-(G*S+(S-z))*4:(G*S+z)*4;O[X+0]=F[Y+0],O[X+1]=F[Y+1],O[X+2]=F[Y+2],O[X+3]=F[Y+3]}P.putImageData(L,0,0);var I=new Image;I.onerror=function(){h.call(null),o.remove(A)},I.onload=function(){h.call(null,I),o.remove(A)},I.src=A.toDataURL(i,l)}};c.exports=n},89966:(c,x,t)=>{/**
4688 * @author       Richard Davey <[email protected]>
4689 * @copyright    2013-2025 Phaser Studio Inc.
4690 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4691 */c.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(c,x,t)=>{/**
4692 * @author       Richard Davey <[email protected]>
4693 * @copyright    2013-2025 Phaser Studio Inc.
4694 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4695 */var o=t(83419),p=t(36060),a=t(90330),n=t(82264),r=t(95540),e=t(32302),s=t(63448),h=t(31302),i=t(58918),l=t(14811),u=t(92651),d=t(96569),f=t(56527),v=t(57516),m=t(43439),y=t(81041),g=t(12385),T=t(7589),S=t(95428),E=t(72905),M=new o({initialize:function(A){this.game=A.game,this.renderer=A,this.classes=new a([[p.UTILITY_PIPELINE,T],[p.MULTI_PIPELINE,v],[p.BITMAPMASK_PIPELINE,h],[p.SINGLE_PIPELINE,g],[p.ROPE_PIPELINE,y],[p.LIGHT_PIPELINE,d],[p.POINTLIGHT_PIPELINE,m],[p.MOBILE_PIPELINE,f]]),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(F,A,P){var L=this.renderer,O=this.renderTargets;this.frameInc=Math.floor(r(F,"frameInc",32));var G=L.width,z=L.height,Y=this.game.config.disablePreFX,X=this.game.config.disablePostFX;if(X||this.postPipelineClasses.setAll([[String(l.BARREL),i.Barrel],[String(l.BLOOM),i.Bloom],[String(l.BLUR),i.Blur],[String(l.BOKEH),i.Bokeh],[String(l.CIRCLE),i.Circle],[String(l.COLOR_MATRIX),i.ColorMatrix],[String(l.DISPLACEMENT),i.Displacement],[String(l.GLOW),i.Glow],[String(l.GRADIENT),i.Gradient],[String(l.PIXELATE),i.Pixelate],[String(l.SHADOW),i.Shadow],[String(l.SHINE),i.Shine],[String(l.VIGNETTE),i.Vignette],[String(l.WIPE),i.Wipe]]),!Y){this.classes.set(p.FX_PIPELINE,u);for(var I=Math.min(G,z),U=Math.ceil(I/this.frameInc),D=1;D<U;D++){var V=D*this.frameInc;O.push(new e(L,V,V)),O.push(new e(L,V,V)),O.push(new e(L,V,V)),this.maxDimension=V}O.push(new e(L,G,z,1,0,!0,!0)),O.push(new e(L,G,z,1,0,!0,!0)),O.push(new e(L,G,z,1,0,!0,!0))}var B,W,K=this,J=this.game;if(this.classes.each(function(j,k){B=K.add(j,new k({game:J})),j===p.UTILITY_PIPELINE&&(K.UTILITY_PIPELINE=B,K.fullFrame1=B.fullFrame1,K.fullFrame2=B.fullFrame2,K.halfFrame1=B.halfFrame1,K.halfFrame2=B.halfFrame2)}),this.MULTI_PIPELINE=this.get(p.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(p.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(p.MOBILE_PIPELINE),Y||(this.FX_PIPELINE=this.get(p.FX_PIPELINE)),F)for(W in F){var Z=F[W];B=new Z(J),B.name=W,B.isPostFX?this.postPipelineClasses.set(W,Z):this.has(W)||(this.classes.set(W,Z),this.add(W,B))}this.default=this.get(A),P&&!n.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(F){var A=this.get(F);return A&&(this.default=A),A},add:function(F,A){if(A.isPostFX){console.warn(F+" is a Post Pipeline. Use `addPostPipeline` instead");return}var P=this.pipelines,L=this.renderer;return P.has(F)?console.warn("Pipeline exists: "+F):(A.name=F,A.manager=this,P.set(F,A)),A.hasBooted||A.boot(),L.width!==0&&L.height!==0&&!A.isPreFX&&A.resize(L.width,L.height),A},addPostPipeline:function(F,A){this.postPipelineClasses.has(F)||this.postPipelineClasses.set(F,A)},flush:function(){this.current&&this.current.flush()},has:function(F){var A=this.pipelines;return typeof F=="string"?A.has(F):!!A.contains(F)},get:function(F){var A=this.pipelines;if(typeof F=="string")return A.get(F);if(A.contains(F))return F},getPostPipeline:function(F,A,P){var L=this.postPipelineClasses,O,G="",z=typeof F;
4695if(z==="string"||z==="number"?(O=L.get(F),G=F):z==="function"?(L.contains(F)&&(O=F),G=F.name):z==="object"&&(O=L.get(F.name),G=F.name),O){var Y=new O(this.game,P);return Y.name=G,A&&(Y.gameObject=A),this.postPipelineInstances.push(Y),Y}},removePostPipeline:function(F){E(this.postPipelineInstances,F)},remove:function(F,A,P){A===void 0&&(A=!0),P===void 0&&(P=!0),this.pipelines.delete(F),A&&this.classes.delete(F),P&&this.postPipelineClasses.delete(F)},set:function(F,A,P){if(!F.isPostFX)return this.isCurrent(F,P)||(this.flush(),this.current&&this.current.unbind(),this.current=F,F.bind(P)),F.updateProjectionMatrix(),F.onBind(A),F},preBatch:function(F){if(F.hasPostPipeline){this.flush();for(var A=F.postPipelines,P=A.length-1;P>=0;P--){var L=A[P];L.active&&L.preBatch(F)}}},postBatch:function(F){if(F.hasPostPipeline){this.flush();for(var A=F.postPipelines,P=0;P<A.length;P++){var L=A[P];L.active&&L.postBatch(F)}}},preBatchCamera:function(F){if(F.hasPostPipeline){this.flush();for(var A=F.postPipelines,P=A.length-1;P>=0;P--){var L=A[P];L.active&&L.preBatch(F)}}},postBatchCamera:function(F){if(F.hasPostPipeline){this.flush();for(var A=F.postPipelines,P=0;P<A.length;P++){var L=A[P];L.active&&L.postBatch(F)}}},isCurrent:function(F,A){var P=this.renderer,L=this.current;return L&&!A&&(A=L.currentShader),!(L!==F||A.program!==P.currentProgram)},copyFrame:function(F,A,P,L,O){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(F,A,P,L,O),this},copyToGame:function(F){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(F),this},drawFrame:function(F,A,P,L){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(F,A,P,L),this},blendFrames:function(F,A,P,L,O){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(F,A,P,L,O),this},blendFramesAdditive:function(F,A,P,L,O){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(F,A,P,L,O),this},clearFrame:function(F,A){return this.UTILITY_PIPELINE.clearFrame(F,A),this},blitFrame:function(F,A,P,L,O,G){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(F,A,P,L,O,G),this},copyFrameRect:function(F,A,P,L,O,G,z,Y){return this.UTILITY_PIPELINE.copyFrameRect(F,A,P,L,O,G,z,Y),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(F){return this.UTILITY_PIPELINE.bind(F)},setFX:function(){return this.set(this.FX_PIPELINE)},restoreContext:function(){this.rebind(),this.pipelines.each(function(F,A){A.restoreContext()}),S(this.postPipelineInstances,function(F){F.restoreContext()})},rebind:function(F){F===void 0&&this.previous&&(F=this.previous);var A=this.renderer,P=A.gl;P.disable(P.DEPTH_TEST),P.disable(P.CULL_FACE),A.hasActiveStencilMask()?P.clear(P.DEPTH_BUFFER_BIT):(P.disable(P.STENCIL_TEST),P.clear(P.DEPTH_BUFFER_BIT|P.STENCIL_BUFFER_BIT)),P.viewport(0,0,A.width,A.height),A.currentProgram=null,A.setBlendMode(0,!0);var L=A.vaoExtension;L&&L.bindVertexArrayOES(null);var O=this.pipelines.entries;for(var G in O)O[G].glReset=!0;F&&(this.current=F,F.rebind())},clear:function(){var F=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,F.currentProgram=null,F.setBlendMode(0,!0);var A=F.vaoExtension;A&&A.bindVertexArrayOES(null)},getRenderTarget:function(F){var A=this.renderTargets,P=3;if(F>this.maxDimension)return this.targetIndex=A.length-P,A[this.targetIndex];var L=(s(F,this.frameInc,0,!0)-1)*P;return this.targetIndex=L,A[L]},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}});c.exports=M},32302:(c,x,t)=>{/**
4696 * @author       Richard Davey <[email protected]>
4697 * @copyright    2013-2025 Phaser Studio Inc.
4698 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4699 */var o=t(83419),p=t(92503),a=new o({initialize:function(r,e,s,h,i,l,u,d,f){h===void 0&&(h=1),i===void 0&&(i=0),l===void 0&&(l=!0),u===void 0&&(u=!1),d===void 0&&(d=!0),f===void 0&&(f=!0),this.renderer=r,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=h,this.minFilter=i,this.autoClear=l,this.autoResize=!0,this.hasDepthBuffer=d,this.forceClamp=f,this.init(e,s),u?this.renderer.on(p.RESIZE,this.resize,this):this.autoResize=!1},init:function(n,r){var e=this.renderer;this.texture=e.createTextureFromSource(null,n,r,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(n,r,this.texture,this.hasDepthBuffer),this.width=n,this.height=r},setAutoResize:function(n){return n&&!this.autoResize?(this.renderer.on(p.RESIZE,this.resize,this),this.autoResize=!0):!n&&this.autoResize&&(this.renderer.off(p.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(n,r){if(this.autoResize&&this.willResize(n,r)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,n,r,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(n,r,this.texture,this.hasDepthBuffer),this.width=n,this.height=r}return this},willResize:function(n,r){return typeof n!="number"||typeof r!="number"?!1:(n=Math.round(n*this.scale),r=Math.round(r*this.scale),n=Math.max(n,1),r=Math.max(r,1),n!==this.width||r!==this.height)},bind:function(n,r,e){n===void 0&&(n=!1);var s=this.renderer;if(n&&s.flush(),r&&e&&this.resize(r,e),s.pushFramebuffer(this.framebuffer,!1,!1),n&&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 n=this.renderer.gl;n.viewport(0,0,this.width,this.height),n.disable(n.SCISSOR_TEST)},clear:function(n,r,e,s){var h=this.renderer,i=h.gl;h.pushFramebuffer(this.framebuffer),n!==void 0&&r!==void 0&&e!==void 0&&s!==void 0?(i.enable(i.SCISSOR_TEST),i.scissor(n,r,e,s)):i.disable(i.SCISSOR_TEST),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),h.popFramebuffer(),h.resetScissor()},unbind:function(n){n===void 0&&(n=!1);var r=this.renderer;return n&&r.flush(),r.popFramebuffer()},destroy:function(){var n=this.renderer;n.off(p.RESIZE,this.resize,this),n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});c.exports=a},70554:c=>{/**
4700 * @author       Richard Davey <[email protected]>
4701 * @author       Felipe Alfonso <@bitnenfer>
4702 * @author       Matthew Groves <@doormat>
4703 * @copyright    2013-2025 Phaser Studio Inc.
4704 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4705 */c.exports={getTintFromFloats:function(x,t,o,p){var a=(x*255|0)&255,n=(t*255|0)&255,r=(o*255|0)&255,e=(p*255|0)&255;return(e<<24|a<<16|n<<8|r)>>>0},getTintAppendFloatAlpha:function(x,t){var o=(t*255|0)&255;return(o<<24|x)>>>0},getTintAppendFloatAlphaAndSwap:function(x,t){var o=(x>>16|0)&255,p=(x>>8|0)&255,a=(x|0)&255,n=(t*255|0)&255;return(n<<24|a<<16|p<<8|o)>>>0},getFloatsFromUintRGB:function(x){var t=(x>>16|0)&255,o=(x>>8|0)&255,p=(x|0)&255;return[t/255,o/255,p/255]}
4705,checkShaderMax:function(x,t){var o=Math.min(16,x.getParameter(x.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?o:Math.min(o,t)},parseFragmentShaderMaxTextures:function(x,t){if(!x)return"";for(var o="",p=0;p<t;p++)p>0&&(o+=`
4706	else `),p<t-1&&(o+="if (outTexId < "+p+".5)"),o+=`
4707	{`,o+=`
4708		texture = texture2D(uMainSampler[`+p+"], outTexCoord);",o+=`
4709	}`;return x=x.replace(/%count%/gi,t.toString()),x.replace(/%forloop%/gi,o)},setGlowQuality:function(x,t,o,p){return o===void 0&&(o=t.config.glowFXQuality),p===void 0&&(p=t.config.glowFXDistance),x=x.replace(/__SIZE__/gi,(1/o/p).toFixed(7)),x=x.replace(/__DIST__/gi,p.toFixed(0)+".0"),x}}},29100:(c,x,t)=>{/**
4710 * @author       Richard Davey <[email protected]>
4711 * @copyright    2013-2025 Phaser Studio Inc.
4712 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4713 */var o=t(83419),p=t(62644),a=t(50792),n=t(77085),r=t(95540),e=t(37867),s=t(92503),h=t(32302),i=t(70554),l=t(38683),u=new o({Extends:a,initialize:function(f){a.call(this);var v=f.game,m=v.renderer,y=m.gl;this.name=r(f,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=y,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=r(f,"topology",y.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=r(f,"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=f,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=r(f,"resizeUniform","")},boot:function(){var d,f=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var y=this.renderTargets,g=r(v,"renderTarget",!1);typeof g=="boolean"&&g&&(g=1);var T=m.width,S=m.height;if(typeof g=="number")for(d=0;d<g;d++)y.push(new h(m,T,S,1,0,!0));else if(Array.isArray(g))for(d=0;d<g.length;d++){var E=r(g[d],"scale",1),M=r(g[d],"minFilter",0),F=r(g[d],"autoClear",1),A=r(g[d],"autoResize",!1),P=r(g[d],"width",null),L=r(g[d],"height",P);P?y.push(new h(m,P,L,1,M,F,A)):y.push(new h(m,T,S,E,M,F,A))}y.length&&(this.currentRenderTarget=y[0]),this.setShadersFromConfig(v);var O=this.shaders,G=0;for(d=0;d<O.length;d++)O[d].vertexSize>G&&(G=O[d].vertexSize);var z=r(v,"batchSize",m.config.batchSize);this.vertexCapacity=z*6;var Y=new ArrayBuffer(this.vertexCapacity*G);this.vertexData=Y,this.bytes=new Uint8Array(Y),this.vertexViewF32=new Float32Array(Y),this.vertexViewU32=new Uint32Array(Y);var X=r(v,"vertices",null);for(X?(this.vertexViewF32.set(X),this.vertexBuffer=m.createVertexBuffer(Y,f.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(Y.byteLength,f.DYNAMIC_DRAW),this.setVertexBuffer(),d=O.length-1;d>=0;d--)O[d].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(n.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(d,f,v){var m=this.renderer;if(d!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var y=this.setVertexBuffer(v);y&&!f&&(f=!0),d.bind(f,!1),this.currentShader=d}return this},getShaderByName:function(d){for(var f=this.shaders,v=0;v<f.length;v++)if(f[v].name===d)return f[v]},setShadersFromConfig:function(d){var f,v=this.shaders,m=this.renderer;for(f=0;f<v.length;f++)v[f].destroy();var y="vertShader",g="fragShader",T="attributes",S=r(d,y,null),E=i.parseFragmentShaderMaxTextures(r(d,g,null),m.maxTextures),M=r(d,T,null),F=r(d,"shaders",[]),A=F.length;if(A===0)S&&E&&(this.shaders=[new l(this,"default",S,E,p(M))]);else{var P=[];for(f=0;f<A;f++){var L=F[f],O,G,z,Y;if(typeof L=="string"?(O="default",G=S,z=i.parseFragmentShaderMaxTextures(L,m.maxTextures),Y=M):(O=r(L,"name","default"),G=r(L,y,S),z=i.parseFragmentShaderMaxTextures(r(L,g,E),m.maxTextures),Y=r(L,T,M)),O==="default"){var X=z.split(`
4714`),I=X[0].trim();I.indexOf("#define SHADER_NAME")>-1&&(O=I.substring(20))}G&&z&&P.push(new l(this,O,G,z,p(Y)))}this.shaders=P}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(d){return this.currentBatch={start:this.vertexCount,count:0,texture:[d],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=d,this.batch.push(this.currentBatch),0},addTextureToBatch:function(d){var f=this.currentBatch;f&&(f.texture.push(d),f.unit++,f.maxUnit++)},pushBatch:function(d){if(!this.currentBatch||this.forceZero&&d!==this.currentTexture)return this.createBatch(d);if(d===this.currentTexture)return this.currentUnit;var f=this.currentBatch,v=f.texture.indexOf(d);return v===-1?f.texture.length===this.renderer.maxTextures?this.createBatch(d):(f.unit++,f.maxUnit++,f.texture.push(d),this.currentUnit=f.unit,this.currentTexture=d,f.unit):(this.currentUnit=v,this.currentTexture=d,v)},setGameObject:function(d,f){return f===void 0&&(f=d.frame),this.pushBatch(f.source.glTexture)},shouldFlush:function(d){return d===void 0&&(d=0),this.vertexCount+d>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(d,f){(d!==this.width||f!==this.height)&&this.flush(),this.width=d,this.height=f;for(var v=this.renderTargets,m=0;m<v.length;m++)v[m].resize(d,f);return this.setProjectionMatrix(d,f),this.resizeUniform&&this.set2f(this.resizeUniform,d,f),this.emit
4714(n.RESIZE,d,f,this),this.onResize(d,f),this},setProjectionMatrix:function(d,f){var v=this.projectionMatrix;if(!v)return this;this.projectionWidth=d,this.projectionHeight=f,v.ortho(0,d,f,0,-1e3,1e3);for(var m=this.shaders,y="uProjectionMatrix",g=0;g<m.length;g++){var T=m[g];T.hasUniform(y)&&(T.resetUniform(y),T.setMatrix4fv(y,!1,v.val,T))}return this},flipProjectionMatrix:function(d){d===void 0&&(d=!0);var f=this.projectionMatrix;if(!f)return this;var v=this.projectionWidth,m=this.projectionHeight;d?f.ortho(0,v,0,m,-1e3,1e3):f.ortho(0,v,m,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,f.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var d=this.renderer.projectionWidth,f=this.renderer.projectionHeight;(this.projectionWidth!==d||this.projectionHeight!==f)&&this.setProjectionMatrix(d,f)}},bind:function(d){if(d===void 0&&(d=this.currentShader),this.glReset)return this.rebind(d);var f=!1,v=this.gl;return v.getParameter(v.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(v.bindBuffer(v.ARRAY_BUFFER,this.vertexBuffer.webGLBuffer),this.activeBuffer=this.vertexBuffer,f=!0),d.bind(f),this.currentShader=d,this.activeTextures.length=0,this.emit(n.BIND,this,d),this.onActive(d),this},rebind:function(d){this.activeBuffer=null,this.setVertexBuffer();for(var f=this.shaders,v=f.length-1;v>=0;v--){var m=f[v].rebind();(!d||m===d)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(n.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var d=this.shaders,f=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,f&&this.setVertexBuffer();for(var v=0;v<d.length;v++){var m=d[v];m.syncUniforms(),f&&m.rebind()}},setVertexBuffer:function(d){if(d===void 0&&(d=this.vertexBuffer),d!==this.activeBuffer){var f=this.gl;return this.gl.bindBuffer(f.ARRAY_BUFFER,d.webGLBuffer),this.activeBuffer=d,!0}return!1},preBatch:function(d){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(d),this},postBatch:function(d){return this.onDraw(this.currentRenderTarget),this.onPostBatch(d),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(d){if(d===void 0&&(d=!1),this.vertexCount>0){this.emit(n.BEFORE_FLUSH,this,d),this.onBeforeFlush(d);var f=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,y=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.DYNAMIC_DRAW):f.bufferSubData(f.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var g,T,S,E=this.batch,M=this.activeTextures;if(this.forceZero)for(M[0]||f.activeTexture(f.TEXTURE0),g=0;g<E.length;g++)T=E[g],S=T.texture[0],M[0]!==S&&(f.bindTexture(f.TEXTURE_2D,S.webGLTexture),M[0]=S),f.drawArrays(y,T.start,T.count);else for(g=0;g<E.length;g++){T=E[g];for(var F=0;F<=T.maxUnit;F++)S=T.texture[F],M[F]!==S&&(f.activeTexture(f.TEXTURE0+F),f.bindTexture(f.TEXTURE_2D,S.webGLTexture),M[F]=S);f.drawArrays(y,T.start,T.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(n.AFTER_FLUSH,this,d),this.onAfterFlush(d)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(d,f,v,m,y,g,T){var S=this.vertexViewF32,E=this.vertexViewU32,M=this.vertexCount*this.currentShader.vertexComponentCount-1;S[++M]=d,S[++M]=f,S[++M]=v,S[++M]=m,S[++M]=y,S[++M]=g,E[++M]=T,this.vertexCount++,this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchQuad:function(d,f,v,m,y,g,T,S,E,M,F,A,P,L,O,G,z,Y,X,I){I===void 0&&(I=this.currentUnit);var U=!1;this.shouldFlush(6)&&(this.flush(),U=!0),this.currentBatch||(I=this.setTexture2D(X));var D=this.vertexViewF32,V=this.vertexViewU32,B=this.vertexCount*this.currentShader.vertexComponentCount-1;return D[++B]=f,D[++B]=v,D[++B]=M,D[++B]=F,D[++B]=I,D[++B]=Y,V[++B]=L,D[++B]=m,D[++B]=y,D[++B]=M,D[++B]=P,D[++B]=I,D[++B]=Y,V[++B]=G,D[++B]=g,D[++B]=T,D[++B]=A,D[++B]=P,D[++B]=I,D[++B]=Y,V[++B]=z,D[++B]=f,D[++B]=v,D[++B]=M,D[++B]=F,D[++B]=I,D[++B]=Y,V[++B]=L,D[++B]=g,D[++B]=T,D[++B]=A,D[++B]=P,D[++B]=I,D[++B]=Y,V[++B]=z,D[++B]=S,D[++B]=E,D[++B]=A,D[++B]=F,D[++B]=I,D[++B]=Y,V[++B]=O,this.vertexCount+=6,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(d),U},batchTri:function(d,f,v,m,y,g,T,S,E,M,F,A,P,L,O,G,z){z===void 0&&(z=this.currentUnit);var Y=!1;this.shouldFlush(3)&&(this.flush(),Y=!0),this.currentBatch||(z=this.setTexture2D(G));var X=this.vertexViewF32,I=this.vertexViewU32,U=this.vertexCount*this.currentShader.vertexComponentCount-1;return X[++U]=f,X[++U]=v,X[++U]=S,X[++U]=E,X[++U]=z,X[++U]=O,I[++U]=A,X[++U]=m,X[++U]=y,X[++U]=S,X[++U]=F,X[++U]=z,X[++U]=O,I[++U]=P,X[++U]=g,X[++U]=T,X[++U]=M,X[++U]=F,X[++U]=z,X[++U]=O,I[++U]=L,this.vertexCount+=3,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(d),Y},drawFillRect:function(d,f,v,m,y,g,T,S){T===void 0&&(T=this.renderer.whiteTexture),S===void 0&&(S=!0),d=Math.floor(d),f=Math.floor(f);var E=Math.floor(d+v),M=Math.floor(f+m),F=this.setTexture2D(T),A=i.getTintAppendFloatAlphaAndSwap(y,g),P=0,L=0,O=1,G=1;S&&(L=1,G=0),this.batchQuad(null,d,f,d,M,E,M,E,f,P,L,O,G,A,A,A,A,0,T,F)},setTexture2D:function(d){return d===void 0&&(d=this.renderer.whiteTexture),this.pushBatch(d)},bindTexture:function(d,f){f===void 0&&(f=0);var v=this.gl;return v.activeTexture(v.TEXTURE0+f),v.bindTexture(v.TEXTURE_2D,d.webGLTexture),this},bindRenderTarget:function(d,f){return this.bindTexture(d.texture,f)},setTime:function(d,f){return this.set1f(d,this.game.loop.getDuration(),f),this},setBoolean:function(d,f,v){return v===void 0&&(v=this.currentShader),v.setBoolean(d,f),this},set1f:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set1f(d,f),this},set2f:function(d,f,v,m){return m===void 0&&(m=this.currentShader),m.set2f(d,f,v),this},set3f:function(d,f,v,m,y){return y===void 0&&(y=this.currentShader),y.set3f(d,f,v,m),this},set4f:function(d,f,v,m,y,g){return g===void 0&&(g=this.currentShader),g.set4f(d,f,v,m,y),this},set1fv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set1fv(d,f),this},set2fv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set2fv(d,f),this},set3fv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set3fv(d,f),this},set4fv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set4fv(d,f),this},set1iv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set1iv(d,f),this},set2iv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set2iv(d,f),this},set3iv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set3iv(d,f),this},set4iv:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set4iv(d,f),this},set1i:function(d,f,v){return v===void 0&&(v=this.currentShader),v.set1i(d,f),this},set2i:function(d,f,v,m){return m===void 0&&(m=this.currentShader),m.set2i(d,f,v),this},set3i:function(d,f,v,m,y){return y===void 0&&(y=this.currentShader),y.set3i(d,f,v,m),this},set4i:function(d,f,v,m,y,g){return g===void 0&&(g=this.currentShader),g.set4i(d,f,v,m,y),this},setMatrix2fv:function(d,f,v,m){return m===void 0&&(m=this.currentShader),m.setMatr
4714ix2fv(d,f,v),this},setMatrix3fv:function(d,f,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix3fv(d,f,v),this},setMatrix4fv:function(d,f,v,m){return m===void 0&&(m=this.currentShader),m.setMatrix4fv(d,f,v),this},destroy:function(){this.emit(n.DESTROY,this);var d,f=this.shaders;for(d=0;d<f.length;d++)f[d].destroy();var v=this.renderTargets;for(d=0;d<v.length;d++)v[d].destroy();var m=this.renderer;return m.deleteBuffer(this.vertexBuffer),m.off(s.RESIZE,this.resize,this),m.off(s.PRE_RENDER,this.onPreRender,this),m.off(s.RENDER,this.onRender,this),m.off(s.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this.activeTextures=null,this}});c.exports=u},74797:(c,x,t)=>{/**
4715 * @author       Richard Davey <[email protected]>
4716 * @author       Felipe Alfonso <@bitnenfer>
4717 * @copyright    2013-2025 Phaser Studio Inc.
4718 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4719 */var o=t(95428),p=t(72905),a=t(19715),n=t(83419),r=t(8054),e=t(50792),s=t(92503),h=t(50030),i=t(37867),l=t(29747),u=t(7530),d=t(32302),f=t(97480),v=t(69442),m=t(70554),y=t(88815),g=t(26128),T=t(1482),S=t(82751),E=t(84387),M=t(93567),F=t(57183),A=new n({Extends:e,initialize:function(L){e.call(this);var O=L.config,G={alpha:O.transparent,desynchronized:O.desynchronized,depth:!0,antialias:O.antialiasGL,premultipliedAlpha:O.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:O.failIfMajorPerformanceCaveat,powerPreference:O.powerPreference,preserveDrawingBuffer:O.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:O.clearBeforeRender,antialias:O.antialias,backgroundColor:O.backgroundColor,contextCreation:G,roundPixels:O.roundPixels,maxTextures:O.maxTextures,maxTextureSize:O.maxTextureSize,batchSize:O.batchSize,maxLights:O.maxLights,mipmapFilter:O.mipmapFilter},this.game=L,this.type=r.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=L.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=l,this.contextRestoredHandler=l,this.previousContextLostHandler=l,this.previousContextRestoredHandler=l,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(P){var L,O=this.game,G=this.canvas,z=P.backgroundColor;if(O.config.context?L=O.config.context:L=G.getContext("webgl",P.contextCreation)||G.getContext("experimental-webgl",P.contextCreation),!L||L.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=L,this.setExtensions(),this.setContextHandlers(),O.context=L;for(var Y=0;Y<=27;Y++)this.blendModes.push({func:[L.ONE,L.ONE_MINUS_SRC_ALPHA],equation:L.FUNC_ADD});this.blendModes[1].func=[L.ONE,L.DST_ALPHA],this.blendModes[2].func=[L.DST_COLOR,L.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[L.ONE,L.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[L.ZERO,L.ONE_MINUS_SRC_ALPHA],equation:L.FUNC_REVERSE_SUBTRACT},this.glFormats=[L.BYTE,L.SHORT,L.UNSIGNED_BYTE,L.UNSIGNED_SHORT,L.FLOAT],this.glFuncMap={mat2:{func:L.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:L.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:L.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:L.uniform1f,length:1},"1fv":{func:L.uniform1fv,length:1},"1i":{func:L.uniform1i,length:1},"1iv":{func:L.uniform1iv,length:1},"2f":{func:L.uniform2f,length:2},"2fv":{func:L.uniform2fv,length:1},"2i":{func:L.uniform2i,length:2},"2iv":{func:L.uniform2iv,length:1},"3f":{func:L.uniform3f,length:3},"3fv":{func:L.uniform3fv,length:1},"3i":{func:L.uniform3i,length:3},"3iv":{func:L.uniform3iv,length:1},"4f":{func:L.uniform4f,length:4},"4fv":{func:L.uniform4fv,length:1},"4i":{func:L.uniform4i,length:4},"4iv":{func:L.uniform4iv,length:1}},(!P.maxTextures||P.maxTextures===-1)&&(P.maxTextures=L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS)),P.maxTextureSize||(P.maxTextureSize=L.getParameter(L.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),L.disable(L.DEPTH_TEST),L.disable(L.CULL_FACE),L.enable(L.BLEND),L.clearColor(z.redGL,z.greenGL,z.blueGL,z.alphaGL),L.clear(L.COLOR_BUFFER_BIT);var X=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return X.indexOf(P.mipmapFilter)!==-1&&(this.mipmapFilter=L[P.mipmapFilter]),this.maxTextures=m.checkSha
4719derMax(L,P.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new u(this),this.setBlendMode(r.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),O.textures.once(v.READY,this.boot,this),this},boot:function(){var P=this.game,L=this.pipelines,O=P.scale.baseSize,G=O.width,z=O.height;this.width=G,this.height=z,this.isBooted=!0,this.renderTarget=new d(this,G,z,1,0,!0,!0),this.maskTarget=new d(this,G,z,1,0,!0,!0),this.maskSource=new d(this,G,z,1,0,!0,!0);var Y=P.config;L.boot(Y.pipeline,Y.defaultPipeline,Y.autoMobilePipeline),this.blankTexture=P.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=P.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=P.textures.getFrame("__WHITE").glTexture;var X=this.gl;X.bindFramebuffer(X.FRAMEBUFFER,null),X.enable(X.SCISSOR_TEST),P.scale.on(f.RESIZE,this.onResize,this),this.resize(G,z)},setExtensions:function(){var P=this.gl,L=P.getSupportedExtensions();this.supportedExtensions=L;var O="ANGLE_instanced_arrays";this.instancedArraysExtension=L.indexOf(O)>-1?P.getExtension(O):null;var G="OES_vertex_array_object";this.vaoExtension=L.indexOf(G)>-1?P.getExtension(G):null},setContextHandlers:function(P,L){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof P=="function"?this.contextLostHandler=P.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof L=="function"?this.contextRestoredHandler=L.bind(this):this.contextRestoredHandler=this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(P){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(s.LOSE_WEBGL,this),P.preventDefault()},dispatchContextRestored:function(P){var L=this.gl;if(L.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(r.BlendModes.NORMAL),L.disable(L.BLEND),L.disable(L.DEPTH_TEST),L.enable(L.CULL_FACE),this.compression=this.getCompressedTextures();var O=function(G){G.createResource()};o(this.glTextureWrappers,O),o(this.glBufferWrappers,O),o(this.glFramebufferWrappers,O),o(this.glProgramWrappers,O),o(this.glAttribLocationWrappers,O),o(this.glUniformLocationWrappers,O),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(s.RESTORE_WEBGL,this),P.preventDefault()},createTemporaryTextures:function(){for(var P=this.gl,L=0;L<this.maxTextures;L++){var O=P.createTexture();P.activeTexture(P.TEXTURE0+L),P.bindTexture(P.TEXTURE_2D,O),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,1,1,0,P.RGBA,P.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),this.textureIndexes.push(L)}},captureFrame:function(P,L){},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(P,L,O){},stopCapture:function(){},onCapture:function(P){},onResize:function(P,L){(L.width!==this.width||L.height!==this.height)&&this.resize(L.width,L.height)},beginCapture:function(P,L){P===void 0&&(P=this.width),L===void 0&&(L=this.height),this.renderTarget.bind(!0,P,L),this.setProjectionMatrix(P,L)},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(P,L){var O=this.gl;return this.width=P,this.height=L,this.setProjectionMatrix(P,L),O.viewport(0,0,P,L),this.drawingBufferHeight=O.drawingBufferHeight,O.scissor(0,O.drawingBufferHeight-L,P,L),this.defaultScissor[2]=P,this.defaultScissor[3]=L,this.emit
4719(s.RESIZE,P,L),this},getCompressedTextures:function(){var P="WEBGL_compressed_texture_",L="WEBKIT_"+P,O="EXT_texture_compression_",G=function(Y,X){var I=Y.getExtension(P+X)||Y.getExtension(L+X)||Y.getExtension(O+X);if(I){var U={};for(var D in I)U[I[D]]=D;return U}},z=this.gl;return{ETC:G(z,"etc"),ETC1:G(z,"etc1"),ATC:G(z,"atc"),ASTC:G(z,"astc"),BPTC:G(z,"bptc"),RGTC:G(z,"rgtc"),PVRTC:G(z,"pvrtc"),S3TC:G(z,"s3tc"),S3TCSRGB:G(z,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(P,L){var O=this.compression[P.toUpperCase()];if(L in O)return O[L]},supportsCompressedTexture:function(P,L){var O=this.compression[P.toUpperCase()];return O?L?L in O:!0:!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(P,L){return(P!==this.projectionWidth||L!==this.projectionHeight)&&(this.projectionWidth=P,this.projectionHeight=L,this.projectionMatrix.ortho(0,P,L,0,-1e3,1e3)),this},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(P){return this.supportedExtensions?this.supportedExtensions.indexOf(P):!1},getExtension:function(P){return this.hasExtension(P)?(P in this.extensions||(this.extensions[P]=this.gl.getExtension(P)),this.extensions[P]):null},flush:function(){this.pipelines.flush()},pushScissor:function(P,L,O,G,z){z===void 0&&(z=this.drawingBufferHeight);var Y=this.scissorStack,X=[P,L,O,G];return Y.push(X),this.setScissor(P,L,O,G,z),this.currentScissor=X,X},setScissor:function(P,L,O,G,z){z===void 0&&(z=this.drawingBufferHeight);var Y=this.gl,X=this.currentScissor,I=O>0&&G>0;if(X&&I){var U=X[0],D=X[1],V=X[2],B=X[3];I=U!==P||D!==L||V!==O||B!==G}I&&(this.flush(),Y.scissor(P,z-L-G,O,G))},resetScissor:function(){var P=this.gl;P.enable(P.SCISSOR_TEST);var L=this.currentScissor;if(L){var O=L[0],G=L[1],z=L[2],Y=L[3];z>0&&Y>0&&P.scissor(O,this.drawingBufferHeight-G-Y,z,Y)}},popScissor:function(){var P=this.scissorStack;P.pop();var L=P[P.length-1];L&&this.setScissor(L[0],L[1],L[2],L[3]),this.currentScissor=L},hasActiveStencilMask:function(){var P=this.currentMask.mask,L=this.currentCameraMask.mask;return P&&P.isStencil||L&&L.isStencil},resetViewport:function(){var P=this.gl;P.viewport(0,0,this.width,this.height),this.drawingBufferHeight=P.drawingBufferHeight},setBlendMode:function(P,L){L===void 0&&(L=!1);var O=this.gl,G=this.blendModes[P];return L||P!==r.BlendModes.SKIP_CHECK&&this.currentBlendMode!==P?(this.flush(),O.enable(O.BLEND),O.blendEquation(G.equation),G.func.length>2?O.blendFuncSeparate(G.func[0],G.func[1],G.func[2],G.func[3]):O.blendFunc(G.func[0],G.func[1]),this.currentBlendMode=P,!0):!1},addBlendMode:function(P,L){var O=this.blendModes.push({func:P,equation:L});return O-1},updateBlendMode:function(P,L,O){return this.blendModes[P]&&(this.blendModes[P].func=L,O&&(this.blendModes[P].equation=O)),this},removeBlendMode:function(P){return P>17&&this.blendModes[P]&&this.blendModes.splice(P,1),this},pushFramebuffer:function(P,L,O,G,z){return P===this.currentFramebuffer?this:(this.fboStack.push(P),this.setFramebuffer(P,L,O,G,z))},setFramebuffer:function(P,L,O,G,z){if(L===void 0&&(L=!1),O===void 0&&(O=!0),G===void 0&&(G=null),z===void 0&&(z=!1),P===this.currentFramebuffer)return this;var Y=this.gl,X=this.width,I=this.height;return P&&P.renderTexture&&O?(X=P.renderTexture.width,I=P.renderTexture.height):this.flush(),P?Y.bindFramebuffer(Y.FRAMEBUFFER,P.webGLFramebuffer):Y.bindFramebuffer(Y.FRAMEBUFFER,null),O&&Y.viewport(0,0,X,I),G&&Y.framebufferTexture2D(Y.FRAMEBUFFER,Y.COLOR_ATTACHMENT0,Y.TEXTURE_2D,G.webGLTexture,0),z&&(Y.clearColor(0,0,0,0),Y.clear(Y.COLOR_BUFFER_BIT)),L&&(P?(this.drawingBufferHeight=I,this.pushScissor(0,0,X,I)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=P,this},popFramebuffer:function(P,L){P===void 0&&(P=!1),L===void 0&&(L=!0);var O=this.fboStack;O.pop();var G=O[O.length-1];return G||(G=null),this.setFramebuffer(G,P,L),G},restoreFramebuffer:function(P,L){P===void 0&&(P=!1),L===void 0&&(L=!0);var O=this.fboStack,G=O[O.length-1];G||(G=null),this.currentFramebuffer=null,this.setFramebuffer(G,P,L)},setProgram:function(P){return P!==this.currentProgram?(this.flush(),this.gl.useProgram(P.webGLProgram),this.currentProgram=P,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(P,L,O,G,z){z===void 0&&(z=!1);var Y=this.gl,X=Y.NEAREST,I=Y.NEAREST,U=Y.CLAMP_TO_EDGE,D=null;L=P?P.width:L,O=P?P.height:O;var V=h(L,O);if(V&&!z&&(U=Y.REPEAT),G===r.ScaleModes.LINEAR&&this.config.antialias){var B=P&&P.compressed,W=!B&&V||B&&P.mipmaps.length>1;X=this.mipmapFilter&&W?this.mipmapFilter:Y.LINEAR,I=Y.LINEAR}return!P&&typeof L=="number"&&typeof O=="number"?D=this.createTexture2D(0,X,I,U,U,Y.RGBA,null,L,O):D=this.createTexture2D(0,X,I,U,U,Y.RGBA,P),D},createTexture2D:function(P,L,O,G,z,Y,X,I,U,D,V,B){typeof I!="number"&&(I=X?X.width:1),typeof U!="number"&&(U=X?X.height:1);var W=new S(this.gl,P,L,O,G,z,Y,X,I,U,D,V,B);return this.glTextureWrappers.push(W),W},createFramebuffer:function(P,L,O,G){this.currentFramebuffer=null;var z=new E(this.gl,P,L,O,G);return this.glFramebufferWrappers.push(z),z},beginBitmapMask:function(P,L){var O=this.gl;O&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==P&&(this.currentMask.mask=P,this.currentMask.camera=L))},drawBitmapMask:function(P,L,O){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),P.renderWebGL(this,P,L),this.maskSource.unbind(!0),this.maskTarget.unbind();var G=this.gl,z=this.getCurrentStencilMask();z?(G.enable(G.STENCIL_TEST),z.mask.applyStencil(this,z.camera,!0)):this.currentMask.mask=null,this.pipelines.set(O),G.activeTexture(G.TEXTURE0),G.bindTexture(G.TEXTURE_2D,this.maskTarget.texture.webGLTexture),G.activeTexture(G.TEXTURE1),G.bindTexture(G.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(P,L){var O=new T(this.gl,P,L);return this.glProgramWrappers.push(O),O},createVertexBuffer:function(P,L){var O=this.gl,G=new g(O,P,O.ARRAY_BUFFER,L);return this.glBufferWrappers.push(G),G},createAttribLocation:function(P,L){var O=new M(this.gl,P,L);return this.glAttribLocationWrappers.push(O),O},createUniformLocation:function(P,L){var O=new F(this.gl,P,L);return this.glUniformLocationWrappers.push(O),O},createIndexBuffer:function(P,L){var O=this.gl,G=new g(O,P,O.ELEMENT_ARRAY_BUFFER,L);return this.glBufferWrappers.push(G),G},deleteTexture:function(P){if(P)return p(this.glTextureWrappers,P),P.destroy(),this},deleteFramebuffer:function(P){return P?(p(this.fboStack,P),p(this.glFramebufferWrappers,P),P.destroy(),this):this},deleteProgram:function(P){return P&&(p(this.glProgramWrappers,P),P.destroy()),this},deleteAttribLocation:function(P){return P&&(p(this.glAttribLocationWrappers,P),P.destroy()),this},deleteUniformLocation:function(P){return P&&(p(this.glUniformLocationWrappers,P),P.destroy()),this},deleteBuffer:function(P){return P?(p(this.glBufferWrappers,P),P.destroy(),this):this},preRenderCamera:function(P){var L=P.x,O=P.y,G=P.width,z=P.height,Y=P.backgroundColor;if(P.emit(a.PRE_RENDER,P),this.pipelines.preBatchCamera(P),this.pushScissor(L,O,G,z),P.mask&&(this.currentCameraMask.mask=P.mask,this.currentCameraMask.camera=P._maskCamera,P.mask.preRenderWebGL(this,P,P._maskCamera)),Y.alphaGL>0){var X=this.pipelines.setMulti();X.drawFillRect(L,O,G,z,m.getTintFromFloats(Y.blueGL,Y.greenGL,Y.redGL,1),Y.alphaGL)}},getCurrentStencilMask:function(){var P=null,L=this.maskStack,O=this.currentCameraMask;return L.length>0?P=L[L.length-1]:O.mask&&O.mask.isStencil&&(P=O),P},postRenderCamera:function(P){var L=P.flashEffect,O=P.fadeEffect;if(L.isRunning||O.isRunning||O.isComplete){var G=this.pipelines.setMulti();L.postRenderWebGL(G,m.getTintFromFloats),O.postRenderWebGL(G,m.getTintFromFloats)}P.dirty=!1,this.popScissor(),P.mask&&(this.currentCameraMask.mask=null,P.mask.postRenderWebGL(this,P._maskCamera)),this.pipelines.postBatchCamera(P),P.emit(a.POST_RENDER,P)},preRender:function(){if(!this.contextLost){var P=this.gl;
4719if(P.bindFramebuffer(P.FRAMEBUFFER,null),this.emit(s.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var L=this.config.backgroundColor;P.clearColor(L.redGL,L.greenGL,L.blueGL,L.alphaGL),P.clear(P.COLOR_BUFFER_BIT|P.DEPTH_BUFFER_BIT|P.STENCIL_BUFFER_BIT)}P.enable(P.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&P.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(P,L,O){if(!this.contextLost){var G=L.length;if(this.emit(s.RENDER,P,O),this.preRenderCamera(O),G===0){this.setBlendMode(r.BlendModes.NORMAL),this.postRenderCamera(O);return}this.currentType="";for(var z=this.currentMask,Y=0;Y<G;Y++){this.finalType=Y===G-1;var X=L[Y],I=X.mask;z=this.currentMask,z.mask&&z.mask!==I&&z.mask.postRenderWebGL(this,z.camera),I&&z.mask!==I&&I.preRenderWebGL(this,X,O),X.blendMode!==this.currentBlendMode&&this.setBlendMode(X.blendMode);var U=X.type;U!==this.currentType&&(this.newType=!0,this.currentType=U),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=L[Y+1].type===this.currentType,X.renderWebGL(this,X,O),this.newType=!1}z=this.currentMask,z.mask&&z.mask.postRenderWebGL(this,z.camera),this.setBlendMode(r.BlendModes.NORMAL),this.postRenderCamera(O)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(s.POST_RENDER);var P=this.snapshotState;P.callback&&(y(this.gl,P),P.callback=null)}},clearStencilMask:function(){this.gl.disable(this.gl.STENCIL_TEST)},restoreStencilMask:function(){var P=this.gl,L=this.getCurrentStencilMask();if(L){var O=L.mask;P.enable(P.STENCIL_TEST),O.invertAlpha?P.stencilFunc(P.NOTEQUAL,O.level,255):P.stencilFunc(P.EQUAL,O.level,255)}},snapshot:function(P,L,O){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,P,L,O)},snapshotArea:function(P,L,O,G,z,Y,X){var I=this.snapshotState;return I.callback=z,I.type=Y,I.encoder=X,I.getPixel=!1,I.x=P,I.y=L,I.width=O,I.height=G,this},snapshotPixel:function(P,L,O){return this.snapshotArea(P,L,1,1,O),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(P,L,O,G,z,Y,X,I,U,D,V){z===void 0&&(z=!1),Y===void 0&&(Y=0),X===void 0&&(X=0),I===void 0&&(I=L),U===void 0&&(U=O),D==="pixel"&&(z=!0,D="image/png");var B=this.currentFramebuffer;this.snapshotArea(Y,X,I,U,G,D,V);var W=this.snapshotState;return W.getPixel=z,W.isFramebuffer=!0,W.bufferWidth=L,W.bufferHeight=O,W.width=Math.min(W.width,L),W.height=Math.min(W.height,O),this.setFramebuffer(P),y(this.gl,W),this.setFramebuffer(B),W.callback=null,W.isFramebuffer=!1,this},canvasToTexture:function(P,L,O,G){O===void 0&&(O=!1),G===void 0&&(G=!1);var z=this.gl,Y=z.NEAREST,X=z.NEAREST,I=P.width,U=P.height,D=z.CLAMP_TO_EDGE,V=h(I,U);return!O&&V&&(D=z.REPEAT),this.config.antialias&&(Y=V&&this.mipmapFilter?this.mipmapFilter:z.LINEAR,X=z.LINEAR),L?(L.update(P,I,U,G,D,D,Y,X,L.format),L):this.createTexture2D(0,Y,X,D,D,z.RGBA,P,I,U,!0,!1,G)},createCanvasTexture:function(P,L,O){return L===void 0&&(L=!1),O===void 0&&(O=!1),this.canvasToTexture(P,null,L,O)},updateCanvasTexture:function(P,L,O,G){return O===void 0&&(O=!1),G===void 0&&(G=!1),this.canvasToTexture(P,L,G,O)},videoToTexture:function(P,L,O,G){O===void 0&&(O=!1),G===void 0&&(G=!1);var z=this.gl,Y=z.NEAREST,X=z.NEAREST,I=P.videoWidth,U=P.videoHeight,D=z.CLAMP_TO_EDGE,V=h(I,U);return!O&&V&&(D=z.REPEAT),this.config.antialias&&(Y=V&&this.mipmapFilter?this.mipmapFilter:z.LINEAR,X=z.LINEAR),L?(L.update(P,I,U,G,D,D,Y,X,L.format),L):this.createTexture2D(0,Y,X,D,D,z.RGBA,P,I,U,!0,!0,G)},createVideoTexture:function(P,L,O){return L===void 0&&(L=!1),O===void 0&&(O=!1),this.videoToTexture(P,null,L,O)},updateVideoTexture:function(P,L,O,G){return O===void 0&&(O=!1),G===void 0&&(G=!1),this.videoToTexture(P,L,G,O)},createUint8ArrayTexture:function(P,L,O){var G=this.gl,z=G.NEAREST,Y=G.NEAREST,X=G.CLAMP_TO_EDGE,I=h(L,O);return I&&(X=G.REPEAT),this.createTexture2D(0,z,Y,X,X,G.RGBA,P,L,O)},setTextureFilter:function(P,L){var O=this.gl,G=L===0?O.LINEAR:O.NEAREST;O.activeTexture(O.TEXTURE0);var z=O.getParameter(O.TEXTURE_BINDING_2D);return O.bindTexture(O.TEXTURE_2D,P.webGLTexture),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,G),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,G),P.minFilter=G,P.magFilter=G,z&&O.bindTexture(O.TEXTURE_2D,z),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var P=function(L){L.destroy()};o(this.glAttribLocationWrappers,P),o(this.glBufferWrappers,P),o(this.glFramebufferWrappers,P),o(this.glProgramWrappers,P),o(this.glTextureWrappers,P),o(this.glUniformLocationWrappers,P),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});c.exports=A},38683:(c,x,t)=>{/**
4720 * @author       Richard Davey <[email protected]>
4721 * @copyright    2013-2025 Phaser Studio Inc.
4722 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4723 */var o=t(83419),p=t(95428),a=t(95540),n=t(14500),r=new o({initialize:function(s,h,i,l,u){this.pipeline=s,this.name=h,this.renderer=s.renderer,this.gl=this.renderer.gl,this.fragSrc=l,this.vertSrc=i,this.program=this.renderer.createProgram(i,l),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(u),this.createUniforms()},createAttributes:function(e){var s=0,h=0,i=[];this.vertexComponentCount=0;for(var l=0;l<e.length;l++){var u=e[l],d=u.name,f=a(u,"size",1),v=a(u,"type",n.FLOAT),m=v.enum,y=v.size,g=!!u.normalized;i.push({name:d,size:f,type:m,normalized:g,offset:h,enabled:!1,location:-1}),y===4?s+=f:s++,h+=f*y}this.vertexSize=h,this.vertexComponentCount=s,this.attributes=i},bind:function(e,s){return e===void 0&&(e=!1),s===void 0&&(s=!1),s&&this.pipeline.flush(),this.renderer.setProgram(this.program),e&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(e){e===void 0&&(e=!1);for(var s=this.gl,h=this.renderer,i=this.vertexSize,l=this.attributes,u=this.program,d=0;d<l.length;d++){var f=l[d],v=f.size,m=f.type,y=f.offset,g=f.enabled,T=f.location,S=!!f.normalized;if(e){T!==-1&&h.deleteAttribLocation(T);var E=this.renderer.createAttribLocation(u,f.name);E.webGLAttribLocation>=0?(s.enableVertexAttribArray(E.webGLAttribLocation),s.vertexAttribPointer(E.webGLAttribLocation,v,m,S,i,y),f.enabled=!0,f.location=E):E.webGLAttribLocation!==-1&&s.disableVertexAttribArray(E.webGLAttribLocation)}else g?s.vertexAttribPointer(T.webGLAttribLocation,v,m,S,i,y):!g&&T!==-1&&T.webGLAttribLocation>-1&&(s.disableVertexAttribArray(T.webGLAttribLocation),f.location=-1)}return this},createUniforms:function(){var e=this.gl,s=this.program,h=this.uniforms,i,l,u,d=e.getProgramParameter(s.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i<d;i++){var f=e.getActiveUniform(s.webGLProgram,i);if(f){l=f.name,u=this.renderer.createUniformLocation(s,l),u!==null&&(h[l]={name:l,location:u,setter:null,value1:null,value2:null,value3:null,value4:null});var v=l.indexOf("[");v>0&&(l=l.substr(0,v),h.hasOwnProperty(l)||(u=this.renderer.createUniformLocation(s,l),u!==null&&(h[l]={name:l,location:u,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];
4723return s&&(s.value1=null,s.value2=null,s.value3=null,s.value4=null),this},setUniform1:function(e,s,h,i){var l=this.uniforms[s];return l?((i||l.value1!==h)&&(l.setter||(l.setter=e),l.value1=h,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,h),this.pipeline.currentShader=this),this):this},setUniform2:function(e,s,h,i,l){var u=this.uniforms[s];return u?((l||u.value1!==h||u.value2!==i)&&(u.setter||(u.setter=e),u.value1=h,u.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,h,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,s,h,i,l,u){var d=this.uniforms[s];return d?((u||d.value1!==h||d.value2!==i||d.value3!==l)&&(d.setter||(d.setter=e),d.value1=h,d.value2=i,d.value3=l,this.renderer.setProgram(this.program),e.call(this.gl,d.location.webGLUniformLocation,h,i,l),this.pipeline.currentShader=this),this):this},setUniform4:function(e,s,h,i,l,u,d){var f=this.uniforms[s];return f?((d||f.value1!==h||f.value2!==i||f.value3!==l||f.value4!==u)&&(f.setter||(f.setter=e),f.value1=h,f.value2=i,f.value3=l,f.value4=u,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,h,i,l,u),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,l){return this.setUniform4(this.gl.uniform4f,e,s,h,i,l)},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,l){return this.setUniform4(this.gl.uniform4i,e,s,h,i,l)},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;p(this.uniforms,function(s){e.deleteUniformLocation(s.location)}),this.uniforms=null,p(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}});c.exports=r},14500:c=>{/**
4724 * @author       Richard Davey <[email protected]>
4725 * @copyright    2013-2025 Phaser Studio Inc.
4726 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4727 */var x={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}};c.exports=x},4159:(c,x,t)=>{/**
4728 * @author       Richard Davey <[email protected]>
4729 * @copyright    2013-2025 Phaser Studio Inc.
4730 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4731 */var o=t(14500),p=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=p(!1,a,o),c.exports=a},31302:(c,x,t)=>{/**
4732 * @author       Richard Davey <[email protected]>
4733 * @author       Felipe Alfonso <@bitnenfer>
4734 * @copyright    2013-2025 Phaser Studio Inc.
4735 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4736 */var o=t(83419),p=t(95540),a=t(78908),n=t(85191),r=t(14500),e=t(29100),s=new o({Extends:e,initialize:function(i){i.fragShader=p(i,"fragShader",a),i.vertShader=p(i,"vertShader",n),i.batchSize=p(i,"batchSize",1),i.vertices=p(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=p(i,"attributes",[{name:"inPosition",size:2,type:r.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,l){this.renderer.beginBitmapMask(h,l)},endMask:function(h,i,l){var u=this.gl,d=this.renderer,f=h.bitmapMask;f&&u&&(d.drawBitmapMask(f,i,this),l&&this.set2f("uResolution",l.width,l.height),this.set1i("uInvertMaskAlpha",h.invertAlpha),u.drawArrays(this.topology,0,3),l&&this.set2f("uResolution",this.width,this.height),u.bindTexture(u.TEXTURE_2D,null))}});c.exports=s},92651:(c,x,t)=>{/**
4737 * @author       Richard Davey <[email protected]>
4738 * @copyright    2013-2025 Phaser Studio Inc.
4739 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4740 */var o=t(83419),p=t(58918),a=t(14811),n=t(95540),r=t(43558),e=t(89350),s=t(70554),h=new o({Extends:r,initialize:function(l){l.shaders=[s.setGlowQuality(e.FXGlowFrag,l.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],r.call(this,l);var u=this.game;this.glow=new p.Glow(u),this.shadow=new p.Shadow(u),this.pixelate=new p.Pixelate(u),this.vignette=new p.Vignette(u),this.shine=new p.Shine(u),this.gradient=new p.Gradient(u),this.circle=new p.Circle(u),this.barrel=new p.Barrel(u),this.wipe=new p.Wipe(u),this.bokeh=new p.Bokeh(u);var d=[];d[a.GLOW]=this.onGlow,d[a.SHADOW]=this.onShadow,d[a.PIXELATE]=this.onPixelate,d[a.VIGNETTE]=this.onVignette,d[a.SHINE]=this.onShine,d[a.BLUR]=this.onBlur,d[a.GRADIENT]=this.onGradient,d[a.BLOOM]=this.onBloom,d[a.COLOR_MATRIX]=this.onColorMatrix,d[a.CIRCLE]=this.onCircle,d[a.BARREL]=this.onBarrel,d[a.DISPLACEMENT]=this.onDisplacement,d[a.WIPE]=this.onWipe,d[a.BOKEH]=this.onBokeh,this.fxHandlers=d,this.source,this.target,this.swap},onDraw:function(i,l,u){this.source=i,this.target=l,this.swap=u;var d=i.width,f=i.height,v=this.tempSprite,m=this.fxHandlers;if(v&&v.preFX)for(var y=v.preFX.list,g=0;g<y.length;g++){var T=y[g];T.active&&m[T.type].call(this,T,d,f)}this.drawToGame(this.source)},runDraw:function(){var i=this.source,l=this.target;this.copy(i,l),this.source=l,this.target=i},onGlow:function(i,l,u){var d=this.shaders[a.GLOW];this.setShader(d),this.glow.onPreRender(i,d,l,u),this.runDraw()},onShadow:function(i){var l=this.shaders[a.SHADOW];this.setShader(l),this.shadow.onPreRender(i,l),this.runDraw()},onPixelate:function(i,l,u){var d=this.shaders[a.PIXELATE];this.setShader(d),this.pixelate.onPreRender(i,d,l,u),this.runDraw()}
4740,onVignette:function(i){var l=this.shaders[a.VIGNETTE];this.setShader(l),this.vignette.onPreRender(i,l),this.runDraw()},onShine:function(i,l,u){var d=this.shaders[a.SHINE];this.setShader(d),this.shine.onPreRender(i,d,l,u),this.runDraw()},onBlur:function(i,l,u){var d=n(i,"quality"),f=this.shaders[a.BLUR+d];this.setShader(f),this.set1i("uMainSampler",0),this.set2f("resolution",l,u),this.set1f("strength",n(i,"strength")),this.set3fv("color",n(i,"glcolor"));for(var v=n(i,"x"),m=n(i,"y"),y=n(i,"steps"),g=0;g<y;g++)this.set2f("offset",v,0),this.runDraw(),this.set2f("offset",0,m),this.runDraw()},onGradient:function(i){var l=this.shaders[a.GRADIENT];this.setShader(l),this.gradient.onPreRender(i,l),this.runDraw()},onBloom:function(i,l,u){var d=this.shaders[a.BLOOM];this.copySprite(this.source,this.swap),this.setShader(d),this.set1i("uMainSampler",0),this.set1f("strength",n(i,"blurStrength")),this.set3fv("color",n(i,"glcolor"));for(var f=2/l*n(i,"offsetX"),v=2/u*n(i,"offsetY"),m=n(i,"steps"),y=0;y<m;y++)this.set2f("offset",f,0),this.runDraw(),this.set2f("offset",0,v),this.runDraw();this.blendFrames(this.swap,this.source,this.target,n(i,"strength")),this.copySprite(this.target,this.source)},onColorMatrix:function(i){this.setShader(this.colorMatrixShader),this.set1fv("uColorMatrix",i.getData()),this.set1f("uAlpha",i.alpha),this.runDraw()},onCircle:function(i,l,u){var d=this.shaders[a.CIRCLE];this.setShader(d),this.circle.onPreRender(i,d,l,u),this.runDraw()},onBarrel:function(i){var l=this.shaders[a.BARREL];this.setShader(l),this.barrel.onPreRender(i,l),this.runDraw()},onDisplacement:function(i){this.setShader(this.shaders[a.DISPLACEMENT]),this.set1i("uDisplacementSampler",1),this.set2f("amount",i.x,i.y),this.bindTexture(i.glTexture,1),this.runDraw()},onWipe:function(i){var l=this.shaders[a.WIPE];this.setShader(l),this.wipe.onPreRender(i,l),this.runDraw()},onBokeh:function(i,l,u){var d=this.shaders[a.BOKEH];this.setShader(d),this.bokeh.onPreRender(i,d,l,u),this.runDraw()},destroy:function(){return this.glow.destroy(),this.shadow.destroy(),this.pixelate.destroy(),this.vignette.destroy(),this.shine.destroy(),this.gradient.destroy(),this.circle.destroy(),this.barrel.destroy(),this.wipe.destroy(),this.bokeh.destroy(),this.fxHandlers=null,this.source=null,this.target=null,this.swap=null,r.prototype.destroy.call(this),this}});c.exports=h},96569:(c,x,t)=>{/**
4741 * @author       Richard Davey <[email protected]>
4742 * @author       Felipe Alfonso <@bitnenfer>
4743 * @copyright    2013-2025 Phaser Studio Inc.
4744 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4745 */var o=t(83419),p=t(95540),a=t(31063),n=t(57516),r=t(61340),e=t(26099),s=t(29100),h=new o({Extends:n,initialize:function(l){var u=p(l,"fragShader",a);l.fragShader=u.replace("%LIGHT_COUNT%",l.game.renderer.config.maxLights),n.call(this,l),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 r,this._tempMatrix2=new r},boot:function(){s.prototype.boot.call(this)},onRender:function(i,l){var u=i.sys.lights;if(this.lightsActive=!1,!(!u||!u.active)){var d=u.getLights(l),f=d.length;this.lightsActive=!0;var v,m=this.renderer,y=m.height,g=l.matrix,T=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",l.x,l.y,l.rotation,l.zoom),this.set3f("uAmbientLightColor",u.ambientColor.r,u.ambientColor.g,u.ambientColor.b),this.set1i("uLightCount",f),v=0;v<f;v++){var S=d[v].light,E=S.color,M="uLights["+v+"].";g.transformPoint(S.x,S.y,T),this.set2f(M+"position",T.x-l.scrollX*S.scrollFactorX*l.zoom,y-(T.y-l.scrollY*S.scrollFactorY*l.zoom)),this.set3f(M+"color",E.r,E.g,E.b),this.set1f(M+"intensity",S.intensity),this.set1f(M+"radius",S.radius)}this.currentNormalMapRotation=null}},setNormalMapRotation:function(i){if(i!==this.currentNormalMapRotation||this.vertexCount===0){this.vertexCount>0&&this.flush();var l=this.inverseRotationMatrix;if(i){var u=-i,d=Math.cos(u),f=Math.sin(u);l[1]=f,l[3]=-f,l[0]=l[4]=d}else l[0]=l[4]=1,l[1]=l[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,l),this.currentNormalMapRotation=i}},setTexture2D:function(i,l){var u=this.renderer;i===void 0&&(i=u.whiteTexture);var d=this.getNormalMap(l);this.isNewNormalMap(i,d)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(d),this.currentNormalMap=d);var f=0;if(l&&l.parentContainer){var v=l.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);f=v.rotationNormalized}else l&&(f=l.rotation);return this.currentBatch===null&&(this.createBatch(i),this.addTextureToBatch(d)),this.setNormalMapRotation(f),0},setGameObject:function(i,l){l===void 0&&(l=i.frame);var u=l.glTexture,d=this.getNormalMap(i);if(this.isNewNormalMap(u,d)&&(this.flush(),this.createBatch(u),this.addTextureToBatch(d),this.currentNormalMap=d),i.parentContainer){var f=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(f.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return this.currentBatch===null&&(this.createBatch(u),this.addTextureToBatch(d)),0},isNewNormalMap:function(i,l){return this.currentTexture!==i||this.currentNormalMap!==l},getNormalMap:function(i){var l;if(i)i.displayTexture?l=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?l=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?l=i.tileset[0].image.dataSource[0]:l=i.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return l?l.glTexture:this.renderer.normalTexture},batchSprite:function(i,l,u){this.lightsActive&&n.prototype.batchSprite.call(this,i,l,u)},batchTexture:function(i,l,u,d,f,v,m,y,g,T,S,E,M,F,A,P,L,O,G,z,Y,X,I,U,D,V,B,W,K,J,Z,j){this.lightsActive&&n.prototype.batchTexture.call(this,i,l,u,d,f,v,m,y,g,T,S,E,M,F,A,P,L,O,G,z,Y,X,I,U,D,V,B,W,K,J,Z,j)},batchTextureFrame:function(i,l,u,d,f,v,m){this.lightsActive&&n.prototype.batchTextureFrame.call(this,i,l,u,d,f,v,m)}});c.exports=h},56527:(c,x,t)=>{/**
4746 * @author       Richard Davey <[email protected]>
4747 * @copyright    2013-2025 Phaser Studio Inc.
4748 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4749 */var o=t(83419),p=t(95540),a=t(57516),n=t(45561),r=t(60722),e=t(14500),s=t(29100),h=new o({Extends:a,initialize:function(l){l.fragShader=p(l,"fragShader",n),l.vertShader=p(l,"vertShader",r),l.attributes=p(l,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),l.forceZero=!0,l.resizeUniform="uResolution",a.call(this,l)},boot:function(){s.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height)}});c.exports=h},57516:(c,x,t)=>{/**
4750 * @author       Richard Davey <[email protected]>
4751 * @author       Felipe Alfonso <@bitnenfer>
4752 * @copyright    2013-2025 Phaser Studio Inc.
4753 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4754 */var o=t(83419),p=t(94811),a=t(95540),n=t(98840),r=t(44667),e=t(61340),s=t(70554),h=t(14500),i=t(29100),l=new o({Extends:i,initialize:function(d){var f=d.game.renderer,v=a(d,"fragShader",n);d.fragShader=s.parseFragmentShaderMaxTextures(v,f.maxTextures),d.vertShader=a(d,"vertShader",r),d.attributes=a(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}
4754]),d.resizeUniform="uResolution",i.call(this,d),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 u=this.renderer;this.set1iv("uMainSampler",u.textureIndexes),this.set2f("uResolution",u.width,u.height)},batchSprite:function(u,d,f){this.manager.set(this,u);var v=this._tempMatrix1,m=this._tempMatrix2,y=this._tempMatrix3,g=u.frame,T=g.glTexture,S=g.u0,E=g.v0,M=g.u1,F=g.v1,A=g.x,P=g.y,L=g.cutWidth,O=g.cutHeight,G=g.customPivot,z=u.displayOriginX,Y=u.displayOriginY,X=-z+A,I=-Y+P;if(u.isCropped){var U=u._crop;(U.flipX!==u.flipX||U.flipY!==u.flipY)&&g.updateCropUVs(U,u.flipX,u.flipY),S=U.u0,E=U.v0,M=U.u1,F=U.v1,L=U.width,O=U.height,A=U.x,P=U.y,X=-z+A,I=-Y+P}var D=1,V=1;u.flipX&&(G||(X+=-g.realWidth+z*2),D=-1),u.flipY&&(G||(I+=-g.realHeight+Y*2),V=-1);var B=u.x,W=u.y;d.roundPixels&&(B=Math.floor(B),W=Math.floor(W)),m.applyITRS(B,W,u.rotation,u.scaleX*D,u.scaleY*V),v.copyFrom(d.matrix),f?(v.multiplyWithOffset(f,-d.scrollX*u.scrollFactorX,-d.scrollY*u.scrollFactorY),m.e=B,m.f=W):(m.e-=d.scrollX*u.scrollFactorX,m.f-=d.scrollY*u.scrollFactorY),v.multiply(m,y);var K=y.setQuad(X,I,X+L,I+O,d.renderRoundPixels),J=s.getTintAppendFloatAlpha,Z=d.alpha,j=J(u.tintTopLeft,Z*u._alphaTL),k=J(u.tintTopRight,Z*u._alphaTR),_=J(u.tintBottomLeft,Z*u._alphaBL),q=J(u.tintBottomRight,Z*u._alphaBR);this.shouldFlush(6)&&this.flush();var et=this.setGameObject(u,g);this.manager.preBatch(u),this.batchQuad(u,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],S,E,M,F,j,k,_,q,u.tintFill,T,et),this.manager.postBatch(u)},batchTexture:function(u,d,f,v,m,y,g,T,S,E,M,F,A,P,L,O,G,z,Y,X,I,U,D,V,B,W,K,J,Z,j,k,_,q){q===void 0&&(q=!1),this.manager.set(this,u);var et=this._tempMatrix1,nt=this._tempMatrix2,tt=this._tempMatrix3,ot=z/f+K,ht=Y/v+J,lt=(z+X)/f+K,it=(Y+I)/v+J,rt=g,at=T,ct=-O,Tt=-G;if(u.isCropped){var Mt=u._crop,mt=Mt.width,gt=Mt.height;rt=mt,at=gt,g=mt,T=gt,z=Mt.x,Y=Mt.y;var Rt=z,Bt=Y;F&&(Rt=X-Mt.x-mt),A&&(Bt=I-Mt.y-gt),ot=Rt/f+K,ht=Bt/v+J,lt=(Rt+mt)/f+K,it=(Bt+gt)/v+J,ct=-O+z,Tt=-G+Y}
4754A=A^(!k&&d.isRenderTexture?1:0),F&&(rt*=-1,ct+=g),A&&(at*=-1,Tt+=T),Z.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),nt.applyITRS(m,y,M,S,E),et.copyFrom(Z.matrix),j?(et.multiplyWithOffset(j,-Z.scrollX*P,-Z.scrollY*L),nt.e=m,nt.f=y):(nt.e-=Z.scrollX*P,nt.f-=Z.scrollY*L),et.multiply(nt,tt);var Ct=tt.setQuad(ct,Tt,ct+rt,Tt+at,Z.renderRoundPixels);_==null&&(_=this.setTexture2D(d)),u&&!q&&this.manager.preBatch(u),this.batchQuad(u,Ct[0],Ct[1],Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],ot,ht,lt,it,U,D,V,B,W,d,_),u&&!q&&this.manager.postBatch(u)},batchTextureFrame:function(u,d,f,v,m,y,g){this.manager.set(this);var T=this._tempMatrix1.copyFrom(y),S=this._tempMatrix2;g?T.multiply(g,S):S=T;var E=S.setQuad(d,f,d+u.width,f+u.height),M=this.setTexture2D(u.source.glTexture);v=s.getTintAppendFloatAlpha(v,m),this.batchQuad(null,E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],u.u0,u.v0,u.u1,u.v1,v,v,v,v,0,u.glTexture,M)},batchFillRect:function(u,d,f,v,m,y){this.renderer.pipelines.set(this);var g=this.calcMatrix;y&&y.multiply(m,g);var T=g.setQuad(u,d,u+f,d+v),S=this.fillTint;this.batchQuad(null,T[0],T[1],T[2],T[3],T[4],T[5],T[6],T[7],0,0,1,1,S.TL,S.TR,S.BL,S.BR,2)},batchFillTriangle:function(u,d,f,v,m,y,g,T){this.renderer.pipelines.set(this);var S=this.calcMatrix;T&&T.multiply(g,S);var E=S.getX(u,d),M=S.getY(u,d),F=S.getX(f,v),A=S.getY(f,v),P=S.getX(m,y),L=S.getY(m,y),O=this.fillTint;this.batchTri(null,E,M,F,A,P,L,0,0,1,1,O.TL,O.TR,O.BL,2)},batchStrokeTriangle:function(u,d,f,v,m,y,g,T,S){var E=this.tempTriangle;E[0].x=u,E[0].y=d,E[0].width=g,E[1].x=f,E[1].y=v,E[1].width=g,E[2].x=m,E[2].y=y,E[2].width=g,E[3].x=u,E[3].y=d,E[3].width=g,this.batchStrokePath(E,g,!1,T,S)},batchFillPath:function(u,d,f){this.renderer.pipelines.set(this);var v=this.calcMatrix;f&&f.multiply(d,v);for(var m=u.length,y=this.polygonCache,g,T,S=this.fillTint.TL,E=this.fillTint.TR,M=this.fillTint.BL,F=0;F<m;++F)T=u[F],y.push(T.x,T.y);g=p(y),m=g.length;for(var A=0;A<m;A+=3){var P=g[A+0]*2,L=g[A+1]*2,O=g[A+2]*2,G=y[P+0],z=y[P+1],Y=y[L+0],X=y[L+1],I=y[O+0],U=y[O+1],D=v.getX(G,z),V=v.getY(G,z),B=v.getX(Y,X),W=v.getY(Y,X),K=v.getX(I,U),J=v.getY(I,U);this.batchTri(null,D,V,B,W,K,J,0,0,1,1,S,E,M,2)}y.length=0},batchStrokePath:function(u,d,f,v,m){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var y=u.length-1,g=0;g<y;g++){var T=u[g],S=u[g+1];this.batchLine(T.x,T.y,S.x,S.y,T.width/2,S.width/2,d,g,!f&&g===y-1,v,m)}},batchLine:function(u,d,f,v,m,y,g,T,S,E,M){this.renderer.pipelines.set(this);var F=this.calcMatrix;M&&M.multiply(E,F);var A=f-u,P=v-d,L=Math.sqrt(A*A+P*P);if(L!==0){var O=m*(v-d)/L,G=m*(u-f)/L,z=y*(v-d)/L,Y=y*(u-f)/L,X=f-z,I=v-Y,U=u-O,D=d-G,V=f+z,B=v+Y,W=u+O,K=d+G,J=F.getX(X,I),Z=F.getY(X,I),j=F.getX(U,D),k=F.getY(U,D),_=F.getX(V,B),q=F.getY(V,B),et=F.getX(W,K),nt=F.getY(W,K),tt=this.strokeTint,ot=tt.TL,ht=tt.TR,lt=tt.BL,it=tt.BR;if(this.batchQuad(null,et,nt,j,k,J,Z,_,q,0,0,1,1,ot,ht,lt,it,2),!(g<=2)){var rt=this.prevQuad,at=this.firstQuad;T>0&&rt[4]?this.batchQuad(null,et,nt,j,k,rt[0],rt[1],rt[2],rt[3],0,0,1,1,ot,ht,lt,it,2):(at[0]=et,at[1]=nt,at[2]=j,at[3]=k,at[4]=1),S&&at[4]?this.batchQuad(null,J,Z,_,q,at[0],at[1],at[2],at[3],0,0,1,1,ot,ht,lt,it,2):(rt[0]=J,rt[1]=Z,rt[2]=_,rt[3]=q,rt[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}});c.exports=l},43439:(c,x,t)=>{/**
4755 * @author       Richard Davey <[email protected]>
4756 * @copyright    2013-2025 Phaser Studio Inc.
4757 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4758 */var o=t(83419),p=t(95540),a=t(4127),n=t(89924),r=t(29100),e=new o({Extends:r,initialize:function(h){h.vertShader=p(h,"vertShader",n),h.fragShader=p(h,"fragShader",a),h.attributes=p(h,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),r.call(this,h)},onRender:function(s,h){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",h.zoom)},batchPointLight:function(s,h,i,l,u,d,f,v,m,y,g,T){var S=s.color,E=s.intensity,M=s.radius,F=s.attenuation,A=S.r*E,P=S.g*E,L=S.b*E,O=h.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,l,g,T,M,F,A,P,L,O),this.batchLightVert(u,d,g,T,M,F,A,P,L,O),this.batchLightVert(f,v,g,T,M,F,A,P,L,O),this.batchLightVert(i,l,g,T,M,F,A,P,L,O),this.batchLightVert(f,v,g,T,M,F,A,P,L,O),this.batchLightVert(m,y,g,T,M,F,A,P,L,O),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,h,i,l,u,d,f,v,m,y){var g=this.vertexViewF32,T=this.vertexCount*this.currentShader.vertexComponentCount-1;g[++T]=s,g[++T]=h,g[++T]=i,g[++T]=l,g[++T]=u,g[++T]=d,g[++T]=f,g[++T]=v,g[++T]=m,g[++T]=y,this.vertexCount++}});c.exports=e},84057:(c,x,t)=>{/**
4759 * @author       Richard Davey <[email protected]>
4760 * @copyright    2013-2025 Phaser Studio Inc.
4761 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4762 */var o=t(83419),p=t(89422),a=t(95540),n=t(27681),r=t(49627),e=t(29100),s=new o({Extends:e,initialize:function(i){i.renderTarget=a(i,"renderTarget",1),i.fragShader=a(i,"fragShader",n),i.vertShader=a(i,"vertShader",r),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 p,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);for(var l=this.renderTargets,u=0;u<l.length;u++)l[u].autoResize=!0},postBatch:function(h){return this.hasBooted||(this.bootFX(),this.currentRenderTarget&&this.currentRenderTarget.bind()),this.onDraw(this.currentRenderTarget),this.onPostBatch(h),this},onDraw:function(h){this.bindAndDraw(h)},getController:function(h){return h!==void 0?h:this.controller?this.controller:this},copySprite:function(h,i,l){l===void 0&&(l=!1);var u=this.gl;u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,h.texture.webGLTexture);var d=u.getParameter(u.FRAMEBUFFER_BINDING);u.bindFramebuffer(u.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,i.texture.webGLTexture,0),u.clearColor(0,0,0,0),u.clear(u.COLOR_BUFFER_BIT),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6),l&&(u.bindTexture(u.TEXTURE_2D,null),u.bindFramebuffer(u.FRAMEBUFFER,d))},copyFrame:function(h,i,l,u,d){this.manager.copyFrame(h,i,l,u,d)},copyToGame:function(h){this.manager.copyToGame(h)},drawFrame:function(h,i,l){this.manager.drawFrame(h,i,l,this.colorMatrix)},blendFrames:function(h,i,l,u,d){this.manager.blendFrames(h,i,l,u,d)},blendFramesAdditive:function(h,i,l,u,d){this.manager.blendFramesAdditive(h,i,l,u,d)},clearFrame:function(h,i){this.manager.clearFrame(h,i)},blitFrame:function(h,i,l,u,d,f){this.manager.blitFrame(h,i,l,u,d,f)},copyFrameRect:function(h,i,l,u,d,f,v,m){this.manager.copyFrameRect(h,i,l,u,d,f,v,m)},bindAndDraw:function(h,i,l,u,d){l===void 0&&(l=!0),u===void 0&&(u=!0);var f=this.gl,v=this.renderer;this.bind(d),this.set1i("uMainSampler",0),i?(f.viewport(0,0,i.width,i.height),f.bindFramebuffer(f.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,i.texture.webGLTexture,0),l&&(u?f.clearColor(0,0,0,0):f.clearColor(0,0,0,1),f.clear(f.COLOR_BUFFER_BIT))):(v.popFramebuffer(!1,!1),v.currentFramebuffer||f.viewport(0,0,v.width,v.height)),v.restoreStencilMask(),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,h.texture.webGLTexture),f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.STATIC_DRAW),f.drawArrays(f.TRIANGLES,0,6),i&&(f.bindTexture(f.TEXTURE_2D,null),f.bindFramebuffer(f.FRAMEBUFFER,v.currentFramebuffer.webGLFramebuffer))},destroy:function(){return this.controller&&this.controller.destroy(),this.gameObject=null,this.controller=null,this.colorMatrix=null,this.fullFrame1=null,this.fullFrame2=null,this.halfFrame1=null,this.halfFrame2=null,this.manager.removePostPipeline(this),e.prototype.destroy.call(this),this}});c.exports=s},43558:(c,x,t)=>{/**
4763 * @author       Richard Davey <[email protected]>
4764 * @copyright    2013-2025 Phaser Studio Inc.
4765 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4766 */var o=t(10312),p=t(67502),a=t(83419),n=t(96293),r=t(95540),e=t(57516),s=t(27681),h=t(87841),i=t(32302),l=t(45561),u=t(60722),d=t(29100),f=new a({Extends:e,initialize:function(m){var y=r(m,"fragShader",s),g=r(m,"vertShader",u),T=r(m,"drawShader",s),S=[{name:"DrawSprite",fragShader:l,vertShader:u},{name:"CopySprite",fragShader:y,vertShader:g},{name:"DrawGame",fragShader:T,vertShader:u},{name:"ColorMatrix",fragShader:n}],E=r(m,"shaders",[]);
4766m.shaders=S.concat(E),m.vertShader||(m.vertShader=g),m.batchSize=1,e.call(this,m),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){d.prototype.boot.call(this);var v=this.shaders,m=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(m,m.width,m.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var y=new ArrayBuffer(168);this.quadVertexData=y,this.quadVertexViewF32=new Float32Array(y),this.quadVertexBuffer=m.createVertexBuffer(y,this.gl.STATIC_DRAW),this.onResize(m.width,m.height),this.currentShader=this.copyShader,this.set2f("uResolution",m.width,m.height)},onResize:function(v,m){var y=this.quadVertexViewF32;y[1]=m,y[22]=m,y[14]=v,y[28]=v,y[35]=v,y[36]=m},batchQuad:function(v,m,y,g,T,S,E,M,F,A,P,L,O,G,z,Y,X,I,U){var D=Math.min(m,g,S,M),V=Math.min(y,T,E,F),B=Math.max(m,g,S,M),W=Math.max(y,T,E,F),K=B-D,J=W-V,Z=this.spriteBounds.setTo(D,V,K,J),j=v?v.preFX.padding:0,k=K+j*2,_=J+j*2,q=Math.abs(Math.max(k,_)),et=this.manager.getRenderTarget(q),nt=this.targetBounds.setTo(0,0,et.width,et.height);p(nt,Math.round(Z.centerX),Math.round(Z.centerY)),this.tempSprite=v;var tt=this.gl,ot=this.renderer;ot.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",ot.width,ot.height),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,et),v.preFX.onFX(this));var ht=this.fsTarget;return this.flush(),tt.viewport(0,0,ot.width,ot.height),tt.bindFramebuffer(tt.FRAMEBUFFER,ht.framebuffer.webGLFramebuffer),tt.framebufferTexture2D(tt.FRAMEBUFFER,tt.COLOR_ATTACHMENT0,tt.TEXTURE_2D,ht.texture.webGLTexture,0),tt.clearColor(0,0,0,0),tt.clear(tt.COLOR_BUFFER_BIT),this.setTexture2D(U),this.batchVert(m,y,A,P,0,I,G),this.batchVert(g,T,A,O,0,I,Y),this.batchVert(S,E,L,O,0,I,X),this.batchVert(m,y,A,P,0,I,G),this.batchVert(S,E,L,O,0,I,X),this.batchVert(M,F,L,P,0,I,z),this.flush(),this.flipProjectionMatrix(!1),tt.activeTexture(tt.TEXTURE0),tt.bindTexture(tt.TEXTURE_2D,et.texture.webGLTexture),tt.copyTexSubImage2D(tt.TEXTURE_2D,0,0,0,nt.x,nt.y,nt.width,nt.height),tt.bindFramebuffer(tt.FRAMEBUFFER,null),tt.bindTexture(tt.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(et,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,m,y,g,T,S,E){y===void 0&&(y=!0),g===void 0&&(g=!0),T===void 0&&(T=!1),E===void 0&&(E=this.copyShader);var M=this.gl,F=this.tempSprite;S&&(E=this.colorMatrixShader),this.currentShader=E;var A=this.setVertexBuffer(this.quadVertexBuffer);E.bind(A,!1);var P=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",P.width,P.height),F.preFX.onFXCopy(this),this.onCopySprite(v,m,F),S&&(this.set1fv("uColorMatrix",S.getData()),this.set1f("uAlpha",S.alpha)),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,v.texture.webGLTexture),v.height>m.height)M.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var L=m.height-v.height;M.viewport(0,L,v.width,v.height),this.resetUVs()}if(M.bindFramebuffer(M.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,m.texture.webGLTexture,0),y&&(M.clearColor(0,0,0,+!g),M.clear(M.COLOR_BUFFER_BIT)),T){var O=this.renderer.currentBlendMode;this.renderer.setBlendMode(o.ERASE)}M.bufferData(M.ARRAY_BUFFER,this.quadVertexData,M.STATIC_DRAW),M.drawArrays(M.TRIANGLES,0,6),T&&this.renderer.setBlendMode(O),M.bindFramebuffer(M.FRAMEBUFFER,null)},copy:function(v,m){var y=this.gl;this.set1i("uMainSampler",0),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.texture.webGLTexture),y.viewport(0,0,v.width,v.height),this.setUVs(0,0,0,1,1,1,1,0),y.bindFramebuffer(y.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,m.texture.webGLTexture,0),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.quadVertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null)},blendFrames:function(v,m,y,g,T){this.manager.blendFrames(v,m,y,g,T)},blendFramesAdditive:function(v,m,y,g,T){this.manager.blendFramesAdditive(v,m,y,g,T)},drawToGame:function(v){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(v)},copyToGame:function(v){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(v)},bindAndDraw:function(v){var m=this.gl,y=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var g=this._tempMatrix1.loadIdentity(),T=this.targetBounds.x,S=this.targetBounds.y,E=T+v.width,M=S+v.height,F=g.getX(T,S),A=g.getX(T,M),P=g.getX(E,M),L=g.getX(E,S),O=g.getY(T,S),G=g.getY(T,M),z=g.getY(E,M),Y=g.getY(E,S),X=16777215;this.batchVert(F,O,0,0,0,0,X),this.batchVert(A,G,0,1,0,0,X),this.batchVert(P,z,1,1,0,0,X),this.batchVert(F,O,0,0,0,0,X),this.batchVert(P,z,1,1,0,0,X),this.batchVert(L,Y,1,0,0,0,X),y.restoreFramebuffer(!1,!0),y.currentFramebuffer||m.viewport(0,0,y.width,y.height),y.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,m,y,g,T,S,E,M){var F=this.quadVertexViewF32;F[2]=v,F[3]=m,F[9]=y,F[10]=g,F[16]=T,F[17]=S,F[23]=v,F[24]=m,F[30]=T,F[31]=S,F[37]=E,F[38]=M},setTargetUVs:function(v,m){var y=m.height/v.height;y>.5?y=.5-(y-.5):y=.5+(.5-y),this.setUVs(0,y,0,1+y,1,1+y,1,y)},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}});c.exports=f},81041:(c,x,t)=>{/**
4767 * @author       Richard Davey <[email protected]>
4768 * @copyright    2013-2025 Phaser Studio Inc.
4769 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4770 */var o=t(83419),p=t(95540),a=t(57516),n=new o({Extends:a,initialize:function(e){e.topology=5,e.batchSize=p(e,"batchSize",256),a.call(this,e)}});c.exports=n},12385:(c,x,t)=>{/**
4771 * @author       Richard Davey <[email protected]>
4772 * @copyright    2013-2025 Phaser Studio Inc.
4773 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4774 */var o=t(83419),p=t(95540),a=t(57516),n=t(45561),r=t(60722),e=t(29100),s=new o({Extends:a,initialize:function(i){i.fragShader=p(i,"fragShader",n),i.vertShader=p(i,"vertShader",r),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)}});c.exports=s},7589:(c,x,t)=>{/**
4775 * @author       Richard Davey <[email protected]>
4776 * @copyright    2013-2025 Phaser Studio Inc.
4777 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4778 */var o=t(35407),p=t(10312),a=t(83419),n=t(89422),r=t(96293),e=t(36682),s=t(95540),h=t(48247),i=t(49627),l=t(29100),u=new a({Extends:l,initialize:function(f){f.renderTarget=s(f,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),f.vertShader=s(f,"vertShader",i),f.shaders=s(f,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:o},{name:"LinearBlend",fragShader:h},{name:"ColorMatrix",fragShader:r}]),f.attributes=s(f,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),f.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],f.batchSize=1,l.call(this,f),this.colorMatrix=new n,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){l.prototype.boot.call(this);var d=this.shaders,f=this.renderTargets;this.copyShader=d[0],this.addShader=d[1],this.linearShader=d[2],this.colorMatrixShader=d[3],this.fullFrame1=f[0],this.fullFrame2=f[1],this.halfFrame1=f[2],this.halfFrame2=f[3]},copyFrame:function(d,f,v,m,y){v===void 0&&(v=1),m===void 0&&(m=!0),y===void 0&&(y=!0);var g=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,d.texture.webGLTexture),f?(g.viewport(0,0,f.width,f.height),g.bindFramebuffer(g.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,f.texture.webGLTexture,0)):g.viewport(0,0,d.width,d.height),m&&(y?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT)),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blitFrame:function(d,f,v,m,y,g,T){v===void 0&&(v=1),m===void 0&&(m=!0),y===void 0&&(y=!0),g===void 0&&(g=!1),T===void 0&&(T=!1);var S=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,d.texture.webGLTexture),d.height>f.height)S.viewport(0,0,d.width,d.height),this.setTargetUVs(d,f);else{var E=f.height-d.height;S.viewport(0,E,d.width,d.height)}if(S.bindFramebuffer(S.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,f.texture.webGLTexture,0),m&&(y?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT)),g){var M=this.renderer.currentBlendMode;this.renderer.setBlendMode(p.ERASE)}T&&this.flipY(),S.bufferData(S.ARRAY_BUFFER,this.vertexData,S.STATIC_DRAW),S.drawArrays(S.TRIANGLES,0,6),g&&this.renderer.setBlendMode(M),S.bindFramebuffer(S.FRAMEBUFFER,null),S.bindTexture(S.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(d,f,v,m,y,g,T,S){T===void 0&&(T=!0),S===void 0&&(S=!0);var E=this.gl;E.bindFramebuffer(E.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,d.texture.webGLTexture,0),T&&(S?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,f.texture.webGLTexture),E.copyTexSubImage2D(E.TEXTURE_2D,0,0,0,v,m,y,g),E.bindFramebuffer(E.FRAMEBUFFER,null),E.bindTexture(E.TEXTURE_2D,null)},copyToGame:function(d){var f=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,d.texture.webGLTexture),f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.STATIC_DRAW),f.drawArrays(f.TRIANGLES,0,6)},drawFrame:function(d,f,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.colorMatrix);var y=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",m.getData()),this.set1f("uAlpha",m.alpha),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,d.texture.webGLTexture),f?(y.viewport(0,0,f.width,f.height),y.bindFramebuffer(y.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,f.texture.webGLTexture,0)):y.viewport(0,0,d.width,d.height),v?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)},blendFrames:function(d,f,v,m,y,g){m===void 0&&(m=1),y===void 0&&(y=!0),g===void 0&&(g=this.linearShader);var T=this.gl;this.setShader(g),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",m),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,d.texture.webGLTexture),T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,f.texture.webGLTexture),v?(T.bindFramebuffer(T.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,v.texture.webGLTexture,0),T.viewport(0,0,v.width,v.height)):T.viewport(0,0,d.width,d.height),y?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null)},blendFramesAdditive:function(d,f,v,m,y){this.blendFrames(d,f,v,m,y,this.addShader)},clearFrame:function(d,f){f===void 0&&(f=!0);var v=this.gl;v.viewport(0,0,d.width,d.height),v.bindFramebuffer(v.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),f?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var m=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,m.webGLFramebuffer)},setUVs:function(d,f,v,m,y,g,T,S){var E=this.vertexViewF32;E[2]=d,E[3]=f,E[6]=v,E[7]=m,E[10]=y,E[11]=g,E[14]=d,E[15]=f,E[18]=y,E[19]=g,E[22]=T,E[23]=S},setTargetUVs:function(d,f){var v=f.height/d.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)}});c.exports=u},36060:c=>{/**
4779 * @author       Richard Davey <[email protected]>
4780 * @copyright    2013-2025 Phaser Studio Inc.
4781 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4782 */var x={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"};c.exports=x},84817:c=>{/**
4783 * @author       Richard Davey <[email protected]>
4784 * @copyright    2013-2025 Phaser Studio Inc.
4785 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4786 */c.exports="pipelineafterflush"},36712:c=>{/**
4787 * @author       Richard Davey <[email protected]>
4788 * @copyright    2013-2025 Phaser Studio Inc.
4789 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4790 */c.exports="pipelinebeforeflush"},40285:c=>{/**
4791 * @author       Richard Davey <[email protected]>
4792 * @copyright    2013-2025 Phaser Studio Inc.
4793 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4794 */c.exports="pipelinebind"},65918:c=>{/**
4795 * @author       Richard Davey <[email protected]>
4796 * @copyright    2013-2025 Phaser Studio Inc.
4797 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4798 */c.exports="pipelineboot"},92852:c=>{/**
4799 * @author       Richard Davey <[email protected]>
4800 * @copyright    2013-2025 Phaser Studio Inc.
4801 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4802 */c.exports="pipelinedestroy"},56072:c=>{/**
4803 * @author       Richard Davey <[email protected]>
4804 * @copyright    2013-2025 Phaser Studio Inc.
4805 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4806 */c.exports="pipelinerebind"},57566:c=>{/**
4807 * @author       Richard Davey <[email protected]>
4808 * @copyright    2013-2025 Phaser Studio Inc.
4809 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4810 */c.exports="pipelineresize"},77085:(c,x,t)=>{/**
4811 * @author       Richard Davey <[email protected]>
4812 * @copyright    2013-2025 Phaser Studio Inc.
4813 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4814 */c.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:(c,x,t)=>{/**
4815 * @author       Richard Davey <[email protected]>
4816 * @copyright    2013-2025 Phaser Studio Inc.
4817 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4818 */var o=t(83419),p=t(99155),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.amount=1},onPreRender:function(r,e){r=this.getController(r),this.set1f("amount",r.amount,e)}});c.exports=n},67329:(c,x,t)=>{/**
4819 * @author       Richard Davey <[email protected]>
4820 * @copyright    2013-2025 Phaser Studio Inc.
4821 * @license      {@link https://opensource.org/licens
4821es/MIT|MIT License}
4822 */var o=t(83419),p=t(24400),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(r){r=this.getController(r),this.set1f("strength",r.blurStrength),this.set3fv("color",r.glcolor)},onDraw:function(r){var e=this.getController(),s=this.fullFrame1,h=this.fullFrame2;this.copyFrame(r,h);for(var i=2/r.width*e.offsetX,l=2/r.height*e.offsetY,u=0;u<e.steps;u++)this.set2f("offset",i,0),this.copySprite(r,s),this.set2f("offset",0,l),this.copySprite(s,r);this.blendFrames(h,r,s,e.strength),this.copyToGame(s)}});c.exports=n},8861:(c,x,t)=>{/**
4823 * @author       Richard Davey <[email protected]>
4824 * @copyright    2013-2025 Phaser Studio Inc.
4825 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4826 */var o=t(83419),p=t(41514),a=t(51078),n=t(94328),r=t(84057),e=new o({Extends:r,initialize:function(h){r.call(this,{game:h,shaders:[{name:"Gaussian5",fragShader:p},{name:"Gaussian9",fragShader:a},{name:"Gaussian13",fragShader:n}]}),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,l=this.fullFrame1,u=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 d=0;d<h.steps;d++)this.set2f("offset",h.x,0),this.copySprite(s,l),this.set2f("offset",0,h.y),this.copySprite(l,s);i.bindFramebuffer(i.FRAMEBUFFER,u),i.bindTexture(i.TEXTURE_2D,null),this.copyToGame(s)}});c.exports=e},51051:(c,x,t)=>{/**
4827 * @author       Richard Davey <[email protected]>
4828 * @copyright    2013-2025 Phaser Studio Inc.
4829 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4830 */var o=t(83419),p=t(90610),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(r,e,s,h){r=this.getController(r),this.set1f("radius",r.radius,e),this.set1f("amount",r.amount,e),this.set1f("contrast",r.contrast,e),this.set1f("strength",r.strength,e),this.set2f("blur",r.blurX,r.blurY,e),this.setBoolean("isTiltShift",r.isTiltShift,e),s&&h&&this.set2f("resolution",s,h,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});c.exports=n},89428:(c,x,t)=>{/**
4831 * @author       Richard Davey <[email protected]>
4832 * @copyright    2013-2025 Phaser Studio Inc.
4833 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4834 */var o=t(83419),p=t(91899),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(r,e,s,h){r=this.getController(r),this.set1f("scale",r.scale,e),this.set1f("feather",r.feather,e),this.set1f("thickness",r.thickness,e),this.set3fv("color",r.glcolor,e),this.set4fv("backgroundColor",r.glcolor2,e),s&&h&&this.set2f("resolution",s,h,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});c.exports=n},88904:(c,x,t)=>{/**
4835 * @author       Richard Davey <[email protected]>
4836 * @copyright    2013-2025 Phaser Studio Inc.
4837 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4838 */var o=t(83419),p=t(84057),a=new o({Extends:p,initialize:function(r){p.call(this,{game:r})},onDraw:function(n){var r=this.fullFrame1;this.controller?this.manager.drawFrame(n,r,!0,this.controller):this.drawFrame(n,r),this.copyToGame(r)}});c.exports=a},63563:(c,x,t)=>{/**
4839 * @author       Richard Davey <[email protected]>
4840 * @copyright    2013-2025 Phaser Studio Inc.
4841 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4842 */var o=t(83419),p=t(47838),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(r){var e=this.game.textures.getFrame(r);e&&(this.glTexture=e.glTexture)},onDraw:function(r){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(r,s),this.copyToGame(s)}});c.exports=n},94045:(c,x,t)=>{/**
4843 * @author       Richard Davey <[email protected]>
4844 * @copyright    2013-2025 Phaser Studio Inc.
4845 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4846 */var o=t(83419),p=t(95540),a=t(98656),n=t(84057),r=t(70554),e=new o({Extends:n,initialize:function(h,i){var l=p(i,"quality",.1),u=p(i,"distance",10);n.call(this,{game:h,fragShader:r.setGlowQuality(a,h,l,u)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,h,i,l){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&&l&&this.set2f("resolution",i,l,h)},onDraw:function(s){this.set2f("resolution",s.width,s.height),this.bindAndDraw(s)}});c.exports=e},74088:(c,x,t)=>{/**
4847 * @author       Richard Davey <[email protected]>
4848 * @copyright    2013-2025 Phaser Studio Inc.
4849 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4850 */var o=t(83419),p=t(70463),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),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(r,e){r=this.getController(r),this.set1f("alpha",r.alpha,e),this.set1i("size",r.size,e),this.set3fv("color1",r.glcolor1,e),this.set3fv("color2",r.glcolor2,e),this.set2f("positionFrom",r.fromX,r.fromY,e),this.set2f("positionTo",r.toX,r.toY,e)}
4850});c.exports=n},99636:(c,x,t)=>{/**
4851 * @author       Richard Davey <[email protected]>
4852 * @copyright    2013-2025 Phaser Studio Inc.
4853 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4854 */var o=t(83419),p=t(50831),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.amount=1},onPreRender:function(r,e,s,h){r=this.getController(r),this.set1f("amount",r.amount,e),s&&h&&this.set2f("resolution",s,h,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});c.exports=n},34700:(c,x,t)=>{/**
4855 * @author       Richard Davey <[email protected]>
4856 * @copyright    2013-2025 Phaser Studio Inc.
4857 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4858 */var o=t(83419),p=t(92595),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),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(r,e){r=this.getController(r);var s=r.samples;this.set1i("samples",s,e),this.set1f("intensity",r.intensity,e),this.set1f("decay",r.decay,e),this.set1f("power",r.power/s,e),this.set2f("lightPosition",r.x,r.y,e),this.set4fv("color",r.glcolor,e)}});c.exports=n},91157:(c,x,t)=>{/**
4859 * @author       Richard Davey <[email protected]>
4860 * @copyright    2013-2025 Phaser Studio Inc.
4861 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4862 */var o=t(83419),p=t(72464),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(r,e,s,h){r=this.getController(r),this.setTime("time",e),this.set1f("speed",r.speed,e),this.set1f("lineWidth",r.lineWidth,e),this.set1f("gradient",r.gradient,e),this.setBoolean("reveal",r.reveal,e),s&&h&&this.set2f("resolution",s,h,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});c.exports=n},27797:(c,x,t)=>{/**
4863 * @author       Richard Davey <[email protected]>
4864 * @copyright    2013-2025 Phaser Studio Inc.
4865 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4866 */var o=t(83419),p=t(39249),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(r,e){r=this.getController(r),this.set1f("radius",r.radius,e),this.set1f("strength",r.strength,e),this.set2f("position",r.x,r.y,e)}});c.exports=n},67603:(c,x,t)=>{/**
4867 * @author       Richard Davey <[email protected]>
4868 * @copyright    2013-2025 Phaser Studio Inc.
4869 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4870 */var o=t(83419),p=t(2878),a=t(84057),n=new o({Extends:a,initialize:function(e){a.call(this,{game:e,fragShader:p}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(r,e){r=this.getController(r);var s=r.progress,h=r.wipeWidth,i=r.direction,l=r.axis;this.set4f("config",s,h,i,l,e),this.setBoolean("reveal",r.reveal,e)}});c.exports=n},58918:(c,x,t)=>{/**
4871 * @author       Richard Davey <[email protected]>
4872 * @copyright    2013-2025 Phaser Studio Inc.
4873 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4874 */var o={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)};c.exports=o},96615:(c,x,t)=>{/**
4875 * @author       Richard Davey <[email protected]>
4876 * @copyright    2013-2025 Phaser Studio Inc.
4877 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4878 */var o=t(36060),p=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=p(!1,a,o),c.exports=a},35407:c=>{c.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(`
4879`)},78908:c=>{c.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(`
4880`)},85191:c=>{c.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(`
4881`)},96293:c=>{c.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(`
4882`)},36682:c=>{c.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(`
4883`)},99155:c=>{c.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);
4883","    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(`
4884`)},24400:c=>{c.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(`
4885`)},94328:c=>{c.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(`
4886`)},41514:c=>{c.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(`
4887`)},51078:c=>{c.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(`
4888`)},90610:c=>{c.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
4888);","}"].join(`
4889`)},91899:c=>{c.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(`
4890`)},47838:c=>{c.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(`
4891`)},98656:c=>{c.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(`
4892`)},70463:c=>{c.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(`
4893`)},50831:c=>{c.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(`
4894`)},92595:c=>{c.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(`
4895`)},72464:c=>{c.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(`
4896`)},39249:c=>{c.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(`
4897`)},2878:c=>{c.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;","    }
4897","    float adjust = mix(width, -width, distance);","    float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);","    gl_FragColor = mix(color1, color0, value);","}"].join(`
4898`)},31063:c=>{c.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(`
4899`)},48247:c=>{c.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(`
4900`)},41214:c=>{c.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(`
4901`)},39653:c=>{c.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
4901));","    vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));","    gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(`
4902`)},62143:c=>{c.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(`
4903`)},47940:c=>{c.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","    outTexCoord = inTexCoord;","    outTint = inTint;","    outTintEffect = inTintEffect;","}"].join(`
4904`)},98840:c=>{c.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(`
4905`)},44667:c=>{c.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","    outTexCoord = inTexCoord;","    outTexId = inTexId;","    outTint = inTint;","    outTintEffect = inTintEffect;","}"].join(`
4906`)},4127:c=>{c.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(`
4907`)},89924:c=>{c.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(`
4908`)},27681:c=>{c.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{","    gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(`
4909`)},49627:c=>{c.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(`
4910`)},45561:c=>{c.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;
4910","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(`
4911`)},60722:c=>{c.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","    outTexCoord = inTexCoord;","    outTint = inTint;","    outTintEffect = inTintEffect;","}"].join(`
4912`)},89350:(c,x,t)=>{/**
4913 * @author       Richard Davey <[email protected]>
4914 * @copyright    2013-2023 Photon Storm Ltd.
4915 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4916 */c.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:(c,x,t)=>{/**
4917 * @author       Benjamin D. Richards <[email protected]>
4918 * @copyright    2013-2025 Phaser Studio Inc.
4919 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4920 */var o=t(83419),p=new o({initialize:function(n,r,e){this.webGLAttribLocation=-1,this.gl=n,this.program=r,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}});c.exports=p},26128:(c,x,t)=>{/**
4921 * @author       Benjamin D. Richards <[email protected]>
4922 * @copyright    2013-2025 Phaser Studio Inc.
4923 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4924 */var o=t(83419),p=new o({initialize:function(n,r,e,s){this.webGLBuffer=null,this.gl=n,this.initialDataOrSize=r,this.bufferType=e,this.bufferUsage=s,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var a=this.gl;if(!a.isContextLost()){var n=this.bufferType,r=a.createBuffer();this.webGLBuffer=r,a.bindBuffer(n,this.webGLBuffer),a.bufferData(n,this.initialDataOrSize,this.bufferUsage),a.bindBuffer(n,null)}}},destroy:function(){var a=this.gl;a.isContextLost()||a.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});c.exports=p},84387:(c,x,t)=>{/**
4925 * @author       Benjamin D. Richards <[email protected]>
4926 * @copyright    2013-2025 Phaser Studio Inc.
4927 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4928 */var o=t(83419),p={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},a=new o({initialize:function(r,e,s,h,i){this.webGLFramebuffer=null,this.gl=r,this.width=e,this.height=s,this.renderTexture=h,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var n=this.gl;if(!n.isContextLost()){var r=this.renderTexture,e=0,s=n.createFramebuffer();if(this.webGLFramebuffer=s,n.bindFramebuffer(n.FRAMEBUFFER,s),r.isRenderTexture=!0,r.isAlphaPremultiplied=!1,n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,r.webGLTexture,0),e=n.checkFramebufferStatus(n.FRAMEBUFFER),e!==n.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(p[e]||e));if(this.addDepthStencilBuffer){var h=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,h),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,this.width,this.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,h)}n.bindFramebuffer(n.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var n=this.gl;if(!n.isContextLost()){n.bindFramebuffer(n.FRAMEBUFFER,this.webGLFramebuffer);var r=n.getFramebufferAttachmentParameter(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.FRAMEBUFFER_ATTACHMENT_OBJ
4928ECT_NAME);r!==null&&(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,null,0),n.deleteTexture(r));var e=n.getFramebufferAttachmentParameter(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&n.deleteRenderbuffer(e),n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});c.exports=a},1482:(c,x,t)=>{/**
4929 * @author       Benjamin D. Richards <[email protected]>
4930 * @copyright    2013-2025 Phaser Studio Inc.
4931 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4932 */var o=t(83419),p=new o({initialize:function(n,r,e){this.webGLProgram=null,this.gl=n,this.vertexSource=r,this.fragmentSource=e,this.createResource()},createResource:function(){var a=this.gl;if(!a.isContextLost()){var n=a.createProgram(),r=a.createShader(a.VERTEX_SHADER),e=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(r,this.vertexSource),a.shaderSource(e,this.fragmentSource),a.compileShader(r),a.compileShader(e);var s=`Shader failed:
4933`;if(!a.getShaderParameter(r,a.COMPILE_STATUS))throw new Error("Vertex "+s+a.getShaderInfoLog(r));if(!a.getShaderParameter(e,a.COMPILE_STATUS))throw new Error("Fragment "+s+a.getShaderInfoLog(e));if(a.attachShader(n,r),a.attachShader(n,e),a.linkProgram(n),!a.getProgramParameter(n,a.LINK_STATUS))throw new Error("Link "+s+a.getProgramInfoLog(n));a.useProgram(n),this.webGLProgram=n}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});c.exports=p},82751:(c,x,t)=>{/**
4934 * @author       Benjamin D. Richards <[email protected]>
4935 * @copyright    2013-2025 Phaser Studio Inc.
4936 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4937 */var o=t(83419),p=t(50030),a=new o({initialize:function(r,e,s,h,i,l,u,d,f,v,m,y,g){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=r,this.mipLevel=e,this.minFilter=s,this.magFilter=h,this.wrapT=i,this.wrapS=l,this.format=u,this.pixels=d,this.width=f,this.height=v,this.pma=m??!0,this.forceSize=!!y,this.flipY=!!g,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var n=this.gl;if(!n.isContextLost()){if(this.pixels instanceof a){this.webGLTexture=this.pixels.webGLTexture;return}var r=n.createTexture();r.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=r,this._processTexture()}},update:function(n,r,e,s,h,i,l,u,d){if(!(r===0||e===0)){this.pixels=n,this.width=r,this.height=e,this.flipY=s,this.wrapS=h,this.wrapT=i,this.minFilter=l,this.magFilter=u,this.format=d;var f=this.gl;f.isContextLost()||this._processTexture()}},_processTexture:function(){var n=this.gl;n.activeTexture(n.TEXTURE0);var r=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,this.webGLTexture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,this.minFilter),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,this.magFilter),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this.wrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this.wrapT),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,s=this.mipLevel,h=this.width,i=this.height,l=this.format,u=!1;if(e==null)n.texImage2D(n.TEXTURE_2D,s,l,h,i,0,l,n.UNSIGNED_BYTE,null),u=p(h,i);else if(e.compressed){h=e.width,i=e.height,u=e.generateMipmap;for(var d=0;d<e.mipmaps.length;d++)n.compressedTexImage2D(n.TEXTURE_2D,d,e.internalFormat,e.mipmaps[d].width,e.mipmaps[d].height,0,e.mipmaps[d].data)}else e instanceof Uint8Array?(n.texImage2D(n.TEXTURE_2D,s,l,h,i,0,l,n.UNSIGNED_BYTE,e),u=p(h,i)):(this.forceSize||(h=e.width,i=e.height),n.texImage2D(n.TEXTURE_2D,s,l,l,n.UNSIGNED_BYTE,e),u=p(h,i));u&&n.generateMipmap(n.TEXTURE_2D),r?n.bindTexture(n.TEXTURE_2D,r):n.bindTexture(n.TEXTURE_2D,null)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(n){this.__SPECTOR_Metadata=n,this.gl.isContextLost()||(this.webGLTexture.__SPECTOR_Metadata=n)}},destroy:function(){this.webGLTexture!==null&&(this.gl.isContextLost()||this.pixels instanceof a||this.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.gl=null)}});c.exports=a},57183:(c,x,t)=>{/**
4938 * @author       Benjamin D. Richards <[email protected]>
4939 * @copyright    2013-2025 Phaser Studio Inc.
4940 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4941 */var o=t(83419),p=new o({initialize:function(n,r,e){this.webGLUniformLocation=null,this.gl=n,this.program=r,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}});c.exports=p},9503:(c,x,t)=>{/**
4942 * @author       Benjamin D. Richards <[email protected]>
4943 * @copyright    2013-2025 Phaser Studio Inc.
4944 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4945 */var o={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};c.exports=o},76531:(c,x,t)=>{/**
4946 * @author       Richard Davey <[email protected]>
4947 * @copyright    2013-2025 Phaser Studio Inc.
4948 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4949 */var o=t(13560),p=t(83419),a=t(45319),n=t(50792),r=t(97480),e=t(8443),s=t(57811),h=t(74403),i=t(45818),l=t(29747),u=t(87841),d=t(86555),f=t(56583),v=t(26099),m=t(38058),y=new p({Extends:n,initialize:function(T){n.call(this),this.game=T,this.canvas,this.canvasBounds=new u,this.parent=null,this.parentIsWindow=!1,this.parentSize=new d,this.gameSize=new d,this.baseSize=new d,this.displaySize=new d,this.scaleMode=o.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=o.CENTER.NO_CENTER,this.orientation=o.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:l,windowResize:l,fullScreenChange:l,fullScreenError:l}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(e.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen;var T=this.scaleMode;T!==o.SCALE_MODE.RESIZE&&T!==o.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(T),T===o.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),g.events.on(e.PRE_STEP,this.step,this),g.events.once(e.READY,this.refresh,this),g.events.once(e.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(g){this.getParent(g),this.getParentBounds();var T=g.width,S=g.height,E=g.scaleMode,M=g.zoom,F=g.autoRound;if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var A=this.parentSize.width;A===0&&(A=window.innerWidth);var P=parseInt(T,10)/100;T=Math.floor(A*P)}if(typeof S=="string")if(S.substr(-1)!=="%")S=parseInt(S,10);else{var L=this.parentSize.height;L===0&&(L=window.innerHeight);var O=parseInt(S,10)/100;S=Math.floor(L*O)}
4949this.scaleMode=E,this.autoRound=F,this.autoCenter=g.autoCenter,this.resizeInterval=g.resizeInterval,F&&(T=Math.floor(T),S=Math.floor(S)),this.gameSize.setSize(T,S),M===o.ZOOM.MAX_ZOOM&&(M=this.getMaxZoom()),this.zoom=M,M!==1&&(this._resetZoom=!0),this.baseSize.setSize(T,S),F&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),g.minWidth>0&&this.displaySize.setMin(g.minWidth*M,g.minHeight*M),g.maxWidth>0&&this.displaySize.setMax(g.maxWidth*M,g.maxHeight*M),this.displaySize.setSize(T,S),(g.snapWidth>0||g.snapHeight>0)&&this.displaySize.setSnap(g.snapWidth,g.snapHeight),this.orientation=i(T,S)},getParent:function(g){var T=g.parent;if(T!==null){if(this.parent=h(T),this.parentIsWindow=this.parent===document.body,g.expandParent&&g.scaleMode!==o.SCALE_MODE.NONE){var S=this.parent.getBoundingClientRect();(this.parentIsWindow||S.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",S=this.parent.getBoundingClientRect(),!this.parentIsWindow&&S.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}g.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=h(g.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var g=this.parentSize,T=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(T.height=s(!0));var S=T.width,E=T.height;if(g.width!==S||g.height!==E)return g.setSize(S,E),!0;if(this.canvas){var M=this.canvasBounds,F=this.canvas.getBoundingClientRect();if(F.x!==M.x||F.y!==M.y)return!0}return!1},lockOrientation:function(g){var T=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return T?T.call(screen,g):!1},setParentSize:function(g,T){return this.parentSize.setSize(g,T),this.refresh()},setGameSize:function(g,T){var S=this.autoRound;S&&(g=Math.floor(g),T=Math.floor(T));var E=this.width,M=this.height;return this.gameSize.resize(g,T),this.baseSize.resize(g,T),S&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(g/T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(E,M)},resize:function(g,T){var S=this.zoom,E=this.autoRound;E&&(g=Math.floor(g),T=Math.floor(T));var M=this.width,F=this.height;this.gameSize.resize(g,T),this.baseSize.resize(g,T),E&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(g*S,T*S),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var A=this.canvas.style,P=g*S,L=T*S;return E&&(P=Math.floor(P),L=Math.floor(L)),(P!==g||L!==T)&&(A.width=P+"px",A.height=L+"px"),this.refresh(M,F)},setZoom:function(g){return this.zoom=g,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(g,T){return g===void 0&&(g=0),T===void 0&&(T=g),this.displaySize.setSnap(g,T),this.refresh()},refresh:function(g,T){g===void 0&&(g=this.width),T===void 0&&(T=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var S=this.game.domContainer;if(S){this.baseSize.setCSS(S);var E=this.canvas.style,M=S.style;M.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",M.marginLeft=E.marginLeft,M.marginTop=E.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,g,T),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var g=i(this.width,this.height);g!==this.orientation&&(this.orientation=g,this.emit(r.ORIENTATION_CHANGE,g))}},updateScale:function(){var g=this.canvas.style,T=this.gameSize.width,S=this.gameSize.height,E,M,F=this.zoom,A=this.autoRound;if(this.scaleMode===o.SCALE_MODE.NONE)this.displaySize.setSize(T*F,S*F),E=this.displaySize.width,M=this.displaySize.height,A&&(E=Math.floor(E),M=Math.floor(M)),this._resetZoom&&(g.width=E+"px",g.height=M+"px",this._resetZoom=!1);else if(this.scaleMode===o.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.
vendor: 4,141 bytes, line 4949
4949width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),E=this.displaySize.width,M=this.displaySize.height,A&&(E=Math.floor(E),M=Math.floor(M)),this.canvas.width=E,this.canvas.height=M;else if(this.scaleMode===o.SCALE_MODE.EXPAND){var P=this.game.config.width,L=this.game.config.height,O=this.parentSize.width,G=this.parentSize.height,z=O/P,Y=G/L,X,I;z<Y?(X=P,I=z!==0?G/z:L):(X=Y!==0?O/Y:P,I=L);var U=a(X,this.displaySize.minWidth,this.displaySize.maxWidth),D=a(I,this.displaySize.minHeight,this.displaySize.maxHeight);this.baseSize.setSize(U,D),this.gameSize.setSize(U,D),A&&(U=Math.floor(U),D=Math.floor(D)),this.canvas.width=U,this.canvas.height=D;var V=O*(U/X),B=G*(D/I);this.displaySize.setSize(V,B),E=this.displaySize.width,M=this.displaySize.height,A&&(E=Math.floor(E),M=Math.floor(M)),g.width=E+"px",g.height=M+"px"}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),E=this.displaySize.width,M=this.displaySize.height,A&&(E=Math.floor(E),M=Math.floor(M)),g.width=E+"px",g.height=M+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var g=f(this.parentSize.width,this.gameSize.width,0,!0),T=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(g,T),1)},updateCenter:function(){var g=this.autoCenter;if(g!==o.CENTER.NO_CENTER){var T=this.canvas,S=T.style,E=T.getBoundingClientRect(),M=E.width,F=E.height,A=Math.floor((this.parentSize.width-M)/2),P=Math.floor((this.parentSize.height-F)/2);g===o.CENTER.CENTER_HORIZONTALLY?P=0:g===o.CENTER.CENTER_VERTICALLY&&(A=0),S.marginLeft=A+"px",S.marginTop=P+"px"}},updateBounds:function(){var g=this.canvasBounds,T=this.canvas.getBoundingClientRect();g.x=T.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),g.y=T.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),g.width=T.width,g.height=T.height},transformX:function(g){return(g-this.canvasBounds.left)*this.displayScale.x},transformY:function(g){return(g-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(g){g===void 0&&(g={navigationUI:"hide"});var T=this.fullscreen;if(!T.available){this.emit(r.FULLSCREEN_UNSUPPORTED);return}if(!T.active){var S=this.getFullscreenTarget();T.keyboard?S[T.request](Element.ALLOW_KEYBOARD_INPUT):S[T.request](g)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(r.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(g){this.removeFullscreenTarget(),this.emit(r.FULLSCREEN_FAILED,g)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var g=document.createElement("div");g.style.margin="0",g.style.padding="0",g.style.width="100%",g.style.height="100%",this.fullscreenTarget=g,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var T=this.canvas.parentNode;T.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var g=this.fullscreenTarget;if(g&&g.parentNode){var T=g.parentNode;T.insertBefore(this.canvas,g),T.removeChild(g)}}},stopFullscreen:function(){var g=this.fullscreen;if(!g.available)return this.emit(r.FULLSCREEN_UNSUPPORTED),!1;g.active&&document[g.cancel](),this.removeFullscreenTarget()},leaveFullScreenSuccessHandler:function(){this.getParentBounds(),this.emit(r.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(g){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(g)},startListeners:function(){var g=this,T=this.domlisteners;if(T.orientationChange=function(){g.updateBounds(),g._checkOrientation=!0,g.dirty=!0,g.refresh()},T.windowResize=function(){g.updateBounds(),g.dirty=!0},screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",T.orientationChange,!1):window.addEventListener("orientationchange",T.orientationChange,!1),window.addEventListener("resize",T.windowResize,!1),this.fullscreen.available){T.fullScreenChange=function(E){return g.onFullScreenChange(E)},T.fullScreenError=function(E){return g.onFullScreenError(E)};var S=["webkit","moz",""];
4949S.forEach(function(E){document.addEventListener(E+"fullscreenchange",T.fullScreenChange,!1),document.addEventListener(E+"fullscreenerror",T.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",T.fullScreenChange,!1),document.addEventListener("MSFullscreenError",T.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():(this.stopFullscreen(),this.leaveFullScreenSuccessHandler())},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(g,T){g instanceof m||(T=g,g=void 0),T===void 0&&(T=new u);var S=this.baseSize,E=this.parentSize,M=this.canvasBounds,F=this.displayScale,A=M.x>=0?0:-(M.x*F.x),P=M.y>=0?0:-(M.y*F.y),L;E.width>=M.width?L=S.width:L=S.width-(M.width-E.width)*F.x;var O;return E.height>=M.height?O=S.height:O=S.height-(M.height-E.height)*F.y,T.setTo(A,P,L,O),g&&(T.width/=g.zoomX,T.height/=g.zoomY,T.centerX=g.centerX+g.scrollX,T.centerY=g.centerY+g.scrollY),T},step:function(g,T){this.parent&&(this._lastCheck+=T,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var g=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",g.orientationChange,!1):window.removeEventListener("orientationchange",g.orientationChange,!1),window.removeEventListener("resize",g.windowResize,!1);var T=["webkit","moz",""];T.forEach(function(S){document.removeEventListener(S+"fullscreenchange",g.fullScreenChange,!1),document.removeEventListener(S+"fullscreenerror",g.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",g.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===o.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===o.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});c.exports=y},64743:c=>{/**
4950 * @author       Richard Davey <[email protected]>
4951 * @copyright    2013-2025 Phaser Studio Inc.
4952 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4953 */c.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:c=>{/**
4954 * @author       Richard Davey <[email protected]>
4955 * @copyright    2013-2025 Phaser Studio Inc.
4956 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4957 */c.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:c=>{/**
4958 * @author       Richard Davey <[email protected]>
4959 * @copyright    2013-2025 Phaser Studio Inc.
4960 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4961 */c.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:c=>{/**
4962 * @author       Richard Davey <[email protected]>
4963 * @copyright    2013-2025 Phaser Studio Inc.
4964 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4965 */c.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(c,x,t)=>{/**
4966 * @author       Richard Davey <[email protected]>
4967 * @copyright    2013-2025 Phaser Studio Inc.
4968 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4969 */var o={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};c.exports=o},56139:c=>{/**
4970 * @author       Richard Davey <[email protected]>
4971 * @copyright    2013-2025 Phaser Studio Inc.
4972 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4973 */c.exports="enterfullscreen"},2336:c=>{/**
4974 * @author       Richard Davey <[email protected]>
4975 * @copyright    2013-2025 Phaser Studio Inc.
4976 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4977 */c.exports="fullscreenfailed"},47412:c=>{/**
4978 * @author       Richard Davey <[email protected]>
4979 * @copyright    2013-2025 Phaser Studio Inc.
4980 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4981 */c.exports="fullscreenunsupported"},51452:c=>{/**
4982 * @author       Richard Davey <[email protected]>
4983 * @copyright    2013-2025 Phaser Studio Inc.
4984 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4985 */c.exports="leavefullscreen"},20666:c=>{/**
4986 * @author       Richard Davey <[email protected]>
4987 * @copyright    2013-2025 Phaser Studio Inc.
4988 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4989 */c.exports="orientationchange"},47945:c=>{/**
4990 * @author       Richard Davey <[email protected]>
4991 * @copyright    2013-2025 Phaser Studio Inc.
4992 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4993 */c.exports="resize"},97480:(c,x,t)=>{/**
4994 * @author       Richard Davey <[email protected]>
4995 * @copyright    2013-2025 Phaser Studio Inc.
4996 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
4997 */c.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:(c,x,t)=>{/**
4998 * @author       Richard Davey <[email protected]>
4999 * @copyright    2013-2025 Phaser Studio Inc.
5000 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5001 */var o=t(79291),p=t(13560),a={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};a=o(!1,a,p.CENTER),a=o(!1,a,p.ORIENTATION),a=o(!1,a,p.SCALE_MODE),a=o(!1,a,p.ZOOM),c.exports=a},27397:(c,x,t)=>{/**
5002 * @author       Richard Davey <[email protected]>
5003 * @copyright    2013-2025 Phaser Studio Inc.
5004 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5005 */var o=t(95540),p=t(35355),a=function(n){var r=n.game.config.defaultPhysicsSystem,e=o(n.settings,"physics",!1);if(!(!r&&!e)){var s=[];if(r&&s.push(p(r+"Physics")),e)for(var h in e)h=p(h.concat("Physics")),s.indexOf(h)===-1&&s.push(h);return s}};c.exports=a},52106:(c,x,t)=>{/**
5006 * @author       Richard Davey <[email protected]>
5007 * @copyright    2013-2025 Phaser Studio Inc.
5008 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5009 */var o=t(95540),p=function(a){var n=a.plugins.getDefaultScenePlugins(),r=o(a.settings,"plugins",!1);return Array.isArray(r)?r:n||[]};c.exports=p},87033:c=>{/**
5010 * @author       Richard Davey <[email protected]>
5011 * @copyright    2013-2025 Phaser Studio Inc.
5012 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5013 */var x={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",dis
5013playList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};c.exports=x},97482:(c,x,t)=>{/**
5014 * @author       Richard Davey <[email protected]>
5015 * @copyright    2013-2025 Phaser Studio Inc.
5016 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5017 */var o=t(83419),p=t(2368),a=new o({initialize:function(r){this.sys=new p(this,r),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(){}});c.exports=a},60903:(c,x,t)=>{/**
5018 * @author       Richard Davey <[email protected]>
5019 * @copyright    2013-2025 Phaser Studio Inc.
5020 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5021 */var o=t(83419),p=t(89993),a=t(44594),n=t(8443),r=t(35154),e=t(54899),s=t(29747),h=t(97482),i=t(2368),l=new o({initialize:function(d,f){if(this.game=d,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,f){Array.isArray(f)||(f=[f]);for(var v=0;v<f.length;
5021v++)this._pending.push({key:"default",scene:f[v],autoStart:v===0,data:{}})}d.events.once(n.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){this.systemScene=this.createSceneFromInstance("__SYSTEM",new h),this.game.events.emit(n.SYSTEM_READY,this.systemScene,this);var u,d,f,v;for(u=0;u<this._pending.length;u++){d=this._pending[u],f=d.key,v=d.scene;var m;v instanceof h?m=this.createSceneFromInstance(f,v):typeof v=="object"?m=this.createSceneFromObject(f,v):typeof v=="function"&&(m=this.createSceneFromFunction(f,v)),f=m.sys.settings.key,this.keys[f]=m,this.scenes.push(m),this._data[f]&&(m.sys.settings.data=this._data[f].data,this._data[f].autoStart&&(d.autoStart=!0)),(d.autoStart||m.sys.settings.active)&&this._start.push(f)}for(this._pending.length=0,this._data={},this.isBooted=!0,u=0;u<this._start.length;u++)d=this._start[u],this.start(d);this._start.length=0}},processQueue:function(){var u=this._pending.length,d=this._queue.length;if(!(u===0&&d===0)){var f,v;if(u){for(f=0;f<u;f++)v=this._pending[f],this.add(v.key,v.scene,v.autoStart,v.data);for(f=0;f<this._start.length;f++)v=this._start[f],this.start(v);this._start.length=0,this._pending.length=0}for(f=0;f<this._queue.length;f++)v=this._queue[f],this[v.op](v.keyA,v.keyB,v.data);this._queue.length=0}},add:function(u,d,f,v){if(f===void 0&&(f=!1),v===void 0&&(v={}),this.isProcessing||!this.isBooted)return this._pending.push({key:u,scene:d,autoStart:f,data:v}),this.isBooted||(this._data[u]={data:v}),null;u=this.getKey(u,d);var m;return d instanceof h?m=this.createSceneFromInstance(u,d):typeof d=="object"?(d.key=u,m=this.createSceneFromObject(u,d)):typeof d=="function"&&(m=this.createSceneFromFunction(u,d)),m.sys.settings.data=v,u=m.sys.settings.key,this.keys[u]=m,this.scenes.push(m),(f||m.sys.settings.active)&&(this._pending.length?this._start.push(u):this.start(u)),m},remove:function(u){if(this.isProcessing)return this.queueOp("remove",u);var d=this.getScene(u);if(!d||d.sys.isTransitioning())return this;var f=this.scenes.indexOf(d),v=d.sys.settings.key;return f>-1&&(delete this.keys[v],this.scenes.splice(f,1),this._start.indexOf(v)>-1&&(f=this._start.indexOf(v),this._start.splice(f,1)),d.sys.destroy()),this},bootScene:function(u){var d=u.sys,f=d.settings;d.sceneUpdate=s,u.init&&(u.init.call(u,f.data),f.status=p.INIT,f.isTransition&&d.events.emit(a.TRANSITION_INIT,f.transitionFrom,f.transitionDuration));var v;d.load&&(v=d.load,v.reset()),v&&u.preload?(u.preload.call(u),f.status=p.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(u)},loadComplete:function(u){this.create(u.scene)},payloadComplete:function(u){this.bootScene(u.scene)},update:function(u,d){this.processQueue(),this.isProcessing=!0;for(var f=this.scenes.length-1;f>=0;f--){var v=this.scenes[f].sys;v.settings.status>p.START&&v.settings.status<=p.RUNNING&&v.step(u,d),v.scenePlugin&&v.scenePlugin._target&&v.scenePlugin.step(u,d)}},render:function(u){for(var d=0;d<this.scenes.length;d++){var f=this.scenes[d].sys;f.settings.visible&&f.settings.status>=p.LOADING&&f.settings.status<p.SLEEPING&&f.render(u)}this.isProcessing=!1},create:function(u){var d=u.sys,f=d.settings;u.create&&(f.status=p.CREATING,u.create.call(u,f.data),f.status===p.DESTROYED)||(f.isTransition&&d.events.emit(a.TRANSITION_START,f.transitionFrom,f.transitionDuration),u.update&&(d.sceneUpdate=u.update),f.status=p.RUNNING,d.events.emit(a.CREATE,u))},createSceneFromFunction:function(u,d){var f=new d;if(f instanceof h){var v=f.sys.settings.key;if(v!==""&&(u=v),this.keys.hasOwnProperty(u))throw new Error("Cannot add Scene with duplicate key: "+u);return this.createSceneFromInstance(u,f)}else return f.sys=new i(f),f.sys.settings.key=u,f.sys.init(this.game),f},createSceneFromInstance:function(u,d){var f=d.sys.settings.key;return f===""&&(d.sys.settings.key=u),d.sys.init(this.game),d},createSceneFromObject:function(u,d){var f=new h(d),v=f.sys.settings.key;v!==""?u=v:f.sys.settings.key=u,f.sys.init(this.game);for(var m=["init","preload","create","update","render"],y=0;y<m.length;y++){var g=r(d,m[y],null);g&&(f[m[y]]=g)}if(d.hasOwnProperty("extend")){for(var T in d.extend)if(d.extend.hasOwnProperty(T)){var S=d.extend[T];T==="data"&&f.hasOwnProperty("data")&&typeof S=="object"?f.data.merge(S):T!=="sys"&&(f[T]=S)}}return f},getKey:function(u,d){if(u||(u="default"),typeof d=="function")return u;if(d instanceof h?u=d.sys.settings.key:typeof d=="object"&&d.hasOwnProperty("key")&&(u=d.key),this.keys.hasOwnProperty(u))throw new Error("Cannot add Scene with duplicate key: "+u);return u},getScenes:function(u,d){u===void 0&&(u=!0),d===void 0&&(d=!1);for(var f=[],v=this.scenes,m=0;m<v.length;m++){var y=v[m];y&&(!u||u&&y.sys.isActive())&&f.push(y)}return d?f.reverse():f},getScene:function(u){if(typeof u=="string"){if(this.keys[u])return this.keys[u]}else for(var d=0;d<this.scenes.length;d++)if(u===this.scenes[d])return u;return null},isActive:function(u){var d=this.getScene(u);return d?d.sys.isActive():null},isPaused:function(u){var d=this.getScene(u);return d?d.sys.isPaused():null},isVisible:function(u){var d=this.getScene(u);return d?d.sys.isVisible():null},isSleeping:function(u){var d=this.getScene(u);return d?d.sys.isSleeping():null},pause:function(u,d){var f=this.getScene(u);return f&&f.sys.pause(d),this},resume:function(u,d){var f=this.getScene(u);return f&&f.sys.resume(d),this},sleep:function(u,d){var f=this.getScene(u);return f&&!f.sys.isTransitioning()&&f.sys.sleep(d),this},wake:function(u,d){var f=this.getScene(u);return f&&f.sys.wake(d),this},run:function(u,d){var f=this.getScene(u);if(!f){for(var v=0;
5021v<this._pending.length;v++)if(this._pending[v].key===u){this.queueOp("start",u,d);break}return this}f.sys.isSleeping()?f.sys.wake(d):f.sys.isPaused()?f.sys.resume(d):this.start(u,d)},start:function(u,d){if(!this.isBooted)return this._data[u]={autoStart:!0,data:d},this;var f=this.getScene(u);if(!f)return console.warn("Scene key not found: "+u),this;var v=f.sys,m=v.settings.status;if(m>=p.START&&m<=p.CREATING)return this;if(m>=p.RUNNING&&m<=p.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(d);else{v.sceneUpdate=s,v.start(d);var y;if(v.load&&(y=v.load),y&&v.settings.hasOwnProperty("pack")&&(y.reset(),y.addPack({payload:v.settings.pack})))return v.settings.status=p.LOADING,y.once(e.COMPLETE,this.payloadComplete,this),y.start(),this}return this.bootScene(f),this},stop:function(u,d){var f=this.getScene(u);if(f&&!f.sys.isTransitioning()&&f.sys.settings.status!==p.SHUTDOWN){var v=f.sys.load;v&&(v.off(e.COMPLETE,this.loadComplete,this),v.off(e.COMPLETE,this.payloadComplete,this)),f.sys.shutdown(d)}return this},switch:function(u,d,f){var v=this.getScene(u),m=this.getScene(d);return v&&m&&v!==m&&(this.sleep(u),this.isSleeping(d)?this.wake(d,f):this.start(d,f)),this},getAt:function(u){return this.scenes[u]},getIndex:function(u){var d=this.getScene(u);return this.scenes.indexOf(d)},bringToTop:function(u){if(this.isProcessing)return this.queueOp("bringToTop",u);var d=this.getIndex(u),f=this.scenes;if(d!==-1&&d<f.length){var v=this.getScene(u);f.splice(d,1),f.push(v)}return this},sendToBack:function(u){if(this.isProcessing)return this.queueOp("sendToBack",u);var d=this.getIndex(u);if(d!==-1&&d>0){var f=this.getScene(u);this.scenes.splice(d,1),this.scenes.unshift(f)}return this},moveDown:function(u){if(this.isProcessing)return this.queueOp("moveDown",u);var d=this.getIndex(u);if(d>0){var f=d-1,v=this.getScene(u),m=this.getAt(f);this.scenes[d]=m,this.scenes[f]=v}return this},moveUp:function(u){if(this.isProcessing)return this.queueOp("moveUp",u);var d=this.getIndex(u);if(d<this.scenes.length-1){var f=d+1,v=this.getScene(u),m=this.getAt(f);this.scenes[d]=m,this.scenes[f]=v}return this},moveAbove:function(u,d){if(u===d)return this;if(this.isProcessing)return this.queueOp("moveAbove",u,d);var f=this.getIndex(u),v=this.getIndex(d);if(f!==-1&&v!==-1&&v<f){var m=this.getAt(v);this.scenes.splice(v,1),this.scenes.splice(f+(v>f),0,m)}return this},moveBelow:function(u,d){if(u===d)return this;if(this.isProcessing)return this.queueOp("moveBelow",u,d);var f=this.getIndex(u),v=this.getIndex(d);if(f!==-1&&v!==-1&&v>f){var m=this.getAt(v);this.scenes.splice(v,1),f===0?this.scenes.unshift(m):this.scenes.splice(f-(v<f),0,m)}return this},queueOp:function(u,d,f,v){return this._queue.push({op:u,keyA:d,keyB:f,data:v}),this},swapPosition:function(u,d){if(u===d)return this;if(this.isProcessing)return this.queueOp("swapPosition",u,d);var f=this.getIndex(u),v=this.getIndex(d);if(f!==v&&f!==-1&&v!==-1){var m=this.getAt(f);this.scenes[f]=this.scenes[v],this.scenes[v]=m}return this},dump:function(){for(var u=[],d=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],f=0;f<this.scenes.length;f++){var v=this.scenes[f].sys,m=v.settings.visible&&(v.settings.status===p.RUNNING||v.settings.status===p.PAUSED)?"[*] ":"[-] ";m+=v.settings.key+" ("+d[v.settings.status]+")",u.push(m)}console.log(u.join(`
5022`))},destroy:function(){for(var u=0;u<this.scenes.length;u++){var d=this.scenes[u].sys;d.destroy()}this.systemScene.sys.destroy(),this.update=s,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});c.exports=l},52209:(c,x,t)=>{/**
5023 * @author       Richard Davey <[email protected]>
5024 * @copyright    2013-2025 Phaser Studio Inc.
5025 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5026 */var o=t(45319),p=t(83419),a=t(44594),n=t(95540),r=t(37277),e=new p({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=n(s,"target",!1),i=this.manager.getScene(h);if(!h||!this.checkValidTransition(i))return!1;var l=n(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=l,this._willSleep=n(s,"sleep",!1),this._willRemove=n(s,"remove",!1);var u=n(s,"onUpdate",null);u&&(this._onUpdate=u,this._onUpdateScope=n(s,"onUpdateScope",this.scene));var d=n(s,"allowInput",!1);this.settings.transitionAllowInput=d;var f=i.sys.settings;f.isTransition=!0,f.transitionFrom=this.scene,f.transitionDuration=l,f.transitionAllowInput=d,n(s,"moveAbove",!1)?this.manager.moveAbove(this.key,h):n(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,h),i.sys.isSleeping()?i.sys.wake(n(s,"data")):this.manager.start(h,n(s,"data"));
vendor: 9,367 bytes, lines 5026-5062
5026var v=n(s,"onStart",null),m=n(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,l),this.systems.events.emit(a.TRANSITION_OUT,i,l),!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=o(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,l){return this.manager.add(s,h,i,l)},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,h){return s!==this.key&&this.manager.queueOp("switch",this.key,s,h),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 l=this.manager.getScene(h);return l&&l.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}});r.register("ScenePlugin",e,"scenePlugin"),c.exports=e},55681:(c,x,t)=>{/**
5027 * @author       Richard Davey <[email protected]>
5028 * @copyright    2013-2025 Phaser Studio Inc.
5029 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5030 */var o=t(89993),p=t(35154),a=t(46975),n=t(87033),r={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:o.PENDING,key:p(e,"key",""),active:p(e,"active",!1),visible:p(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:p(e,"pack",!1),cameras:p(e,"cameras",null),map:p(e,"map",a(n,p(e,"mapAdd",{}))),physics:p(e,"physics",{}),loader:p(e,"loader",{}),plugins:p(e,"plugins",!1),input:p(e,"input",{})}}};c.exports=r},2368:(c,x,t)=>{/**
5031 * @author       Richard Davey <[email protected]>
5032 * @copyright    2013-2025 Phaser Studio Inc.
5033 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5034 */var o=t(83419),p=t(89993),a=t(42363),n=t(44594),r=t(27397),e=t(52106),s=t(29747),h=t(55681),i=new o({initialize:function(u,d){this.scene=u,this.game,this.renderer,this.config=d,this.settings=h.create(d),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(l){this.settings.status=p.INIT,this.sceneUpdate=s,this.game=l,this.renderer=l.renderer,this.canvas=l.canvas,this.context=l.context;var u=l.plugins;this.plugins=u,u.addToScene(this,a.Global,[a.CoreScene,e(this),r(this)]),this.events.emit(n.BOOT,this),this.settings.isBooted=!0},step:function(l,u){var d=this.events;d.emit(n.PRE_UPDATE,l,u),d.emit(n.UPDATE,l,u),this.sceneUpdate.call(this.scene,l,u),d.emit(n.POST_UPDATE,l,u)},render:function(l){var u=this.displayList;u.depthSort(),this.events.emit(n.PRE_RENDER,l),this.cameras.render(l,u),this.events.emit(n.RENDER,l)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(l){var u=this.settings,d=this.getStatus();return d!==p.CREATING&&d!==p.RUNNING?console.warn("Cannot pause non-running Scene",u.key):this.settings.active&&(u.status=p.PAUSED,u.active=!1,this.events.emit(n.PAUSE,this,l)),this},resume:function(l){var u=this.events,d=this.settings;return this.settings.active||(d.status=p.RUNNING,d.active=!0,u.emit(n.RESUME,this,l)),this},sleep:function(l){var u=this.settings,d=this.getStatus();return d!==p.CREATING&&d!==p.RUNNING?console.warn("Cannot sleep non-running Scene",u.key):(u.status=p.SLEEPING,u.active=!1,u.visible=!1,this.events.emit(n.SLEEP,this,l)),this},wake:function(l){var u=this.events,d=this.settings;return d.status=p.RUNNING,d.active=!0,d.visible=!0,u.emit(n.WAKE,this,l),d.isTransition&&u.emit(n.TRANSITION_WAKE,d.transitionFrom,d.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var l=this.settings.status;return l>p.PENDING&&l<=p.RUNNING},isSleeping:function(){return this.settings.status===p.SLEEPING},isActive:function(){return this.settings.status===p.RUNNING},isPaused:function(){return this.settings.status===p.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(l){return this.settings.visible=l,this},setActive:function(l,u){return l?this.resume(u):this.pause(u)},start:function(l){var u=this.events,d=this.settings;l&&(d.data=l),d.status=p.START,d.active=!0,d.visible=!0,u.emit(n.START,this),u.emit(n.READY,this,l)},shutdown:function(l){var u=this.events,d=this.settings;u.off(n.TRANSITION_INIT),u.off(n.TRANSITION_START),u.off(n.TRANSITION_COMPLETE),u.off(n.TRANSITION_OUT),d.status=p.SHUTDOWN,d.active=!1,d.visible=!1,u.emit(n.SHUTDOWN,this,l)},destroy:function(){var l=this.events,u=this.settings;u.status=p.DESTROYED,u.active=!1,u.visible=!1,l.emit(n.DESTROY,this),l.removeAllListeners();for(var d=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],f=0;f<d.length;f++)this[d[f]]=null}});c.exports=i},89993:c=>{/**
5035 * @author       Richard Davey <[email protected]>
5036 * @copyright    2013-2025 Phaser Studio Inc.
5037 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5038 */var x={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};c.exports=x},69830:c=>{/**
5039 * @author       Richard Davey <[email protected]>
5040 * @copyright    2013-2025 Phaser Studio Inc.
5041 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5042 */c.exports="addedtoscene"},7919:c=>{/**
5043 * @author       Richard Davey <[email protected]>
5044 * @copyright    2013-2025 Phaser Studio Inc.
5045 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5046 */c.exports="boot"},46763:c=>{/**
5047 * @author       Richard Davey <[email protected]>
5048 * @copyright    2013-2025 Phaser Studio Inc.
5049 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5050 */c.exports="create"},11763:c=>{/**
5051 * @author       Richard Davey <[email protected]>
5052 * @copyright    2013-2025 Phaser Studio Inc.
5053 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5054 */c.exports="destroy"},71555:c=>{/**
5055 * @author       Richard Davey <[email protected]>
5056 * @copyright    2013-2025 Phaser Studio Inc.
5057 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5058 */c.exports="pause"},36735:c=>{/**
5059 * @author       Richard Davey <[email protected]>
5060 * @copyright    2013-2025 Phaser Studio Inc.
5061 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5062 */c.exports="postupdate"},3809:c=>
5062{/**
5063 * @author       samme
5064 * @copyright    2021 Photon Storm Ltd.
5065 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5066 */c.exports="prerender"},90716:c=>{/**
5067 * @author       Richard Davey <[email protected]>
5068 * @copyright    2013-2025 Phaser Studio Inc.
5069 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5070 */c.exports="preupdate"},58262:c=>{/**
5071 * @author       Richard Davey <[email protected]>
5072 * @copyright    2013-2025 Phaser Studio Inc.
5073 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5074 */c.exports="ready"},91633:c=>{/**
5075 * @author       Richard Davey <[email protected]>
5076 * @copyright    2013-2025 Phaser Studio Inc.
5077 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5078 */c.exports="removedfromscene"},10319:c=>{/**
5079 * @author       Richard Davey <[email protected]>
5080 * @copyright    2013-2025 Phaser Studio Inc.
5081 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5082 */c.exports="render"},87132:c=>{/**
5083 * @author       Richard Davey <[email protected]>
5084 * @copyright    2013-2025 Phaser Studio Inc.
5085 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5086 */c.exports="resume"},81961:c=>{/**
5087 * @author       Richard Davey <[email protected]>
5088 * @copyright    2013-2025 Phaser Studio Inc.
5089 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5090 */c.exports="shutdown"},90194:c=>{/**
5091 * @author       Richard Davey <[email protected]>
5092 * @copyright    2013-2025 Phaser Studio Inc.
5093 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5094 */c.exports="sleep"},6265:c=>{/**
5095 * @author       Richard Davey <[email protected]>
5096 * @copyright    2013-2025 Phaser Studio Inc.
5097 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5098 */c.exports="start"},33178:c=>{/**
5099 * @author       Richard Davey <[email protected]>
5100 * @copyright    2013-2025 Phaser Studio Inc.
5101 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5102 */c.exports="transitioncomplete"},43063:c=>{/**
5103 * @author       Richard Davey <[email protected]>
5104 * @copyright    2013-2025 Phaser Studio Inc.
5105 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5106 */c.exports="transitioninit"},11259:c=>{/**
5107 * @author       Richard Davey <[email protected]>
5108 * @copyright    2013-2025 Phaser Studio Inc.
5109 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5110 */c.exports="transitionout"},61611:c=>{/**
5111 * @author       Richard Davey <[email protected]>
5112 * @copyright    2013-2025 Phaser Studio Inc.
5113 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5114 */c.exports="transitionstart"},45209:c=>{/**
5115 * @author       Richard Davey <[email protected]>
5116 * @copyright    2013-2025 Phaser Studio Inc.
5117 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5118 */c.exports="transitionwake"},22966:c=>{/**
5119 * @author       Richard Davey <[email protected]>
5120 * @copyright    2013-2025 Phaser Studio Inc.
5121 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5122 */c.exports="update"},21747:c=>{/**
5123 * @author       Richard Davey <[email protected]>
5124 * @copyright    2013-2025 Phaser Studio Inc.
5125 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5126 */c.exports="wake"},44594:(c,x,t)=>{/**
5127 * @author       Richard Davey <[email protected]>
5128 * @copyright    2013-2025 Phaser Studio Inc.
5129 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5130 */c.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:(c,x,t)=>{/**
5131 * @author       Richard Davey <[email protected]>
5132 * @copyright    2013-2025 Phaser Studio Inc.
5133 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5134 */var o=t(89993),p=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=p(!1,a,o),c.exports=a},30341:(c,x,t)=>{/**
5135 * @author       Richard Davey <[email protected]>
5136 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5137 * @copyright    2013-2025 Phaser Studio Inc.
5138 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5139 */var o=t(83419),p=t(50792),a=t(14463),n=t(79291),r=t(29747),e=new o({Extends:p,initialize:function(h,i,l){p.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=n(this.config,l),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=n(!0,{name:"",start:0,duration:this.totalDuration-(s.start||0
5139),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]=n(!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=n(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:r,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)}});c.exports=e},85034:(c,x,t)=>{/**
5140 * @author       Richard Davey <[email protected]>
5141 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5142 * @copyright    2013-2025 Phaser Studio Inc.
5143 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5144 */var o=t(83419),p=t(41786),a=t(50792),n=t(14463),r=t(8443),e=t(46710),s=t(58731),h=t(29747),i=t(26099),l=new o({Extends:a,initialize:function(d){a.call(this),this.game=d,this.jsonCache=d.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new i;var f=d.events;f.on(r.BLUR,this.onGameBlur,this),f.on(r.FOCUS,this.onGameFocus,this),f.on(r.PRE_STEP,this.update,this),f.once(r.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(u,d){d===void 0&&(d={});var f=this.add(u,d);f.spritemap=this.jsonCache.get(u).spritemap;for(var v in f.spritemap)if(f.spritemap.hasOwnProperty(v)){var m=p(d),y=f.spritemap[v];m.loop=y.hasOwnProperty("loop")?y.loop:!1,f.addMarker({name:v,start:y.start,duration:y.end-y.start,config:m})}return f},get:function(u){return s(this.sounds,"key",u)},getAll:function(u){return u?e(this.sounds,"key",u):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(u,d){var f=this.add(u);return f.once(n.COMPLETE,f.destroy,f),d?d.name?(f.addMarker(d),f.play(d.name)):f.play(d):f.play()},playAudioSprite:function(u,d,f){var v=this.addAudioSprite(u);return v.once(n.COMPLETE,v.destroy,v),v.play(d,f)},remove:function(u){var d=this.sounds.indexOf(u);return d!==-1?(u.destroy(),this.sounds.splice(d,1),!0):!1},removeAll:function(){this.sounds.forEach(function(u){u.destroy()}),this.sounds.length=0},removeByKey:function(u){for(var d=0,f=this.sounds.length-1;f>=0;f--){var v=this.sounds[f];v.key===u&&(v.destroy(),this.sounds.splice(f,1),d++)}return d},pauseAll:function(){this.forEachActiveSound(function(u){u.pause()}),this.emit(n.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(u){u.resume()}),this.emit(n.RESUME_ALL,this)},setListenerPosition:h,stopAll:function(){this.forEachActiveSound(function(u){u.stop()}
5144),this.emit(n.STOP_ALL,this)},stopByKey:function(u){var d=0;return this.getAll(u).forEach(function(f){f.stop()&&d++}),d},isPlaying:function(u){var d=this.sounds,f=d.length-1,v;if(u===void 0){for(;f>=0;f--)if(v=this.sounds[f],v.isPlaying)return!0}else for(;f>=0;f--)if(v=this.sounds[f],v.key===u&&v.isPlaying)return!0;return!1},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(u,d){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(n.UNLOCKED,this));for(var f=this.sounds.length-1;f>=0;f--)this.sounds[f].pendingRemove&&this.sounds.splice(f,1);this.sounds.forEach(function(v){v.update(u,d)})},destroy:function(){this.game.events.off(r.BLUR,this.onGameBlur,this),this.game.events.off(r.FOCUS,this.onGameFocus,this),this.game.events.off(r.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(u,d){var f=this;this.sounds.forEach(function(v,m){v&&!v.pendingRemove&&u.call(d||f,v,m,f.sounds)})},setRate:function(u){return this.rate=u,this},rate:{get:function(){return this._rate},set:function(u){this._rate=u,this.forEachActiveSound(function(d){d.calculateRate()}),this.emit(n.GLOBAL_RATE,this,u)}},setDetune:function(u){return this.detune=u,this},detune:{get:function(){return this._detune},set:function(u){this._detune=u,this.forEachActiveSound(function(d){d.calculateRate()}),this.emit(n.GLOBAL_DETUNE,this,u)}}});c.exports=l},14747:(c,x,t)=>{/**
5145 * @author       Richard Davey <[email protected]>
5146 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5147 * @copyright    2013-2025 Phaser Studio Inc.
5148 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5149 */var o=t(33684),p=t(25960),a=t(57490),n={create:function(r){var e=r.config.audio,s=r.device.audio;return e.noAudio||!s.webAudio&&!s.audioData?new p(r):s.webAudio&&!e.disableWebAudio?new a(r):new o(r)}};c.exports=n},19723:c=>{/**
5150 * @author       Richard Davey <[email protected]>
5151 * @copyright    2013-2025 Phaser Studio Inc.
5152 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5153 */c.exports="complete"},98882:c=>{/**
5154 * @author       Richard Davey <[email protected]>
5155 * @copyright    2013-2025 Phaser Studio Inc.
5156 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5157 */c.exports="decodedall"},57506:c=>{/**
5158 * @author       Richard Davey <[email protected]>
5159 * @copyright    2013-2025 Phaser Studio Inc.
5160 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5161 */c.exports="decoded"},73146:c=>{/**
5162 * @author       Richard Davey <[email protected]>
5163 * @copyright    2013-2025 Phaser Studio Inc.
5164 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5165 */c.exports="destroy"},11305:c=>{/**
5166 * @author       Richard Davey <[email protected]>
5167 * @copyright    2013-2025 Phaser Studio Inc.
5168 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5169 */c.exports="detune"},40577:c=>{/**
5170 * @author       Richard Davey <[email protected]>
5171 * @copyright    2013-2025 Phaser Studio Inc.
5172 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5173 */c.exports="detune"},30333:c=>{/**
5174 * @author       Richard Davey <[email protected]>
5175 * @copyright    2013-2025 Phaser Studio Inc.
5176 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5177 */c.exports="mute"},20394:c=>{/**
5178 * @author       Richard Davey <[email protected]>
5179 * @copyright    2013-2025 Phaser Studio Inc.
5180 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5181 */c.exports="rate"},21802:c=>{/**
5182 * @author       Richard Davey <[email protected]>
5183 * @copyright    2013-2025 Phaser Studio Inc.
5184 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5185 */c.exports="volume"},1299:c=>{/**
5186 * @author       Richard Davey <[email protected]>
5187 * @copyright    2013-2025 Phaser Studio Inc.
5188 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5189 */c.exports="looped"},99190:c=>{/**
5190 * @author       Richard Davey <[email protected]>
5191 * @copyright    2013-2025 Phaser Studio Inc.
5192 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5193 */c.exports="loop"},97125:c=>{/**
5194 * @author       Richard Davey <[email protected]>
5195 * @copyright    2013-2025 Phaser Studio Inc.
5196 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5197 */c.exports="mute"},89259:c=>{/**
5198 * @author       pi-kei
5199 * @copyright    2013-2025 Phaser Studio Inc.
5200 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5201 */c.exports="pan"},79986:c=>{/**
5202 * @author       Richard Davey <[email protected]>
5203 * @copyright    2013-2025 Phaser Studio Inc.
5204 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5205 */c.exports="pauseall"},17586:c=>{/**
5206 * @author       Richard Davey <[email protected]>
5207 * @copyright    2013-2025 Phaser Studio Inc.
5208 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5209 */c.exports="pause"}
5209,19618:c=>{/**
5210 * @author       Richard Davey <[email protected]>
5211 * @copyright    2013-2025 Phaser Studio Inc.
5212 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5213 */c.exports="play"},42306:c=>{/**
5214 * @author       Richard Davey <[email protected]>
5215 * @copyright    2013-2025 Phaser Studio Inc.
5216 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5217 */c.exports="rate"},10387:c=>{/**
5218 * @author       Richard Davey <[email protected]>
5219 * @copyright    2013-2025 Phaser Studio Inc.
5220 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5221 */c.exports="resumeall"},48959:c=>{/**
5222 * @author       Richard Davey <[email protected]>
5223 * @copyright    2013-2025 Phaser Studio Inc.
5224 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5225 */c.exports="resume"},9960:c=>{/**
5226 * @author       Richard Davey <[email protected]>
5227 * @copyright    2013-2025 Phaser Studio Inc.
5228 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5229 */c.exports="seek"},19180:c=>{/**
5230 * @author       Richard Davey <[email protected]>
5231 * @copyright    2013-2025 Phaser Studio Inc.
5232 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5233 */c.exports="stopall"},98328:c=>{/**
5234 * @author       Richard Davey <[email protected]>
5235 * @copyright    2013-2025 Phaser Studio Inc.
5236 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5237 */c.exports="stop"},50401:c=>{/**
5238 * @author       Richard Davey <[email protected]>
5239 * @copyright    2013-2025 Phaser Studio Inc.
5240 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5241 */c.exports="unlocked"},52498:c=>{/**
5242 * @author       Richard Davey <[email protected]>
5243 * @copyright    2013-2025 Phaser Studio Inc.
5244 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5245 */c.exports="volume"},14463:(c,x,t)=>{/**
5246 * @author       Richard Davey <[email protected]>
5247 * @copyright    2013-2025 Phaser Studio Inc.
5248 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5249 */c.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:(c,x,t)=>{/**
5250 * @author       Richard Davey <[email protected]>
5251 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5252 * @copyright    2013-2025 Phaser Studio Inc.
5253 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5254 */var o=t(30341),p=t(83419),a=t(14463),n=t(45319),r=new p({Extends:o,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,o.call(this,s,h,i)},play:function(e,s){return this.manager.isLocked(this,"play",[e,s])||!o.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||!o.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||!o.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(a.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!o.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;e<this.tags.length;e++){var s=this.tags[e];if(s.dataset.used==="false")return s.dataset.used="true",this.audio=s,!0}if(!this.manager.override)return!1;var h=[];this.manager.forEachActiveSound(function(l){l.key===this.key&&l.audio&&h.push(l)},this),h.sort(function(l,u){return l.loop===u.loop?u.seek/u.duration-l.seek/l.duration:l.loop?1:-1});var i=h[0];return this.audio=i.audio,i.reset(),i.audio=null,i.startTime=0,i.previousTime=0,!0},playCatchPromise:function(){var e=this.audio.play();e&&e.catch(function(s){console.warn(s)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){o.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(e){if(this.isPlaying){if(this.startTime>0){this.startTime<e-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,e-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var s=this.currentMarker?this.currentMarker.start:0,h=s+this.duration,i=this.audio.currentTime;if(this.currentConfig.loop)i>=h-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-h),i=this.audio.currentTime):i<s&&(this.audio.currentTime+=s,i=this.audio.currentTime),i<this.previousTime&&this.emit
5254(a.LOOPED,this);else if(i>=h){this.reset(),this.stopAndReleaseAudioTag(),this.emit(a.COMPLETE,this);return}this.previousTime=i}},destroy:function(){o.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=n(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){o.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}});c.exports=r},33684:(c,x,t)=>{/**
5255 * @author       Richard Davey <[email protected]>
5256 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5257 * @copyright    2013-2025 Phaser Studio Inc.
5258 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5259 */var o=t(85034),p=t(83419),a=t(14463),n=t(64895),r=new p({Extends:o,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,o.call(this,s)},add:function(e,s){var h=new n(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(l,u){for(var d=0;d<u.length;d++)if(u[d].dataset.locked==="true")return e.locked=!0,!1;return!0}),!!this.locked){var s=!1,h=function(){s=!0},i=function(){if(s){s=!1;return}document.body.removeEventListener("touchmove",h),document.body.removeEventListener("touchend",i);var l=[];if(e.game.cache.audio.entries.each(function(d,f){for(var v=0;v<f.length;v++){var m=f[v];m.dataset.locked==="true"&&l.push(m)}return!0}),l.length!==0){var u=l[l.length-1];u.oncanplaythrough=function(){u.oncanplaythrough=null,l.forEach(function(d){d.dataset.locked="false"}),e.unlocked=!0},l.forEach(function(d){d.load()})}};this.once(a.UNLOCKED,function(){for(this.forEachActiveSound(function(u){u.currentMarker===null&&u.duration===0&&(u.duration=u.tags[0].duration),u.totalDuration=u.tags[0].duration});this.lockedActionsQueue.length;){var l=this.lockedActionsQueue.shift();l.sound[l.prop].apply?l.sound[l.prop].apply(l.sound,l.value||[]):l.sound[l.prop]=l.value}},this),document.body.addEventListener("touchmove",h,!1),document.body.addEventListener("touchend",i,!1)}},onBlur:function(){this.forEachActiveSound(function(e){e.isPlaying&&(this.onBlurPausedSounds.push(e),e.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(e){e.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){o.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(e,s,h){return e.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:e,prop:s,value:h}),!0):!1},setMute:function(e){return this.mute=e,this},mute:{get:function(){return this._mute},set:function(e){this._mute=e,this.forEachActiveSound(function(s){s.updateMute()}
vendor: 9,248 bytes, lines 5259-5279
5259),this.emit(a.GLOBAL_MUTE,this,e)}},setVolume:function(e){return this.volume=e,this},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this.forEachActiveSound(function(s){s.updateVolume()}),this.emit(a.GLOBAL_VOLUME,this,e)}}});c.exports=r},23717:(c,x,t)=>{/**
5260 * @author       Richard Davey <[email protected]>
5261 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5262 * @copyright    2013-2025 Phaser Studio Inc.
5263 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5264 */c.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:(c,x,t)=>{/**
5265 * @author       Richard Davey <[email protected]>
5266 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5267 * @copyright    2013-2025 Phaser Studio Inc.
5268 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5269 */var o=t(30341),p=t(83419),a=t(50792),n=t(79291),r=t(29747),e=function(){return!1},s=function(){return null},h=function(){return this},i=new p({Extends:a,initialize:function(u,d,f){f===void 0&&(f={}),a.call(this),this.manager=u,this.key=d,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=n({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},f),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:r,calculateRate:s,destroy:function(){o.prototype.destroy.call(this)}});c.exports=i},25960:(c,x,t)=>{/**
5270 * @author       Richard Davey <[email protected]>
5271 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5272 * @copyright    2013-2025 Phaser Studio Inc.
5273 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5274 */var o=t(85034),p=t(83419),a=t(50792),n=t(4603),r=t(29747),e=new p({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 n(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 o.prototype.get.call(this,s)},getAll:function(s){return o.prototype.getAll.call(this,s)},play:function(s,h){return!1},playAudioSprite:function(s,h,i){return!1},remove:function(s){return o.prototype.remove.call(this,s)},removeAll:function(){return o.prototype.removeAll.call(this)},removeByKey:function(s){return o.prototype.removeByKey.call(this,s)},stopByKey:function(s){return o.prototype.stopByKey.call(this,s)},onBlur:r,onFocus:r,onGameBlur:r,onGameFocus:r,pauseAll:r,resumeAll:r,stopAll:r,update:r,setRate:r,setDetune:r,setMute:r,setVolume:r,unlock:r,forEachActiveSound:function(s,h){o.prototype.forEachActiveSound.call(this,s,h)},destroy:function(){o.prototype.destroy.call(this)}});c.exports=e},71741:(c,x,t)=>{/**
5275 * @author       Richard Davey <[email protected]>
5276 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5277 * @copyright    2013-2025 Phaser Studio Inc.
5278 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5279 */var o=t(30341),p=t(83419),a=t(14463),n=t(95540),r=new p({Extends:o,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+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=s.context.createGain(),this.volumeNode=s.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),s.context.createPanner&&(this.spatialNode=s.context.createPanner(),this.volumeNode.connect(this.spatialNode)),s.context.createStereoPanner?(this.pannerNode=s.context.createStereoPanner(),s.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(s.destination)):s.context.createPanner?this.spatialNode.connect(s.destination):this.volumeNode.connect(s.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,o.call(this,s,h,i)},play:function(e,s){return o.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(a.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!o.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(a.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!o.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(a.RESUME,this),!0)},stop:function(){return o.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(a.STOP,this),!0):!1},createAndStartBufferSource:function(){var e=this.currentConfig.seek,s=this.currentConfig.delay,h=this.manager.context.currentTime+s,i=(this.currentMarker?this.currentMarker.start:0)+e,l=this.duration-e;this.playTime=h-e,this.startTime=h,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,h),Math.max(0,i),Math.max(0,l)),this.resetConfig()},createAndStartLoopBufferSource:function(){var e=this.getLoopTime(),s=this.currentMarker?this.currentMarker.start:0,h=this.duration;this.loopTime=e,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,e),Math.max(0,s),Math.max(0,h))},createBufferSource:function(){var e=this,s=this.manager.context.createBufferSource();return s.buffer=this.audioBuffer,s.connect(this.muteNode),s.onended=function(h){var i=h.target;(i===e.source||i===e.loopSource)&&(e.currentConfig.loop?e.hasLooped=!0:e.hasEnded=!0)},s},stopAndRemoveBufferSource:function(){if(this.source){var e=this.source;this.source=null,e.stop(),e.disconnect()}this.playTime=0,this.startTime=0,this.hasEnded=!1,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1});var e=this.currentConfig.source;if(e&&this.manager.context.createPanner){var s=this.spatialNode;s.panningModel=n(e,"panningModel","equalpower"),s.distanceModel=n(e,"distanceModel","inverse"),s.orientationX.value=n(e,"orientationX",0),s.orientationY.value=n(e,"orientationY",0),s.orientationZ.value=n(e,"orientationZ",-1),s.refDistance=n(e,"refDistance",1),s.maxDistance=n(e,"maxDistance",1e4),s.rolloffFactor=n(e,"rolloffFactor",1),s.coneInnerAngle=n(e,"coneInnerAngle",360),s.coneOuterAngle=n(e,"coneOuterAngle",0),s.coneOuterGain=n(e,"coneOuterGain",0),this.spatialSource=n(e,"follow",null),this.spatialSource||(s.positionX.value=n(e,"x",0),s.positionY.value=n(e,"y",0),s.positionZ.value=n(e,"z",0))}o.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(e){this.spatialNode&&(this.spatialNode.positionX.value=e)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(e){this.spatialNode&&(this.spatialNode.positionY.value=e)}},update:function(){if(this.isPlaying&&this.spatialSource){var e=n(this.spatialSource,"x",null),s=n(this.spatialSource,"y",null);e&&e!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=e),s&&s!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=s)}this.hasEnded?(o.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(a.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(a.LOOPED,this))},destroy:function(){this.pendingRemove||(o.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.pannerNode&&(this.pannerNode.disconnect(),this.pannerNode=null),this.spatialNode&&(this.spatialNode.disconnect(),this.spatialNode=null,this.spatialSource=null),this.rateUpdates.length=0,this.rateUpdates=null)},calculateRate:function(){o.prototype.calculateRate.call(this);var e=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,e),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,e)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartL
5279oopBufferSource()))},getCurrentTime:function(){for(var e=0,s=0;s<this.rateUpdates.length;s++){var h=0;s<this.rateUpdates.length-1?h=this.rateUpdates[s+1].time:h=this.manager.context.currentTime-this.playTime,e+=(h-this.rateUpdates[s].time)*this.rateUpdates[s].rate}return e},getLoopTime:function(){for(var e=0,s=0;s<this.rateUpdates.length-1;s++)e+=(this.rateUpdates[s+1].time-this.rateUpdates[s].time)*this.rateUpdates[s].rate;var h=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+h.time+(this.duration-e)/h.rate},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.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.calculateRate(),this.emit(a.DETUNE,this,e)}},setDetune:function(e){return this.detune=e,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(e){this.currentConfig.mute=e,this.muteNode.gain.setValueAtTime(e?0:1,0),this.emit(a.MUTE,this,e)}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(e){this.currentConfig.volume=e,this.volumeNode.gain.setValueAtTime(e,0),this.emit(a.VOLUME,this,e)}},setVolume:function(e){return this.volume=e,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.currentConfig.seek=e,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),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.isPlaying&&(this.stopAndRemoveLoopBufferSource(),e&&this.createAndStartLoopBufferSource()),this.emit(a.LOOP,this,e)}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(e){this.currentConfig.pan=e,this.pannerNode&&this.pannerNode.pan.setValueAtTime(e,this.manager.context.currentTime),this.emit(a.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});c.exports=r},57490:(c,x,t)=>{/**
5280 * @author       Richard Davey <[email protected]>
5281 * @author       Pavle Goloskokovic <[email protected]> (http://prunegames.com)
5282 * @copyright    2013-2025 Phaser Studio Inc.
5283 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5284 */var o=t(53134),p=t(85034),a=t(83419),n=t(14463),r=t(8443),e=t(71741),s=t(95540),h=new a({Extends:p,initialize:function(l){this.context=this.createAudioContext(l),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",p.call(this,l),this.locked&&(l.isBooted?this.unlock():l.events.once(r.BOOT,this.unlock,this)),l.events.on(r.VISIBLE,this.onGameVisible,this)},onGameVisible:function(){var i=this.context;window.setTimeout(function(){i&&(i.suspend(),i.resume())},100)},createAudioContext:function(i){var l=i.config.audio;if(l.context)return l.context.resume(),l.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,l){var u=new e(this,i,l);return this.sounds.push(u),u},decodeAudio:function(i,l){var u;Array.isArray(i)?u=i:u=[{key:i,data:l}];for(var d=this.game.cache.audio,f=u.length,v=0;v<u.length;v++){var m=u[v],y=m.key,g=m.data;typeof g=="string"&&(g=o(g));
vendor: 7,555 bytes, lines 5284-5296
5284var T=(function(E,M){d.add(E,M),this.emit(n.DECODED,E),f--,f===0&&this.emit(n.DECODED_ALL)}).bind(this,y),S=(function(E,M){console.error("Error decoding audio: "+E+" - ",M?M.message:""),f--,f===0&&this.emit(n.DECODED_ALL)}).bind(this,y);this.context.decodeAudioData(g,T,S)}},setListenerPosition:function(i,l){return i===void 0&&(i=this.game.scale.width/2),l===void 0&&(l=this.game.scale.height/2),this.listenerPosition.set(i,l),this},unlock:function(){var i=this,l=document.body,u=function d(){if(i.context&&l){var f=l.removeEventListener.bind(l);i.context.resume().then(function(){f("touchstart",d),f("touchend",d),f("mousedown",d),f("mouseup",d),f("keydown",d),i.unlocked=!0},function(){f("touchstart",d),f("touchend",d),f("mousedown",d),f("mouseup",d),f("keydown",d)})}};l&&(l.addEventListener("touchstart",u,!1),l.addEventListener("touchend",u,!1),l.addEventListener("mousedown",u,!1),l.addEventListener("mouseup",u,!1),l.addEventListener("keydown",u,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var i=this.context;i&&!this.locked&&(i.state==="suspended"||i.state==="interrupted")&&i.resume()},update:function(i,l){var u=this.context.listener,d=s(this.listenerPosition,"x",null),f=s(this.listenerPosition,"y",null);if(u&&u.positionX!==void 0)d&&d!==this._spatialx&&(this._spatialx=u.positionX.value=d),f&&f!==this._spatialy&&(this._spatialy=u.positionY.value=f);else if(u){d&&d!==this._spatialx&&(this._spatialx=d),f&&f!==this._spatialy&&(this._spatialy=f);var v=s(u,"z",0);u.setPosition(this._spatialx||0,this._spatialy||0,v)}p.prototype.update.call(this,i,l),this.gameLostFocus||this.onFocus()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var i=this;this.context.close().then(function(){i.context=null})}this.game.events.off(r.VISIBLE,this.onGameVisible,this),p.prototype.destroy.call(this)},setMute:function(i){return this.mute=i,this},mute:{get:function(){return this.masterMuteNode.gain.value===0},set:function(i){this.masterMuteNode.gain.setValueAtTime(i?0:1,0),this.emit(n.GLOBAL_MUTE,this,i)}},setVolume:function(i){return this.volume=i,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(i){this.masterVolumeNode.gain.setValueAtTime(i,0),this.emit(n.GLOBAL_VOLUME,this,i)}}});c.exports=h},73162:(c,x,t)=>{/**
5285 * @author       Richard Davey <[email protected]>
5286 * @copyright    2013-2025 Phaser Studio Inc.
5287 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5288 */var o=t(37105),p=t(83419),a=t(29747),n=t(19186),r=new p({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?o.Add(this.list,e):o.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,s,h){return h?o.AddAt(this.list,e,s):o.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]}),n(this.list,s),this):this},getByName:function(e){return o.GetFirst(this.list,"name",e)},getRandom:function(e,s){return o.GetRandom(this.list,e,s)},getFirst:function(e,s,h,i){return o.GetFirst(this.list,e,s,h,i)},getAll:function(e,s,h,i){return o.GetAll(this.list,e,s,h,i)},count:function(e,s){return o.CountAllMatching(this.list,e,s)},swap:function(e,s){o.Swap(this.list,e,s)},moveTo:function(e,s){return o.MoveTo(this.list,e,s)},moveAbove:function(e,s){return o.MoveAbove(this.list,e,s)},moveBelow:function(e,s){return o.MoveBelow(this.list,e,s)},remove:function(e,s){return s?o.Remove(this.list,e):o.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,s){return s?o.RemoveAt(this.list,e):o.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,s,h){return h?o.RemoveBetween(this.list,e,s):o.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 o.BringToTop(this.list,e)},sendToBack:function(e){return o.SendToBack(this.list,e)},moveUp:function(e){return o.MoveUp(this.list,e),e},moveDown:function(e){return o.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return o.Shuffle(this.list),this},replace:function(e,s){return o.Replace(this.list,e,s)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,s,h,i){return o.SetAll(this.list,e,s,h,i),this},each:function(e,s){for(var h=[null],i=2;i<arguments.length;i++)h.push(arguments[i]);for(i=0;i<this.list.length;i++)h[0]=this.list[i],e.apply(s,h)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?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.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});c.exports=r},90330:(c,x,t)=>{/**
5289 * @author       Richard Davey <[email protected]>
5290 * @copyright    2013-2025 Phaser Studio Inc.
5291 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5292 */var o=t(83419),p=new o({initialize:function(n){this.entries={},this.size=0,this.setAll(n)},setAll:function(a){if(Array.isArray(a))for(var n=0;n<a.length;n++)this.set(a[n][0],a[n][1]);return this},set:function(a,n){return this.has(a)||this.size++,this.entries[a]=n,this},get:function(a){if(this.has(a))return this.entries[a]},getArray:function(){var a=[],n=this.entries;for(var r in n)a.push(n[r]);return a},has:function(a){return this.entries.hasOwnProperty(a)},delete:function(a){return this.has(a)&&(delete this.entries[a],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(a){delete this.entries[a]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var a=[],n=this.entries;for(var r in n)a.push(n[r]);return a},dump:function(){var a=this.entries;console.group("Map");for(var n in a)console.log(n,a[n]);console.groupEnd()},each:function(a){var n=this.entries;for(var r in n)if(a(r,n[r])===!1)break;return this},contains:function(a){var n=this.entries;for(var r in n)if(n[r]===a)return!0;return!1},merge:function(a,n){n===void 0&&(n=!1);var r=this.entries,e=a.entries;for(var s in e)r.hasOwnProperty(s)&&n?r[s]=e[s]:this.set(s,e[s]);return this}});c.exports=p},25774:(c,x,t)=>{/**
5293 * @author       Richard Davey <[email protected]>
5294 * @copyright    2013-2025 Phaser Studio Inc.
5295 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5296 */var o=t(83419),p=t(50792),a=t(82348),n=new o({Extends:p,initialize:function(){p.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(r){return this._active.indexOf(r)>-1},isPending:function(r){return this._toProcess>0&&this._pending.indexOf(r)>-1},isDestroying:function(r){return this._destroy.indexOf(r)>-1},add:function(r){return this.checkQueue&&this.isActive(r)&&!this.isDestroying(r)||this.isPending(r)||(this._pending.push(r),this._toProcess++),r}
5296,remove:function(r){if(this.isPending(r)){var e=this._pending,s=e.indexOf(r);s!==-1&&e.splice(s,1)}else this.isActive(r)&&(this._destroy.push(r),this._toProcess++);return r},removeAll:function(){for(var r=this._active,e=this._destroy,s=r.length;s--;)e.push(r[s]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var r=this._destroy,e=this._active,s,h;for(s=0;s<r.length;s++){h=r[s];var i=e.indexOf(h);i!==-1&&(e.splice(i,1),this.emit(a.PROCESS_QUEUE_REMOVE,h))}for(r.length=0,r=this._pending,s=0;s<r.length;s++)h=r[s],(!this.checkQueue||this.checkQueue&&e.indexOf(h)===-1)&&(e.push(h),this.emit(a.PROCESS_QUEUE_ADD,h));return r.length=0,this._toProcess=0,e},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});c.exports=n},59542:(c,x,t)=>{/**
5297 * @author       Vladimir Agafonkin
5298 * @author       Richard Davey <[email protected]>
5299 * @copyright    2013-2025 Phaser Studio Inc.
5300 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5301 */var o=t(43886);function p(g){if(!(this instanceof p))return new p(g);this._maxEntries=Math.max(4,g||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}p.prototype={all:function(){return this._all(this.data,[])},search:function(g){var T=this.data,S=[],E=this.toBBox;if(!v(g,T))return S;for(var M=[],F,A,P,L;T;){for(F=0,A=T.children.length;F<A;F++)P=T.children[F],L=T.leaf?E(P):P,v(g,L)&&(T.leaf?S.push(P):f(g,L)?this._all(P,S):M.push(P));T=M.pop()}return S},collides:function(g){var T=this.data,S=this.toBBox;if(!v(g,T))return!1;for(var E=[],M,F,A,P;T;){for(M=0,F=T.children.length;M<F;M++)if(A=T.children[M],P=T.leaf?S(A):A,v(g,P)){if(T.leaf||f(g,P))return!0;E.push(A)}T=E.pop()}return!1},load:function(g){if(!(g&&g.length))return this;if(g.length<this._minEntries){for(var T=0,S=g.length;T<S;T++)this.insert(g[T]);return this}var E=this._build(g.slice(),0,g.length-1,0);if(!this.data.children.length)this.data=E;else if(this.data.height===E.height)this._splitRoot(this.data,E);else{if(this.data.height<E.height){var M=this.data;this.data=E,E=M}this._insert(E,this.data.height-E.height-1,!0)}return this},insert:function(g){return g&&this._insert(g,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(g,T){if(!g)return this;for(var S=this.data,E=this.toBBox(g),M=[],F=[],A,P,L,O;S||M.length;){if(S||(S=M.pop(),P=M[M.length-1],A=F.pop(),O=!0),S.leaf&&(L=a(g,S.children,T),L!==-1))return S.children.splice(L,1),M.push(S),this._condense(M),this;!O&&!S.leaf&&f(S,E)?(M.push(S),F.push(A),A=0,P=S,S=S.children[0]):P?(A++,S=P.children[A],O=!1):S=null}return this},toBBox:function(g){return g},compareMinX:s,compareMinY:h,toJSON:function(){return this.data},fromJSON:function(g){return this.data=g,this},_all:function(g,T){for(var S=[];g;)g.leaf?T.push.apply(T,g.children):S.push.apply(S,g.children),g=S.pop();return T},_build:function(g,T,S,E){var M=S-T+1,F=this._maxEntries,A;if(M<=F)return A=m(g.slice(T,S+1)),n(A,this.toBBox),A;E||(E=Math.ceil(Math.log(M)/Math.log(F)),F=Math.ceil(M/Math.pow(F,E-1))),A=m([]),A.leaf=!1,A.height=E;var P=Math.ceil(M/F),L=P*Math.ceil(Math.sqrt(F)),O,G,z,Y;for(y(g,T,S,L,this.compareMinX),O=T;O<=S;O+=L)for(z=Math.min(O+L-1,S),y(g,O,z,P,this.compareMinY),G=O;G<=z;G+=P)Y=Math.min(G+P-1,z),A.children.push(this._build(g,G,Y,E-1));return n(A,this.toBBox),A},_chooseSubtree:function(g,T,S,E){for(var M,F,A,P,L,O,G,z;E.push(T),!(T.leaf||E.length-1===S);){for(G=z=1/0,M=0,F=T.children.length;M<F;M++)A=T.children[M],L=i(A),O=u(g,A)-L,O<z?(z=O,G=L<G?L:G,P=A):O===z&&L<G&&(G=L,P=A);T=P||T.children[0]}return T},_insert:function(g,T,S){var E=this.toBBox,M=S?g:E(g),F=[],A=this._chooseSubtree(M,this.data,T,F);for(A.children.push(g),e(A,M);T>=0&&F[T].children.length>this._maxEntries;)this._split(F,T),T--;this._adjustParentBBoxes(M,F,T)},_split:function(g,T){var S=g[T],E=S.children.length,M=this._minEntries;this._chooseSplitAxis(S,M,E);var F=this._chooseSplitIndex(S,M,E),A=m(S.children.splice(F,S.children.length-F));A.height=S.height,A.leaf=S.leaf,n(S,this.toBBox),n(A,this.toBBox),T?g[T-1].children.push(A):this._splitRoot(S,A)},_splitRoot:function(g,T){this.data=m([g,T]),this.data.height=g.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},_chooseSplitIndex:function(g,T,S){var E,M,F,A,P,L,O,G;for(L=O=1/0,E=T;E<=S-T;E++)M=r(g,0,E,this.toBBox),F=r(g,E,S,this.toBBox),A=d(M,F),P=i(M)+i(F),A<L?(L=A,G=E,O=P<O?P:O):A===L&&P<O&&(O=P,G=E);return G},_chooseSplitAxis:function(g,T,S){var E=g.leaf?this.compareMinX:s,M=g.leaf?this.compareMinY:h,F=this._allDistMargin(g,T,S,E),A=this._allDistMargin(g,T,S,M);F<A&&g.children.sort(E)},_allDistMargin:function(g,T,S,E){g.children.sort(E);var M=this.toBBox,F=r(g,0,T,M),A=r(g,S-T,S,M),P=l(F)+l(A),L,O;for(L=T;L<S-T;L++)O=g.children[L],e(F,g.leaf?M(O):O),P+=l(F);for(L=S-T-1;L>=T;L--)O=g.children[L],e(A,g.leaf?M(O):O),P+=l(A);return P},_adjustParentBBoxes:function(g,T,S){for(var E=S;E>=0;E--)e(T[E],g)},_condense:function(g){for(var T=g.length-1,S;T>=0;T--)g[T].children.length===0?T>0?(S=g[T-1].children,S.splice(S.indexOf(g[T]),1)):this.clear():n(g[T],this.toBBox)},compareMinX:function(g,T){return g.left-T.left},compareMinY:function(g,T){return g.top-T.top},toBBox:function(g){return{minX:g.left,minY:g.top,maxX:g.right,maxY:g.bottom}}};function a(g,T,S){if(!S)return T.indexOf(g);for(var E=0;E<T.length;E++)if(S(g,T[E]))return E;return-1}function n(g,T){r(g,0,g.children.length,T,g)}function r(g,T,S,E,M){M||(M=m(null)),M.minX=1/0,M.minY=1/0,M.maxX=-1/0,M.maxY=-1/0;for(var F=T,A;F<S;F++)A=g.children[F],e(M,g.leaf?E(A):A);return M}function e(g,T){return g.minX=Math.min(g.minX,T.minX),g.minY=Math.min(g.minY,T.minY),g.maxX=Math.max(g.maxX,T.maxX),g.maxY=Math.max(g.maxY,T.maxY),g}function s(g,T){return g.minX-T.minX}function h(g,T){return g.minY-T.minY}
5301function i(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}function l(g){return g.maxX-g.minX+(g.maxY-g.minY)}function u(g,T){return(Math.max(T.maxX,g.maxX)-Math.min(T.minX,g.minX))*(Math.max(T.maxY,g.maxY)-Math.min(T.minY,g.minY))}function d(g,T){var S=Math.max(g.minX,T.minX),E=Math.max(g.minY,T.minY),M=Math.min(g.maxX,T.maxX),F=Math.min(g.maxY,T.maxY);return Math.max(0,M-S)*Math.max(0,F-E)}function f(g,T){return g.minX<=T.minX&&g.minY<=T.minY&&T.maxX<=g.maxX&&T.maxY<=g.maxY}function v(g,T){return T.minX<=g.maxX&&T.minY<=g.maxY&&T.maxX>=g.minX&&T.maxY>=g.minY}function m(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(g,T,S,E,M){for(var F=[T,S],A;F.length;)S=F.pop(),T=F.pop(),!(S-T<=E)&&(A=T+Math.ceil((S-T)/E/2)*E,o(g,A,T,S,M),F.push(T,A,A,S))}c.exports=p},35072:(c,x,t)=>{/**
5302 * @author       Richard Davey <[email protected]>
5303 * @copyright    2013-2025 Phaser Studio Inc.
5304 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5305 */var o=t(83419),p=new o({initialize:function(n){if(this.entries=[],Array.isArray(n))for(var r=0;r<n.length;r++)this.set(n[r])},set:function(a){return this.entries.indexOf(a)===-1&&this.entries.push(a),this},get:function(a,n){for(var r=0;r<this.entries.length;r++){var e=this.entries[r];if(e[a]===n)return e}},getArray:function(){return this.entries.slice(0)},delete:function(a){var n=this.entries.indexOf(a);return n>-1&&this.entries.splice(n,1),this},dump:function(){console.group("Set");for(var a=0;a<this.entries.length;a++){var n=this.entries[a];console.log(n)}console.groupEnd()},each:function(a,n){var r,e=this.entries.slice(),s=e.length;if(n)for(r=0;r<s&&a.call(n,e[r],r)!==!1;r++);else for(r=0;r<s&&a(e[r],r)!==!1;r++);return this},iterate:function(a,n){var r,e=this.entries.length;if(n)for(r=0;r<e&&a.call(n,this.entries[r],r)!==!1;r++);else for(r=0;r<e&&a(this.entries[r],r)!==!1;r++);return this},iterateLocal:function(a){var n,r=[];for(n=1;n<arguments.length;n++)r.push(arguments[n]);var e=this.entries.length;for(n=0;n<e;n++){var s=this.entries[n];s[a].apply(s,r)}return this},clear:function(){return this.entries.length=0,this},contains:function(a){return this.entries.indexOf(a)>-1},union:function(a){var n=new p;return a.entries.forEach(function(r){n.set(r)}),this.entries.forEach(function(r){n.set(r)}),n},intersect:function(a){var n=new p;return this.entries.forEach(function(r){a.contains(r)&&n.set(r)}),n},difference:function(a){var n=new p;return this.entries.forEach(function(r){a.contains(r)||n.set(r)}),n},size:{get:function(){return this.entries.length},set:function(a){return a<this.entries.length?this.entries.length=a:this.entries.length}}});c.exports=p},86555:(c,x,t)=>{/**
5306 * @author       Richard Davey <[email protected]>
5307 * @copyright    2013-2025 Phaser Studio Inc.
5308 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5309 */var o=t(45319),p=t(83419),a=t(56583),n=t(26099),r=new p({initialize:function(s,h,i,l){s===void 0&&(s=0),h===void 0&&(h=s),i===void 0&&(i=0),l===void 0&&(l=null),this._width=s,this._height=h,this._parent=l,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 n},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=o(e,0,this.maxWidth),this.minHeight=o(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=o(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=o(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 r.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 r.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case r.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(a(s,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case r.FIT:this.constrain(e,s,!0);break;case r.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=o(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=o(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,l=s===0?1:e/s;return h&&this.aspectRatio>l||!h&&this.aspectRatio<l?(e=a(e,i.x),s=e/this.aspectRatio,i.y>0&&(s=a(s,i.y),e=s*this.aspectRatio)):(h&&this.aspectRatio<l||!h&&this.aspectRatio>l)&&(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}
5309,set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});r.NONE=0,r.WIDTH_CONTROLS_HEIGHT=1,r.HEIGHT_CONTROLS_WIDTH=2,r.FIT=3,r.ENVELOP=4,c.exports=r},15238:c=>{/**
5310 * @author       Richard Davey <[email protected]>
5311 * @copyright    2013-2025 Phaser Studio Inc.
5312 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5313 */c.exports="add"},56187:c=>{/**
5314 * @author       Richard Davey <[email protected]>
5315 * @copyright    2013-2025 Phaser Studio Inc.
5316 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5317 */c.exports="remove"},82348:(c,x,t)=>{/**
5318 * @author       Richard Davey <[email protected]>
5319 * @copyright    2013-2025 Phaser Studio Inc.
5320 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5321 */c.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(c,x,t)=>{/**
5322 * @author       Richard Davey <[email protected]>
5323 * @copyright    2013-2025 Phaser Studio Inc.
5324 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5325 */c.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(c,x,t)=>{/**
5326 * @author       Richard Davey <[email protected]>
5327 * @copyright    2013-2025 Phaser Studio Inc.
5328 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5329 */var o=t(83419),p=t(45319),a=t(40987),n=t(8054),r=t(50030),e=t(79237),s=new o({Extends:e,initialize:function(i,l,u,d,f){e.call(this,i,l,u,d,f),this.add("__BASE",0,0,0,d,f),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=d,this.height=f,this.imageData=this.context.getImageData(0,0,d,f),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===n.WEBGL&&this.refresh(),this},draw:function(h,i,l,u){return u===void 0&&(u=!0),this.context.drawImage(l,h,i),u&&this.update(),this},drawFrame:function(h,i,l,u,d){l===void 0&&(l=0),u===void 0&&(u=0),d===void 0&&(d=!0);var f=this.manager.getFrame(h,i);if(f){var v=f.canvasData,m=f.cutWidth,y=f.cutHeight,g=f.source.resolution;this.context.drawImage(f.source.image,v.x,v.y,m,y,l,u,m/g,y/g),d&&this.update()}return this},setPixel:function(h,i,l,u,d,f){f===void 0&&(f=255),h=Math.abs(Math.floor(h)),i=Math.abs(Math.floor(i));var v=this.getIndex(h,i);if(v>-1){var m=this.context.getImageData(h,i,1,1);m.data[0]=l,m.data[1]=u,m.data[2]=d,m.data[3]=f,this.context.putImageData(m,h,i)}return this},putData:function(h,i,l,u,d,f,v){return u===void 0&&(u=0),d===void 0&&(d=0),f===void 0&&(f=h.width),v===void 0&&(v=h.height),this.context.putImageData(h,i,l,u,d,f,v),this},getData:function(h,i,l,u){h=p(Math.floor(h),0,this.width-1),i=p(Math.floor(i),0,this.height-1),l=p(l,1,this.width-h),u=p(u,1,this.height-i);var d=this.context.getImageData(h,i,l,u);return d},getPixel:function(h,i,l){l||(l=new a);var u=this.getIndex(h,i);if(u>-1){var d=this.data,f=d[u+0],v=d[u+1],m=d[u+2],y=d[u+3];l.setTo(f,v,m,y)}return l},getPixels:function(h,i,l,u){h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=this.width),u===void 0&&(u=l),h=Math.abs(Math.round(h)),i=Math.abs(Math.round(i));for(var d=p(h,0,this.width),f=p(h+l,0,this.width),v=p(i,0,this.height),m=p(i+u,0,this.height),y=new a,g=[],T=v;T<m;T++){for(var S=[],E=d;E<f;
5329E++)y=this.getPixel(E,T,y),S.push({x:E,y:T,color:y.color,alpha:y.alphaGL});g.push(S)}return g},getIndex:function(h,i){return h=Math.abs(Math.round(h)),i=Math.abs(Math.round(i)),h<this.width&&i<this.height?(h+i*this.width)*4:-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(h,i,l,u,d){return h===void 0&&(h=0),i===void 0&&(i=0),l===void 0&&(l=this.width),u===void 0&&(u=this.height),d===void 0&&(d=!0),this.context.clearRect(h,i,l,u),d&&this.update(),this},setSize:function(h,i){return i===void 0&&(i=h),(h!==this.width||i!==this.height)&&(this.canvas.width=h,this.canvas.height=i,this._source.width=h,this._source.height=i,this._source.isPowerOf2=r(h,i),this.frames.__BASE.setSize(h,i,0,0),this.width=h,this.height=i,this.refresh()),this},destroy:function(){e.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});c.exports=s},81320:(c,x,t)=>{/**
5330 * @author       Richard Davey <[email protected]>
5331 * @copyright    2013-2025 Phaser Studio Inc.
5332 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5333 */var o=t(10312),p=t(38058),a=t(27919),n=t(83419),r=t(8054),e=t(4327),s=t(95540),h=t(36060),i=t(32302),l=t(79237),u=t(70554),d=new n({Extends:l,initialize:function(v,m,y,g,T){y===void 0&&(y=256),g===void 0&&(g=256),T===void 0&&(T=!0),this.type="DynamicTexture";var S=v.game.renderer,E=S&&S.type===r.CANVAS,M=E?a.create2D(this,y,g):[this];l.call(this,v,m,M,y,g),this.add("__BASE",0,0,0,y,g),this.renderer=S,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=E?M:null,this.context=E?M.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new p(0,0,y,g).setScene(v.game.scene.systemScene,!1),this.renderTarget=E?null:new i(S,y,g,1,0,!1,!1,!0,!1),this.pipeline=E?null:S.pipelines.get(h.SINGLE_PIPELINE),this.setSize(y,g,T)},setSize:function(f,v,m){v===void 0&&(v=f),m===void 0&&(m=!0),m&&(f=Math.floor(f),v=Math.floor(v),f%2!==0&&f++,v%2!==0&&v++);var y=this.get(),g=y.source;if(f!==this.width||v!==this.height){this.canvas&&(this.canvas.width=f,this.canvas.height=v);var T=this.renderTarget;T&&(T.willResize(f,v)&&T.resize(f,v),T.texture!==g.glTexture&&this.renderer.deleteTexture(g.glTexture),this.setFromRenderTarget()),this.camera.setSize(f,v),g.width=f,g.height=v,y.setSize(f,v),this.width=f,this.height=v}else{var S=this.getSourceImage();y.cutX+f>S.width&&(f=S.width-y.cutX),y.cutY+v>S.height&&(v=S.height-y.cutY),y.setSize(f,v,y.cutX,y.cutY)}return this},setFromRenderTarget:function(){var f=this.get(),v=f.source,m=this.renderTarget;return v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=m.texture,this},setIsSpriteTexture:function(f){return this.isSpriteTexture=f,this},fill:function(f,v,m,y,g,T){var S=this.camera,E=this.renderer;v===void 0&&(v=1),m===void 0&&(m=0),y===void 0&&(y=0),g===void 0&&(g=this.width),T===void 0&&(T=this.height);var M=f>>16&255,F=f>>8&255,A=f&255,P=this.renderTarget;if(S.preRender(),P){P.bind(!0);var L=this.pipeline.manager.set(this.pipeline),O=E.width/P.width,G=E.height/P.height,z=P.height-(y+T);L.drawFillRect(m*O,z*G,g*O,T*G,u.getTintFromFloats(A/255,F/255,M/255,1),v),P.unbind(!0)}else{var Y=this.context;E.setContext(Y),Y.globalCompositeOperation="source-over",Y.fillStyle="rgba("+M+","+F+","+A+","+v+")",Y.fillRect(m,y,g,T),E.setContext()}return this.dirty=!0,this},clear:function(f,v,m,y){if(this.dirty){var g=this.context,T=this.renderTarget;T?T.clear(f,v,m,y):g&&(f!==void 0&&v!==void 0&&m!==void 0&&y!==void 0?g.clearRect(f,v,m,y):(g.save(),g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,this.width,this.height),g.restore())),this.dirty=!1}return this},stamp:function(f,v,m,y,g){m===void 0&&(m=0),y===void 0&&(y=0);var T=s(g,"alpha",1),S=s(g,"tint",16777215),E=s(g,"angle",0),M=s(g,"rotation",0),F=s(g,"scale",1),A=s(g,"scaleX",F),P=s(g,"scaleY",F),L=s(g,"originX",.5),O=s(g,"originY",.5),G=s(g,"blendMode",0),z=s(g,"erase",!1),Y=s(g,"skipBatch",!1),X=this.manager.resetStamp(T,S);return X.setAngle(0),E!==0?X.setAngle(E):M!==0&&X.setRotation(M),X.setScale(A,P),X.setTexture(f,v),
5333X.setOrigin(L,O),X.setBlendMode(G),z&&(this._eraseMode=!0),Y?this.batchGameObject(X,m,y):this.draw(X,m,y),z&&(this._eraseMode=!1),this},erase:function(f,v,m){return this._eraseMode=!0,this.draw(f,v,m),this._eraseMode=!1,this},draw:function(f,v,m,y,g){return this.beginDraw(),this.batchDraw(f,v,m,y,g),this.endDraw(),this},drawFrame:function(f,v,m,y,g,T){return this.beginDraw(),this.batchDrawFrame(f,v,m,y,g,T),this.endDraw(),this},repeat:function(f,v,m,y,g,T,S,E,M){if(m===void 0&&(m=0),y===void 0&&(y=0),g===void 0&&(g=this.width),T===void 0&&(T=this.height),S===void 0&&(S=1),E===void 0&&(E=16777215),M===void 0&&(M=!1),f instanceof e?v=f:v=this.manager.getFrame(f,v),!v)return this;var F=this.manager.resetStamp(S,E);F.setFrame(v),F.setOrigin(0);var A=v.width,P=v.height;g=Math.floor(g),T=Math.floor(T);var L=Math.ceil(g/A),O=Math.ceil(T/P),G=L*A-g,z=O*P-T;G>0&&(G=A-G),z>0&&(z=P-z),m<0&&(L+=Math.ceil(Math.abs(m)/A)),y<0&&(O+=Math.ceil(Math.abs(y)/P));var Y=m,X=y,I=!1,U=this.manager.stampCrop.setTo(0,0,A,P);M||this.beginDraw();for(var D=0;D<O;D++){if(X+P<0){X+=P;continue}for(var V=0;V<L;V++){if(I=!1,Y+A<0){Y+=A;continue}else Y<0&&(I=!0,U.width=A+Y,U.x=A-U.width);X<0&&(I=!0,U.height=P+X,U.y=P-U.height),G>0&&V===L-1&&(I=!0,U.width=G),z>0&&D===O-1&&(I=!0,U.height=z),I&&F.setCrop(U),this.batchGameObject(F,Y,X),F.isCropped=!1,U.setTo(0,0,A,P),Y+=A}Y=m,X+=P}return M||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var f=this.camera,v=this.renderer,m=this.renderTarget;f.preRender(),m?v.beginCapture(m.width,m.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(f,v,m,y,g){return Array.isArray(f)||(f=[f]),this.batchList(f,v,m,y,g),this},batchDrawFrame:function(f,v,m,y,g,T){m===void 0&&(m=0),y===void 0&&(y=0),g===void 0&&(g=1),T===void 0&&(T=16777215);var S=this.manager.getFrame(f,v);return S&&(this.renderTarget?this.pipeline.batchTextureFrame(S,m,y,T,g,this.camera.matrix,null):this.batchTextureFrame(S,m,y,g,T)),this},endDraw:function(f){if(f===void 0&&(f=this._eraseMode),this.isDrawing){var v=this.renderer,m=this.renderTarget;if(m){var y=v.endCapture(),g=v.pipelines.setUtility();g.blitFrame(y,m,1,!1,!1,f,this.isSpriteTexture),v.resetScissor(),v.resetViewport()}else v.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(f,v,m,y,g){var T=f.length;if(T!==0)for(var S=0;S<T;S++){var E=f[S];!E||E===this||(E.renderWebGL||E.renderCanvas?this.batchGameObject(E,v,m):E.isParent||E.list?this.batchGroup(E.getChildren(),v,m):typeof E=="string"?this.batchTextureFrameKey(E,null,v,m,y,g):E instanceof e?this.batchTextureFrame(E,v,m,y,g):Array.isArray(E)&&this.batchList(E,v,m,y,g))}},batchGroup:function(f,v,m){v===void 0&&(v=0),m===void 0&&(m=0);for(var y=0;y<f.length;y++){var g=f[y];g.willRender(this.camera)&&this.batchGameObject(g,g.x+v,g.y+m)}},batchGameObject:function(f,v,m){v===void 0&&(v=f.x),m===void 0&&(m=f.y);var y=f.x,g=f.y,T=this.camera,S=this.renderer,E=this._eraseMode,M=f.mask;if(f.setPosition(v,m),this.canvas){if(E){var F=f.blendMode;f.blendMode=o.ERASE}M&&M.preRenderCanvas(S,f,T),f.renderCanvas(S,f,T,null),M&&M.postRenderCanvas(S,f,T),E&&(f.blendMode=F)}else S&&(M&&M.preRenderWebGL(S,f,T),E||S.setBlendMode(f.blendMode),f.renderWebGL(S,f,T),M&&M.postRenderWebGL(S,T,this.renderTarget));f.setPosition(y,g)},batchTextureFrameKey:function(f,v,m,y,g,T){var S=this.manager.getFrame(f,v);S&&this.batchTextureFrame(S,m,y,g,T)},batchTextureFrame:function(f,v,m,y,g){v===void 0&&(v=0),m===void 0&&(m=0),y===void 0&&(y=1),g===void 0&&(g=16777215);var T=this.camera.matrix,S=this.renderTarget;if(S)this.pipeline.batchTextureFrame(f,v,m,g,y,T,null);else{var E=this.context,M=f.canvasData,F=f.source.image;E.save(),E.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",E.globalAlpha=y,T.setToContext(E),M.width>0&&M.height>0&&E.drawImage(F,M.x,M.y,M.width,M.height,v,m,M.width,M.height),E.restore()}},snapshotArea:function(f,v,m,y,g,T,S){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,g,!1,f,v,m,y,T,S):this.renderer.snapshotCanvas(this.canvas,g,!1,f,v,m,y,T,S),this},snapshot:function(f,v,m){return this.snapshotArea(0,0,this.width,this.height,f,v,m)},snapshotPixel:function(f,v,m){return this.snapshotArea(f,v,1,1,m,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(f,v,m,y){var g=this.manager.resetStamp();g.setTexture(this),g.setOrigin(0),g.renderWebGL(f,g,m,y)},renderCanvas:function(){},destroy:function(){var f=this.manager.stamp;f&&f.texture===this&&this.manager.resetStamp(),l.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}});c.exports=d},4327:(c,x,t)=>{/**
5334 * @author       Richard Davey <[email protected]>
5335 * @copyright    2013-2025 Phaser Studio Inc.
5336 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5337 */var o=t(83419),p=t(45319),a=t(79291),n=new o({initialize:function(e,s,h,i,l,u,d){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}
5337,is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(u,d,i,l)},setCutPosition:function(r,e){return r===void 0&&(r=0),e===void 0&&(e=0),this.cutX=r,this.cutY=e,this.updateUVs()},setCutSize:function(r,e){return this.cutWidth=r,this.cutHeight=e,this.updateUVs()},setSize:function(r,e,s,h){s===void 0&&(s=0),h===void 0&&(h=0),this.setCutPosition(s,h),this.setCutSize(r,e),this.width=r,this.height=e,this.halfWidth=Math.floor(r*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(r/2),this.centerY=Math.floor(e/2);var i=this.data,l=i.cut;l.x=s,l.y=h,l.w=r,l.h=e,l.r=s+r,l.b=h+e,i.sourceSize.w=r,i.sourceSize.h=e,i.spriteSourceSize.w=r,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(r*r+e*e);var u=i.drawImage;return u.x=s,u.y=h,u.width=r,u.height=e,this.updateUVs()},setTrim:function(r,e,s,h,i,l){var u=this.data,d=u.spriteSourceSize;return u.trim=!0,u.sourceSize.w=r,u.sourceSize.h=e,d.x=s,d.y=h,d.w=i,d.h=l,d.r=s+i,d.b=h+l,this.x=s,this.y=h,this.width=i,this.height=l,this.halfWidth=i*.5,this.halfHeight=l*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(l/2),this.updateUVs()},setScale9:function(r,e,s,h){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&h===this.height,i.scale9Borders.x=r,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=h,this},setCropUVs:function(r,e,s,h,i,l,u){var d=this.cutX,f=this.cutY,v=this.cutWidth,m=this.cutHeight,y=this.realWidth,g=this.realHeight;e=p(e,0,y),s=p(s,0,g),h=p(h,0,y-e),i=p(i,0,g-s);var T=d+e,S=f+s,E=h,M=i,F=this.data;if(F.trim){var A=F.spriteSourceSize;h=p(h,0,A.x+v-e),i=p(i,0,A.y+m-s);var P=e+h,L=s+i,O=!(A.r<e||A.b<s||A.x>P||A.y>L);if(O){var G=Math.max(A.x,e),z=Math.max(A.y,s),Y=Math.min(A.r,P)-G,X=Math.min(A.b,L)-z;E=Y,M=X,l?T=d+(v-(G-A.x)-Y):T=d+(G-A.x),u?S=f+(m-(z-A.y)-X):S=f+(z-A.y),e=G,s=z,h=Y,i=X}else T=0,S=0,E=0,M=0}else l&&(T=d+(v-e-h)),u&&(S=f+(m-s-i));var I=this.source.width,U=this.source.height;return r.u0=Math.max(0,T/I),r.v0=Math.max(0,S/U),r.u1=Math.min(1,(T+E)/I),r.v1=Math.min(1,(S+M)/U),r.x=e,r.y=s,r.cx=T,r.cy=S,r.cw=E,r.ch=M,r.width=h,r.height=i,r.flipX=l,r.flipY=u,r},updateCropUVs:function(r,e,s){return this.setCropUVs(r,r.x,r.y,r.width,r.height,e,s)},setUVs:function(r,e,s,h,i,l){var u=this.data.drawImage;return u.width=r,u.height=e,this.u0=s,this.v0=h,this.u1=i,this.v1=l,this},updateUVs:function(){var r=this.cutX,e=this.cutY,s=this.cutWidth,h=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=h;var l=this.source.width,u=this.source.height;return this.u0=r/l,this.v0=e/u,this.u1=(r+s)/l,this.v1=(e+h)/u,this},updateUVsInverted:function(){var r=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/r,this.v0=this.cutY/e,this.u1=this.cutX/r,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var r=new n(this.texture,this.name,this.sourceIndex);return r.cutX=this.cutX,r.cutY=this.cutY,r.cutWidth=this.cutWidth,r.cutHeight=this.cutHeight,r.x=this.x,r.y=this.y,r.width=this.width,r.height=this.height,r.halfWidth=this.halfWidth,r.halfHeight=this.halfHeight,r.centerX=this.centerX,r.centerY=this.centerY,r.rotated=this.rotated,r.data=a(!0,r.data,this.data),r.updateUVs(),r},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}}});c.exports=n},79237:(c,x,t)=>{/**
5338 * @author       Richard Davey <[email protected]>
5339 * @copyright    2013-2025 Phaser Studio Inc.
5340 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5341 */var o=t(83419),p=t(4327),a=t(11876),n='Texture "%s" has no frame "%s"',r=new o({initialize:function(s,h,i,l,u){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 d=0;d<i.length;
5341d++)this.source.push(new a(this,i[d],l,u))},add:function(e,s,h,i,l,u){if(this.has(e))return null;var d=new p(this,e,s,h,i,l,u);return this.frames[e]=d,this.firstFrame==="__BASE"&&(this.firstFrame=e),this.frameTotal++,d},remove:function(e){if(this.has(e)){var s=this.get(e);return s.destroy(),delete this.frames[e],!0}return!1},has:function(e){return this.frames.hasOwnProperty(e)},get:function(e){e||(e=this.firstFrame);var s=this.frames[e];return s||(console.warn(n,this.key,e),s=this.frames[this.firstFrame]),s},getTextureSourceIndex:function(e){for(var s=0;s<this.source.length;s++)if(this.source[s]===e)return s;return-1},getFramesFromTextureSource:function(e,s){s===void 0&&(s=!1);var h=[];for(var i in this.frames)if(!(i==="__BASE"&&!s)){var l=this.frames[i];l.sourceIndex===e&&h.push(l)}return h},getFrameBounds:function(e){e===void 0&&(e=0);for(var s=this.getFramesFromTextureSource(e,!0),h=s[0],i=h.cutX,l=h.cutY,u=h.cutX+h.cutWidth,d=h.cutY+h.cutHeight,f=1;f<s.length;f++){var v=s[f];v.cutX<i&&(i=v.cutX),v.cutY<l&&(l=v.cutY),v.cutX+v.cutWidth>u&&(u=v.cutX+v.cutWidth),v.cutY+v.cutHeight>d&&(d=v.cutY+v.cutHeight)}return{x:i,y:l,width:u-i,height:d-l}},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(n,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(n,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<e.length;s++){var h=this.source[s];this.dataSource.push(new a(this,e[s],h.width,h.height))}},setFilter:function(e){var s;for(s=0;s<this.source.length;s++)this.source[s].setFilter(e);for(s=0;s<this.dataSource.length;s++)this.dataSource[s].setFilter(e)},destroy:function(){var e,s=this.source,h=this.dataSource;for(e=0;e<s.length;e++)s[e]&&s[e].destroy();for(e=0;e<h.length;e++)h[e]&&h[e].destroy();for(var i in this.frames){var l=this.frames[i];l&&l.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});c.exports=r},17130:(c,x,t)=>{/**
5342 * @author       Richard Davey <[email protected]>
5343 * @copyright    2013-2025 Phaser Studio Inc.
5344 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5345 */var o=t(27919),p=t(57382),a=t(83419),n=t(40987),r=t(8054),e=t(81320),s=t(50792),h=t(69442),i=t(4327),l=t(8443),u=t(99584),d=t(35154),f=t(88571),v=t(41212),m=t(61309),y=t(87841),g=t(79237),T=new a({Extends:s,initialize:function(E){s.call(this),this.game=E,this.name="TextureManager",this.list={},this._tempCanvas=o.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,E.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(h.LOAD,this.updatePending,this),this.on(h.ERROR,this.updatePending,this);var S=this.game.config;S.defaultImage!==null&&this.addBase64("__DEFAULT",S.defaultImage),S.missingImage!==null&&this.addBase64("__MISSING",S.missingImage),S.whiteImage!==null&&this.addBase64("__WHITE",S.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(l.DESTROY,this.destroy,this),this.game.events.once(l.SYSTEM_READY,function(E){this.stamp=new f(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(S){return!S||typeof S!="string"||this.exists(S)?(this.silentWarnings||console.error("Texture key already in use: "+S),!1):!0},remove:function(S){if(typeof S=="string")if(this.exists(S))S=this.get(S);else return this.silentWarnings||console.warn("No texture found matching key: "+S),this;var E=S.key;
5345return this.list.hasOwnProperty(E)&&(S.destroy(),this.emit(h.REMOVE,E),this.emit(h.REMOVE_KEY+E)),this},removeKey:function(S){return this.list.hasOwnProperty(S)&&delete this.list[S],this},addBase64:function(S,E){if(this.checkKey(S)){var M=this,F=new Image;F.onerror=function(){M.emit(h.ERROR,S)},F.onload=function(){var A=M.create(S,F);A&&(m.Image(A,0),M.emit(h.ADD,S,A),M.emit(h.ADD_KEY+S,A),M.emit(h.LOAD,S,A))},F.src=E}return this},getBase64:function(S,E,M,F){M===void 0&&(M="image/png"),F===void 0&&(F=.92);var A="",P=this.getFrame(S,E);if(P&&(P.source.isRenderTexture||P.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(P){var L=P.canvasData,O=o.create2D(this,L.width,L.height),G=O.getContext("2d",{willReadFrequently:!0});L.width>0&&L.height>0&&G.drawImage(P.source.image,L.x,L.y,L.width,L.height,0,0,L.width,L.height),A=O.toDataURL(M,F),o.remove(O)}return A},addImage:function(S,E,M){var F=null;return this.checkKey(S)&&(F=this.create(S,E),m.Image(F,0),M&&F.setDataSource(M),this.emit(h.ADD,S,F),this.emit(h.ADD_KEY+S,F)),F},addGLTexture:function(S,E){var M=null;if(this.checkKey(S)){var F=E.width,A=E.height;M=this.create(S,E,F,A),M.add("__BASE",0,0,0,F,A),this.emit(h.ADD,S,M),this.emit(h.ADD_KEY+S,M)}return M},addCompressedTexture:function(S,E,M){var F=null;if(this.checkKey(S)){if(F=this.create(S,E),F.add("__BASE",0,0,0,E.width,E.height),M){var A=function(L,O,G){Array.isArray(G.textures)||Array.isArray(G.frames)?m.JSONArray(L,O,G):m.JSONHash(L,O,G)};if(Array.isArray(M))for(var P=0;P<M.length;P++)A(F,P,M[P]);else A(F,0,M)}this.emit(h.ADD,S,F),this.emit(h.ADD_KEY+S,F)}return F},addRenderTexture:function(S,E){var M=null;return this.checkKey(S)&&(M=this.create(S,E),M.add("__BASE",0,0,0,E.width,E.height),this.emit(h.ADD,S,M),this.emit(h.ADD_KEY+S,M)),M},generate:function(S,E){if(this.checkKey(S)){var M=o.create(this,1,1);return E.canvas=M,u(E),this.addCanvas(S,M)}else return null},createCanvas:function(S,E,M){if(E===void 0&&(E=256),M===void 0&&(M=256),this.checkKey(S)){var F=o.create(this,E,M,r.CANVAS,!0);return this.addCanvas(S,F)}return null},addCanvas:function(S,E,M){M===void 0&&(M=!1);var F=null;return M?F=new p(this,S,E,E.width,E.height):this.checkKey(S)&&(F=new p(this,S,E,E.width,E.height),this.list[S]=F,this.emit(h.ADD,S,F),this.emit(h.ADD_KEY+S,F)),F},addDynamicTexture:function(S,E,M){var F=null;return typeof S=="string"&&!this.exists(S)?F=new e(this,S,E,M):(F=S,S=F.key),this.checkKey(S)?(this.list[S]=F,this.emit(h.ADD,S,F),this.emit(h.ADD_KEY+S,F)):F=null,F},addAtlas:function(S,E,M,F){return Array.isArray(M.textures)||Array.isArray(M.frames)?this.addAtlasJSONArray(S,E,M,F):this.addAtlasJSONHash(S,E,M,F)},addAtlasJSONArray:function(S,E,M,F){var A=null;if(E instanceof g?(S=E.key,A=E):this.checkKey(S)&&(A=this.create(S,E)),A){if(Array.isArray(M))for(var P=M.length===1,L=0;L<A.source.length;L++){var O=P?M[0]:M[L];m.JSONArray(A,L,O)}else m.JSONArray(A,0,M);F&&A.setDataSource(F),this.emit(h.ADD,S,A),this.emit(h.ADD_KEY+S,A)}return A},addAtlasJSONHash:function(S,E,M,F){var A=null;if(E instanceof g?(S=E.key,A=E):this.checkKey(S)&&(A=this.create(S,E)),A){if(Array.isArray(M))for(var P=0;P<M.length;P++)m.JSONHash(A,P,M[P]);else m.JSONHash(A,0,M);F&&A.setDataSource(F),this.emit(h.ADD,S,A),this.emit(h.ADD_KEY+S,A)}return A},addAtlasXML:function(S,E,M,F){var A=null;return E instanceof g?(S=E.key,A=E):this.checkKey(S)&&(A=this.create(S,E)),A&&(m.AtlasXML(A,0,M),F&&A.setDataSource(F),this.emit(h.ADD,S,A),this.emit(h.ADD_KEY+S,A)),A},addUnityAtlas:function(S,E,M,F){var A=null;return E instanceof g?(S=E.key,A=E):this.checkKey(S)&&(A=this.create(S,E)),A&&(m.UnityYAML(A,0,M),F&&A.setDataSource(F),this.emit(h.ADD,S,A),this.emit(h.ADD_KEY+S,A)),A},addSpriteSheet:function(S,E,M,F){var A=null;if(E instanceof g?(S=E.key,A=E):this.checkKey(S)&&(A=this.create(S,E)),A){var P=A.source[0].width,L=A.source[0].height;m.SpriteSheet(A,0,0,0,P,L,M),F&&A.setDataSource(F),this.emit(h.ADD,S,A),this.emit(h.ADD_KEY+S,A)}return A},addSpriteSheetFromAtlas:function(S,E){if(!this.checkKey(S))return null;var M=d(E,"atlas",null),F=d(E,"frame",null);if(!(!M||!F)){var A=this.get(M),P=A.get(F);if(P){var L=P.source.image;L||(L=P.source.glTexture);var O=this.create(S,L);
5345return P.trimmed?m.SpriteSheetFromAtlas(O,P,E):m.SpriteSheet(O,0,P.cutX,P.cutY,P.cutWidth,P.cutHeight,E),this.emit(h.ADD,S,O),this.emit(h.ADD_KEY+S,O),O}}},addUint8Array:function(S,E,M,F){if(!this.checkKey(S)||E.length/4!==M*F)return null;var A=this.create(S,E,M,F);return A.add("__BASE",0,0,0,M,F),this.emit(h.ADD,S,A),this.emit(h.ADD_KEY+S,A),A},create:function(S,E,M,F){var A=null;return this.checkKey(S)&&(A=new g(this,S,E,M,F),this.list[S]=A),A},exists:function(S){return this.list.hasOwnProperty(S)},get:function(S){return S===void 0&&(S="__DEFAULT"),this.list[S]?this.list[S]:S instanceof g?S:S instanceof i?S.texture:this.list.__MISSING},cloneFrame:function(S,E){if(this.list[S])return this.list[S].get(E).clone()},getFrame:function(S,E){if(this.list[S])return this.list[S].get(E)},parseFrame:function(S){if(S){if(typeof S=="string")return this.getFrame(S);if(Array.isArray(S)&&S.length===2)return this.getFrame(S[0],S[1]);if(v(S))return this.getFrame(S.key,S.frame);if(S instanceof g)return S.get();if(S instanceof i)return S}else return},getTextureKeys:function(){var S=[];for(var E in this.list)E!=="__DEFAULT"&&E!=="__MISSING"&&E!=="__WHITE"&&E!=="__NORMAL"&&S.push(E);return S},getPixel:function(S,E,M,F){var A=this.getFrame(M,F);if(A){S-=A.x,E-=A.y;var P=A.data.cut;if(S+=P.x,E+=P.y,S>=P.x&&S<P.r&&E>=P.y&&E<P.b){var L=this._tempContext;L.clearRect(0,0,1,1),L.drawImage(A.source.image,S,E,1,1,0,0,1,1);var O=L.getImageData(0,0,1,1);return new n(O.data[0],O.data[1],O.data[2],O.data[3])}}return null},getPixelAlpha:function(S,E,M,F){var A=this.getFrame(M,F);if(A){S-=A.x,E-=A.y;var P=A.data.cut;if(S+=P.x,E+=P.y,S>=P.x&&S<P.r&&E>=P.y&&E<P.b){var L=this._tempContext;L.clearRect(0,0,1,1),L.drawImage(A.source.image,S,E,1,1,0,0,1,1);var O=L.getImageData(0,0,1,1);return O.data[3]}}return null},setTexture:function(S,E,M){return this.list[E]&&(S.texture=this.list[E],S.frame=S.texture.get(M)),S},renameTexture:function(S,E){var M=this.get(S);return M&&S!==E?(M.key=E,this.list[E]=M,delete this.list[S],!0):!1},each:function(S,E){for(var M=[null],F=1;F<arguments.length;F++)M.push(arguments[F]);for(var A in this.list)M[0]=this.list[A],S.apply(E,M)},resetStamp:function(S,E){S===void 0&&(S=1),E===void 0&&(E=16777215);var M=this.stamp;return M.setCrop(),M.setPosition(0),M.setAngle(0),M.setScale(1),M.setAlpha(S),M.setTint(E),M.setTexture("__WHITE"),M},destroy:function(){for(var S in this.list)this.list[S].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,o.remove(this._tempCanvas)}});c.exports=T},11876:(c,x,t)=>{/**
5346 * @author       Richard Davey <[email protected]>
5347 * @copyright    2013-2025 Phaser Studio Inc.
5348 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5349 */var o=t(27919),p=t(83419),a=t(50030),n=t(29795),r=t(82751),e=new p({initialize:function(h,i,l,u,d){d===void 0&&(d=!1);var f=h.manager.game;this.renderer=f.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=l||i.naturalWidth||i.videoWidth||i.width||0,this.height=u||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=n.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 r,this.isPowerOf2=a(this.width,this.height),this.glTexture=null,this.flipY=d,this.init(f)},init:function(s){var h=this.renderer;if(h){var i=this.source;if(h.gl){var l=this.image,u=this.flipY,d=this.width,f=this.height,v=this.scaleMode;this.isCanvas?this.glTexture=h.createCanvasTexture(l,!1,u):this.isVideo?this.glTexture=h.createVideoTexture(l,!1,u):this.isRenderTexture?this.glTexture=h.createTextureFromSource(null,d,f,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,d,f,v):this.glTexture=h.createTextureFromSource(l,d,f,v)}else this.isRenderTexture&&(this.image=i.canvas)}s.config.antialias||this.setFilter(1)},setFilter:function(s){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,s),this.scaleMode=s},setFlipY:function(s){return s===void 0&&(s=!0),s===this.flipY?this:(this.flipY=s,this.update(),this)},update:function(){var s=this.renderer,h=this.image,i=this.flipY,l=s.gl;l&&this.isCanvas?s.updateCanvasTexture(h,this.glTexture,i):l&&this.isVideo&&s.updateVideoTexture(h,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&o.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});c.exports=e}
5349,19673:c=>{/**
5350 * @author       Richard Davey <[email protected]>
5351 * @copyright    2013-2025 Phaser Studio Inc.
5352 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5353 */var x={LINEAR:0,NEAREST:1};c.exports=x},44538:c=>{/**
5354 * @author       Richard Davey <[email protected]>
5355 * @copyright    2013-2025 Phaser Studio Inc.
5356 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5357 */c.exports="addtexture"},63486:c=>{/**
5358 * @author       samme
5359 * @copyright    2013-2025 Phaser Studio Inc.
5360 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5361 */c.exports="addtexture-"},94851:c=>{/**
5362 * @author       Richard Davey <[email protected]>
5363 * @copyright    2013-2025 Phaser Studio Inc.
5364 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5365 */c.exports="onerror"},29099:c=>{/**
5366 * @author       Richard Davey <[email protected]>
5367 * @copyright    2013-2025 Phaser Studio Inc.
5368 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5369 */c.exports="onload"},8678:c=>{/**
5370 * @author       Richard Davey <[email protected]>
5371 * @copyright    2013-2025 Phaser Studio Inc.
5372 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5373 */c.exports="ready"},86415:c=>{/**
5374 * @author       Richard Davey <[email protected]>
5375 * @copyright    2013-2025 Phaser Studio Inc.
5376 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5377 */c.exports="removetexture"},30879:c=>{/**
5378 * @author       samme
5379 * @copyright    2013-2025 Phaser Studio Inc.
5380 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5381 */c.exports="removetexture-"},69442:(c,x,t)=>{/**
5382 * @author       Richard Davey <[email protected]>
5383 * @copyright    2013-2025 Phaser Studio Inc.
5384 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5385 */c.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:(c,x,t)=>{/**
5386 * @author       Richard Davey <[email protected]>
5387 * @copyright    2013-2025 Phaser Studio Inc.
5388 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5389 */var o=t(79291),p=t(19673),a={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:p,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};a=o(!1,a,p),c.exports=a},89905:c=>{/**
5390 * @author       Richard Davey <[email protected]>
5391 * @copyright    2013-2025 Phaser Studio Inc.
5392 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5393 */var x=function(t,o,p){if(!p.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var a=t.source[o];t.add("__BASE",o,0,0,a.width,a.height);for(var n=p.getElementsByTagName("SubTexture"),r,e=0;e<n.length;e++){var s=n[e].attributes,h=s.name.value,i=parseInt(s.x.value,10),l=parseInt(s.y.value,10),u=parseInt(s.width.value,10),d=parseInt(s.height.value,10);if(r=t.add(h,o,i,l,u,d),s.frameX){var f=Math.abs(parseInt(s.frameX.value,10)),v=Math.abs(parseInt(s.frameY.value,10)),m=parseInt(s.frameWidth.value,10),y=parseInt(s.frameHeight.value,10);r.setTrim(u,d,f,v,m,y)}}return t};c.exports=x},72893:c=>{/**
5394 * @author       Richard Davey <[email protected]>
5395 * @copyright    2013-2025 Phaser Studio Inc.
5396 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5397 */var x=function(t,o){var p=t.source[o];return t.add("__BASE",o,0,0,p.width,p.height),t};c.exports=x},4832:c=>{/**
5398 * @author       Richard Davey <[email protected]>
5399 * @copyright    2013-2025 Phaser Studio Inc.
5400 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5401 */var x=function(t,o){var p=t.source[o];return t.add("__BASE",o,0,0,p.width,p.height),t};c.exports=x},78566:(c,x,t)=>{/**
5402 * @author       Richard Davey <[email protected]>
5403 * @copyright    2013-2025 Phaser Studio Inc.
5404 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5405 */var o=t(41786),p=function(a,n,r){if(!r.frames&&!r.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=a.source[n];a.add("__BASE",n,0,0,e.width,e.height);for(var s=Array.isArray(r.textures)?r.textures[n].frames:r.frames,h,i=0;i<s.length;i++){var l=s[i];if(h=a.add(l.filename,n,l.frame.x,l.frame.y,l.frame.w,l.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+l.filename);continue}l.trimmed&&h.setTrim(l.sourceSize.w,l.sourceSize.h,l.spriteSourceSize.x,l.spriteSourceSize.y,l.spriteSourceSize.w,l.spriteSourceSize.h),l.rotated&&(h.rotated=!0,h.updateUVsInverted());var u=l.anchor||l.pivot;u&&(h.customPivot=!0,h.pivotX=u.x,h.pivotY=u.y),l.scale9Borders&&h.setScale9(l.scale9Borders.x,l.scale9Borders.y,l.scale9Borders.w,l.scale9Borders.h),h.customData=o(l)}for(var d in r)d!=="frames"&&(Array.isArray(r[d])?a.customData[d]=r[d].slice(0):a.customData[d]=r[d]);return a};c.exports=p},39711:(c,x,t)=>{/**
5406 * @author       Richard Davey <[email protected]>
5407 * @copyright    2013-2025 Phaser Studio Inc.
5408 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5409 */var o=t(41786),p=function(a,n,r){if(!r.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=a.source[n];a.add("__BASE",n,0,0,e.width,e.height);var s=r.frames,h;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];if(h=a.add(i,n,l.frame.x,l.frame.y,l.frame.w,l.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+i);continue}l.trimmed&&h.setTrim(l.sourceSize.w,l.sourceSize.h,l.spriteSourceSize.x,l.spriteSourceSize.y,l.spriteSourceSize.w,l.spriteSourceSize.h),l.rotated&&(h.rotated=!0,h.updateUVsInverted());var u=l.anchor||l.pivot;u&&(h.customPivot=!0,h.pivotX=u.x,h.pivotY=u.y),l.scale9Borders&&h.setScale9(l.scale9Borders.x,l.scale9Borders.y,l.scale9Borders.w,l.scale9Borders.h),h.customData=o(l)}for(var d in r)d!=="frames"&&(Array.isArray(r[d])?a.customData[d]=r[d].slice(0):a.customData[d]=r[d]);return a};c.exports=p},31403:c=>{/**
5410 * @author       Richard Davey <[email protected]>
5411 * @copyright    2021 Photon Storm Ltd.
5412 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5413 */var x=function(t){var o=[171,75,84,88,32,49,49,187,13,10,26,10],p,a=new Uint8Array(t,0,12);for(p=0;p<a.length;p++)if(a[p]!==o[p]){console.warn("KTXParser - Invalid file format");return}var n=Uint32Array.BYTES_PER_ELEMENT,r=new DataView(t,12,13*n),e=r.getUint32(0,!0)===67305985,s=r.getUint32(1*n,e);if(s!==0){console.warn("KTXParser - Only compressed formats supported");return}var h=r.getUint32(4*n,e),i=r.getUint32(6*n,e),l=r.getUint32(7*n,e),u=Math.max(1,r.getUint32(11*n,e)),d=r.getUint32(12*n,e),f=new Array(u),v=12+13*4+d,m=i,y=l;for(p=0;p<u;p++){var g=new Int32Array(t,v,1)[0];v+=4,f[p]={data:new Uint8Array(t,v,g),width:m,height:y},m=Math.max(1,m>>1),y=Math.max(1,y>>1),v+=g}return{mipmaps:f,width:i,height:l,internalFormat:h,compressed:!0,generateMipmap:!1}};c.exports=x},82038:c=>{/**
5414 * @author       Richard Davey <[email protected]>
5415 * @copyright    2021 Photon Storm Ltd.
5416 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5417 */function x(E,M,F,A,P,L,O){return O===void 0&&(O=16),Math.floor((E+F)/P)*Math.floor((M+A)/L)*O}function t(E,M){return E=Math.max(E,16),M=Math.max(M,8),E*M/4}function o(E,M){return E=Math.max(E,8),M=Math.max(M,8),E*M/2}function p(E,M){return Math.ceil(E/4)*Math.ceil(M/4)*16}function a(E,M){return x(E,M,3,3,4,4,8)}function n(E,M){return x(E,M,3,3,4,4)}function r(E,M){return x(E,M,4,3,5,4)}function e(E,M){return x(E,M,4,4,5,5)}function s(E,M){return x(E,M,5,4,6,5)}function h(E,M){return x(E,M,5,5,6,6)}function i(E,M){return x(E,M,7,4,8,5)}function l(E,M){return x(E,M,7,5,8,6)}function u(E,M){return x(E,M,7,7,8,8)}function d(E,M){return x(E,M,9,4,10,5)}function f(E,M){return x(E,M,9,5,10,6)}function v(E,M){return x(E,M,9,7,10,8)}function m(E,M){return x(E,M,9,9,10,10)}function y(E,M){return x(E,M,11,9,12,10)}function g(E,M){return x(E,M,11,11,12,12)}var T={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:o,glFormat:[35840]},3:{sizeFunc:o,glFormat:[35842]},6:{sizeFunc:a,glFormat:[36196]},7:{sizeFunc:a,glFormat:[33776,35916]},8:{sizeFunc:n,glFormat:[33777,35917]},9:{sizeFunc:n,glFormat:[33778,35918]},11:{sizeFunc:n,glFormat:[33779,35919]},14:{sizeFunc:p,glFormat:[36494,36495]},15:{sizeFunc:p,glFormat:[36492,36493]},22:{sizeFunc:a,glFormat:[37492,37493]},23:{sizeFunc:n,glFormat:[37496,37497]},24:{sizeFunc:a,glFormat:[37494,37495]},25:{sizeFunc:a,glFormat:[37488]},26:{sizeFunc:n,glFormat:[37490]},27:{sizeFunc:n,glFormat:[37808,37840]},28:{sizeFunc:r,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:l,glFormat:[37814,37846]},34:{sizeFunc:u,glFormat:[37815,37847]},35:{sizeFunc:d,glFormat:[37816,37848]},36:{sizeFunc:f,glFormat:[37817,37849]},37:{sizeFunc:v,glFormat:[37818,37850]},38:{sizeFunc:m,glFormat:[37819,37851]},39:{sizeFunc:y,glFormat:[37820,37852]},40:{sizeFunc:g,glFormat:[37821,37853]}},S=function(E){for(var M=new Uint32Array(E,0,13),F=M[0],A=F===55727696,P=A?M[2]:M[3],L=M[4],O=T[P].glFormat[L],G=T[P].sizeFunc,z=M[11],Y=M[7
5417],X=M[6],I=52+M[12],U=new Uint8Array(E,I),D=new Array(z),V=0,B=Y,W=X,K=0;K<z;K++){var J=G(B,W);D[K]={data:new Uint8Array(U.buffer,U.byteOffset+V,J),width:B,height:W},B=Math.max(1,B>>1),W=Math.max(1,W>>1),V+=J}return{mipmaps:D,width:Y,height:X,internalFormat:O,compressed:!0,generateMipmap:!1}};c.exports=S},75549:(c,x,t)=>{/**
5418 * @author       Richard Davey <[email protected]>
5419 * @copyright    2013-2025 Phaser Studio Inc.
5420 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5421 */var o=t(95540),p=function(a,n,r,e,s,h,i){var l=o(i,"frameWidth",null),u=o(i,"frameHeight",l);if(l===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var d=a.source[n];a.add("__BASE",n,0,0,d.width,d.height);var f=o(i,"startFrame",0),v=o(i,"endFrame",-1),m=o(i,"margin",0),y=o(i,"spacing",0),g=Math.floor((s-m+y)/(l+y)),T=Math.floor((h-m+y)/(u+y)),S=g*T;S===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",a.key),(f>S||f<-S)&&(f=0),f<0&&(f=S+f),(v===-1||v>S||v<f)&&(v=S);for(var E=m,M=m,F=0,A=0,P=0,L=0;L<S;L++){F=0,A=0;var O=E+l,G=M+u;O>s&&(F=O-s),G>h&&(A=G-h),L>=f&&L<=v&&(a.add(P,n,r+E,e+M,l-F,u-A),P++),E+=l+y,E+l>s&&(E=m,M+=u+y)}return a};c.exports=p},47534:(c,x,t)=>{/**
5422 * @author       Richard Davey <[email protected]>
5423 * @copyright    2013-2025 Phaser Studio Inc.
5424 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5425 */var o=t(95540),p=function(a,n,r){var e=o(r,"frameWidth",null),s=o(r,"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),o(r,"startFrame",0),o(r,"endFrame",-1);for(var i=o(r,"margin",0),l=o(r,"spacing",0),u=n.cutX,d=n.cutY,f=n.cutWidth,v=n.cutHeight,m=n.realWidth,y=n.realHeight,g=Math.floor((m-i+l)/(e+l)),T=Math.floor((y-i+l)/(s+l)),S=n.x,E=e-S,M=e-(m-f-S),F=n.y,A=s-F,P=s-(y-v-F),L,O=i,G=i,z=0,Y=0,X=0;X<T;X++){for(var I=X===0,U=X===T-1,D=0;D<g;D++){var V=D===0,B=D===g-1;if(L=a.add(z,Y,u+O,d+G,e,s),V||I||B||U){var W=V?S:0,K=I?F:0,J=0,Z=0;V&&(J+=e-E),B&&(J+=e-M),I&&(Z+=s-A),U&&(Z+=s-P);var j=e-J,k=s-Z;L.cutWidth=j,L.cutHeight=k,L.setTrim(e,s,W,K,j,k)}O+=l,V?O+=E:B?O+=M:O+=e,z++}O=i,G+=l,I?G+=A:U?G+=P:G+=s}return a};c.exports=p},86147:c=>{/**
5426 * @author       Richard Davey <[email protected]>
5427 * @copyright    2013-2025 Phaser Studio Inc.
5428 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5429 */var x=0,t=function(p,a,n,r){var e=x-r.y-r.height;p.add(n,a,r.x,e,r.width,r.height)},o=function(p,a,n){var r=p.source[a];p.add("__BASE",a,0,0,r.width,r.height),x=r.height;for(var e=n.split(`
5430`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",i="",l={x:0,y:0,width:0,height:0},u=0;u<e.length;u++){var d=e[u].match(s);if(d){var f=d[1]==="- ",v=d[2],m=d[3];if(f&&(i!==h&&(t(p,a,i,l),h=i),l={x:0,y:0,width:0,height:0}),v==="name"){i=m;continue}switch(v){case"x":case"y":case"width":case"height":l[v]=parseInt(m,10);break}}}return i!==h&&t(p,a,i,l),p};c.exports=o},55222:(c,x,t)=>{/**
5431 * @author       Ben Richards <[email protected]>
5432 * @copyright    2024 Photon Storm Ltd.
5433 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5434 */var o=t(50030),p=function(h){for(var i=h.mipmaps,l=1;l<i.length;l++){var u=i[l].width,d=i[l].height;if(!o(u,d))return console.warn("Mip level "+l+" is not a power-of-two size: "+u+"x"+d),!1}var f=s[h.internalFormat];return f?f(h):(console.warn("No format checker found for internal format "+h.internalFormat+". Assuming valid."),!0)};function a(h){for(var i=h.mipmaps,l=0;l<i.length;l++){var u=i[l].width,d=i[l].height;if((u<<l)%4!==0||(d<<l)%4!==0)return console.warn("BPTC, RGTC, and S3TC dimensions must be a multiple of 4 pixels, and each successive mip level must be half the size of the previous level, rounded down. Mip level "+l+" is "+u+"x"+d),!1}return!0}function n(){return!0}function r(h){var i=h.mipmaps,l=i[0];return o(l.width,l.height)?!0:(console.warn("PVRTC base dimensions must be power of two. Base level is "+l.width+"x"+l.height),!1)}function e(h){var i=h.mipmaps,l=i[0];return l.width%4!==0||l.height%4!==0?(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+l.width+"x"+l.height+" pixels"),!1):!0}var s={37488:n,37489:n,37490:n,37491:n,37492:n,37493:n,37494:n,37495:n,37496:n,37497:n,36196:n,37808:n,37809:n,37810:n,37811:n,37812:n,37813:n,37814:n,37815:n,37816:n,37817:n,37818:n,37819:n,37820:n,37821:n,37840:n,37841:n,37842:n,37843:n,37844:n,37845:n,37846:n,37847:n,37848:n,37849:n,37850:n,37851:n,37852:n,37853:n,36492:a,36493:a,36494:a,36495:a,36283:a,36284:a,36285:a,36286:a,35840:r,35841:r,35842:r,35843:r,33776:a,33777:a,33778:a,33779:a,35916:e,35917:e,35918:e,35919:e};c.exports=p},61309:(c,x,t)=>{/**
5435 * @author       Richard Davey <[email protected]>
5436 * @copyright    2013-2025 Phaser Studio Inc.
5437 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5438 */c.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:c=>{/**
5439 * @author       Richard Davey <[email protected]>
5440 * @copyright    2013-2025 Phaser Studio Inc.
5441 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5442 */c.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(c,x,t)=>{/**
5443 * @author       Richard Davey <[email protected]>
5444 * @copyright    2013-2025 Phaser Studio Inc.
5445 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5446 */var o=t(83419),p=new o({initialize:function(n,r,e,s,h,i,l){(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=n,this.firstgid=r|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=h|0,this.imageSpacing=i|0,this.properties=l||{},this.images=[],this.total=0},containsImageIndex:function(a){return a>=this.firstgid&&a<this.firstgid+this.total},addImage:function(a,n,r,e){return this.images.push({gid:a,image:n,width:r,height:e}),this.total++,this}});c.exports=p},27462:(c,x,t)=>{/**
5447 * @author       Richard Davey <[email protected]>
5448 * @copyright    2021 Photon Storm Ltd.
5449 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5450 */var o=t(83419),p=new o({initialize:function(n){if(this.gids=[],n!==void 0)for(var r=0;r<n.length;++r)for(var e=n[r],s=0;s<e.total;++s)this.gids[e.firstgid+s]=e;this._gids=this.gids}
5450,enabled:{get:function(){return!!this.gids},set:function(a){this.gids=a?this._gids:void 0}},getTypeIncludingTile:function(a){if(a.type!==void 0&&a.type!=="")return a.type;if(!(!this.gids||a.gid===void 0)){var n=this.gids[a.gid];if(n){var r=n.getTileData(a.gid);if(r)return r.type}}},setTextureAndFrame:function(a,n,r,e){if(n===null&&this.gids&&e.gid!==void 0){var s=this.gids[e.gid];s&&(n===null&&s.image!==void 0&&(n=s.image.key),r===null&&(r=e.gid-s.firstgid),a.scene.textures.getFrame(n,r)||(n=null,r=null))}a.setTexture(n,r)},setPropertiesFromTiledObject:function(a,n){if(this.gids!==void 0&&n.gid!==void 0){var r=this.gids[n.gid];r!==void 0&&this.setFromJSON(a,r.getTileProperties(n.gid))}this.setFromJSON(a,n.properties)},setFromJSON:function(a,n){if(n){if(Array.isArray(n)){for(var r=0;r<n.length;r++){var e=n[r];a[e.name]!==void 0?a[e.name]=e.value:a.setData(e.name,e.value)}return}for(var s in n)a[s]!==void 0?a[s]=n[s]:a.setData(s,n[s])}}});c.exports=p},31989:(c,x,t)=>{/**
5451 * @author       Richard Davey <[email protected]>
5452 * @copyright    2013-2025 Phaser Studio Inc.
5453 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5454 */var o=t(80341),p=t(87010),a=t(46177),n=t(49075),r=function(e,s,h,i,l,u,d,f){h===void 0&&(h=32),i===void 0&&(i=32),l===void 0&&(l=10),u===void 0&&(u=10),f===void 0&&(f=!1);var v=null;if(Array.isArray(d)){var m=s!==void 0?s:"map";v=a(m,o.ARRAY_2D,d,h,i,f)}else if(s!==void 0){var y=e.cache.tilemap.get(s);y?v=a(s,y.format,y.data,h,i,f):console.warn("No map data found for key "+s)}return v===null&&(v=new p({tileWidth:h,tileHeight:i,width:l,height:u})),new n(e,v)};c.exports=r},23029:(c,x,t)=>{/**
5455 * @author       Richard Davey <[email protected]>
5456 * @copyright    2013-2025 Phaser Studio Inc.
5457 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5458 */var o=t(83419),p=t(31401),a=t(91907),n=t(62644),r=t(93232),e=new o({Mixins:[p.AlphaSingle,p.Flip,p.Visible],initialize:function(h,i,l,u,d,f,v,m){this.layer=h,this.index=i,this.x=l,this.y=u,this.width=d,this.height=f,this.right,this.bottom,this.baseWidth=v!==void 0?v:d,this.baseHeight=m!==void 0?m:f,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!(s<this.pixelX||h<this.pixelY||s>this.right||h>this.bottom)},copy:function(s){return this.index=s.index,this.alpha=s.alpha,this.properties=n(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 r),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,l){return!(i<=this.pixelX||l<=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,l,u){if(h===void 0&&(h=s),i===void 0&&(i=s),l===void 0&&(l=s),u===void 0&&(u=!0),this.collideLeft=s,this.collideRight=h,this.collideUp=i,this.collideDown=l,this.faceLeft=s,this.faceRight=h,this.faceTop=i,this.faceBottom=l,u){var d=this.tilemapLayer;d&&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,l){return s!==void 0&&(this.width=s),h!==void 0&&(this.height=h),i!==void 0&&(this.baseWidth=i),l!==void 0&&(this.baseHeight=l),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,l=this.layer.hexSideLength,u,d;h==="y"?(d=(this.baseHeight-l)/2+l,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*d):h==="x"&&(u=(this.baseWidth-l)/2+l,this.pixelX=this.x*u,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}}});c.exports=e},49075:(c,x,t)=>{/**
5459 * @author       Richard Davey <[email protected]>
5460 * @copyright    2013-2025 Phaser Studio Inc.
5461 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5462 */var o=t(84101),p=t(83419),a=t(39506),n=t(80341),r=t(95540),e=t(14977),s=t(27462),h=t(91907),i=t(36305),l=t(19133),u=t(68287),d=t(23029),f=t(81086),v=t(2
54620442),m=t(33629),y=new p({initialize:function(T,S){this.scene=T,this.tileWidth=S.tileWidth,this.tileHeight=S.tileHeight,this.width=S.width,this.height=S.height,this.orientation=S.orientation,this.renderOrder=S.renderOrder,this.format=S.format,this.version=S.version,this.properties=S.properties,this.widthInPixels=S.widthInPixels,this.heightInPixels=S.heightInPixels,this.imageCollections=S.imageCollections,this.images=S.images,this.layers=S.layers,this.tiles=S.tiles,this.tilesets=S.tilesets,this.objects=S.objects,this.currentLayerIndex=0,this.hexSideLength=S.hexSideLength;var E=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(E),WorldToTileX:f.GetWorldToTileXFunction(E),WorldToTileY:f.GetWorldToTileYFunction(E),TileToWorldXY:f.GetTileToWorldXYFunction(E),TileToWorldX:f.GetTileToWorldXFunction(E),TileToWorldY:f.GetTileToWorldYFunction(E),GetTileCorners:f.GetTileCornersFunction(E)}},setRenderOrder:function(g){var T=["right-down","left-down","right-up","left-up"];return typeof g=="number"&&(g=T[g]),T.indexOf(g)>-1&&(this.renderOrder=g),this},addTilesetImage:function(g,T,S,E,M,F,A,P){if(g===void 0)return null;T==null&&(T=g);var L=this.scene.sys.textures;if(!L.exists(T))return console.warn('Texture key "%s" not found',T),null;var O=L.get(T),G=this.getTilesetIndex(g);if(G===null&&this.format===n.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',g,this.tilesets),null;var z=this.tilesets[G];return z?((S||E)&&z.setTileSize(S,E),(M||F)&&z.setSpacing(M,F),z.setImage(O),z):(S===void 0&&(S=this.tileWidth),E===void 0&&(E=this.tileHeight),M===void 0&&(M=0),F===void 0&&(F=0),A===void 0&&(A=0),P===void 0&&(P={x:0,y:0}),z=new m(g,A,S,E,M,F,void 0,void 0,P),z.setImage(O),this.tilesets.push(z),this.tiles=o(this),z)},copy:function(g,T,S,E,M,F,A,P){return P=this.getLayer(P),P!==null?(f.Copy(g,T,S,E,M,F,A,P),this):null},createBlankLayer:function(g,T,S,E,M,F,A,P){S===void 0&&(S=0),E===void 0&&(E=0),M===void 0&&(M=this.width),F===void 0&&(F=this.height),A===void 0&&(A=this.tileWidth),P===void 0&&(P=this.tileHeight);var L=this.getLayerIndex(g);if(L!==null)return console.warn("Invalid Tilemap Layer ID: "+g),null;for(var O=new e({name:g,tileWidth:A,tileHeight:P,width:M,height:F,orientation:this.orientation,hexSideLength:this.hexSideLength}),G,z=0;z<F;z++){G=[];for(var Y=0;Y<M;Y++)G.push(new d(O,-1,Y,z,A,P,this.tileWidth,this.tileHeight));O.data.push(G)}this.layers.push(O),this.currentLayerIndex=this.layers.length-1;var X=new v(this.scene,this,this.currentLayerIndex,T,S,E);return X.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(X),X},createLayer:function(g,T,S,E){var M=this.getLayerIndex(g);if(M===null)return console.warn("Invalid Tilemap Layer ID: "+g),typeof g=="string"&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var F=this.layers[M];if(F.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+g),null;this.currentLayerIndex=M,S===void 0&&(S=F.x),E===void 0&&(E=F.y);var A=new v(this.scene,this,M,T,S,E);return A.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(A),A},createFromObjects:function(g,T,S){S===void 0&&(S=!0);var E=[],M=this.getObjectLayer(g);if(!M)return console.warn("createFromObjects: Invalid objectLayerName given: "+g),E;var F=new s(S?this.tilesets:void 0);Array.isArray(T)||(T=[T]);for(var A=M.objects,P=0;P<T.length;P++){var L=T[P],O=r(L,"id",null),G=r(L,"gid",null),z=r(L,"name",null),Y=r(L,"type",null);F.enabled=!r(L,"ignoreTileset",null);for(var X,I=[],U=0;U<A.length;U++)X=A[U],(O===null&&G===null&&z===null&&Y===null||O!==null&&X.id===O||G!==null&&X.gid===G||z!==null&&X.name===z||Y!==null&&F.getTypeIncludingTile(X)===Y)&&I.push(X);for(var D=r(L,"classType",u),V=r(L,"scene",this.scene),B=r(L,"container",null),W=r(L,"key",null),K=r(L,"frame",null),J=0;J<I.length;J++){X=I[J];var Z=new D(V);if(Z.setName(X.name),Z.setPosition(X.x,X.y),F.setTextureAndFrame(Z,W,K,X),X.width&&(Z.displayWidth=X.width),X.height&&(Z.displayHeight=X.height),this.orientation===h.ISOMETRIC){var j=this.tileWidth/this.tileHeight,k={x:Z.x-Z.y,y:(Z.x+Z.y)/j};Z.x=k.x,Z.y=k.y}var _={x:Z.originX*X.width,y:(Z.originY-(X.gid?1:0))*X.height};if(X.rotation){var q=a(X.rotation);i(_,q),Z.rotation=q}Z.x+=_.x,Z.y+=_.y,(X.flippedHorizontal!==void 0||X.flippedVertical!==void 0)&&Z.setFlip(X.flippedHorizontal,X.flippedVertical),X.visible||(Z.visible=!1),F.setPropertiesFromTiledObject(Z,X),B?B.add(Z):V.add.existing(Z),E.push(Z)}}return E},createFromTiles:function(g,T,S,E,M,F){return F=this.getLayer(F),F===null?null:f.CreateFromTiles(g,T,S,E,M,F)},fill:function(g,T,S,E,M,F,A){return F===void 0&&(F=!0),A=this.getLayer(A),A===null?null:(f.Fill(g,T,S,E,M,F,A),this)},filterObjects:function(g,T,S){if(typeof g=="string"){var E=g;if(g=this.getObjectLayer(g),!g)return console.warn("No object layer found with the name: "+E),null}return g.objects.filter(T,S)},filterTiles:function(g,T,S,E,M,F,A,P){return P=this.getLayer(P),P===null?null:f.FilterTiles(g,T,S,E,M,F,A,P)},findByIndex:function(g,T,S,E){return E=this.getLayer(E),E===null?null:f.FindByIndex(g,T,S,E)},findObject:function(g,T,S){if(typeof g=="string"){var E=g;if(g=this.getObjectLayer(g),!g)return console.warn("No object layer found with the name: "+E),null}return g.objects.find(T,S)||null},findTile:function(g,T,S,E,M,F,A,P){return P=this.getLayer(P),P===null?null:f.FindTile(g,T,S,E,M,F,A,P)}
5462,forEachTile:function(g,T,S,E,M,F,A,P){return P=this.getLayer(P),P===null?null:(f.ForEachTile(g,T,S,E,M,F,A,P),this)},getImageIndex:function(g){return this.getIndex(this.images,g)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(g){return g.name})},getIndex:function(g,T){for(var S=0;S<g.length;S++)if(g[S].name===T)return S;return null},getLayer:function(g){var T=this.getLayerIndex(g);return T!==null?this.layers[T]:null},getObjectLayer:function(g){var T=this.getIndex(this.objects,g);return T!==null?this.objects[T]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(g){return g.name})},getLayerIndex:function(g){return g===void 0?this.currentLayerIndex:typeof g=="string"?this.getLayerIndexByName(g):typeof g=="number"&&g<this.layers.length?g:g instanceof v&&g.tilemap===this?g.layerIndex:null},getLayerIndexByName:function(g){return this.getIndex(this.layers,g)},getTileAt:function(g,T,S,E){return E=this.getLayer(E),E===null?null:f.GetTileAt(g,T,S,E)},getTileAtWorldXY:function(g,T,S,E,M){return M=this.getLayer(M),M===null?null:f.GetTileAtWorldXY(g,T,S,E,M)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(g){return g.name})},getTilesWithin:function(g,T,S,E,M,F){return F=this.getLayer(F),F===null?null:f.GetTilesWithin(g,T,S,E,M,F)},getTilesWithinShape:function(g,T,S,E){return E=this.getLayer(E),E===null?null:f.GetTilesWithinShape(g,T,S,E)},getTilesWithinWorldXY:function(g,T,S,E,M,F,A){return A=this.getLayer(A),A===null?null:f.GetTilesWithinWorldXY(g,T,S,E,M,F,A)},getTileset:function(g){var T=this.getIndex(this.tilesets,g);return T!==null?this.tilesets[T]:null},getTilesetIndex:function(g){return this.getIndex(this.tilesets,g)},hasTileAt:function(g,T,S){return S=this.getLayer(S),S===null?null:f.HasTileAt(g,T,S)},hasTileAtWorldXY:function(g,T,S,E){return E=this.getLayer(E),E===null?null:f.HasTileAtWorldXY(g,T,S,E)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(g){this.setLayer(g)}},putTileAt:function(g,T,S,E,M){return E===void 0&&(E=!0),M=this.getLayer(M),M===null?null:f.PutTileAt(g,T,S,E,M)},putTileAtWorldXY:function(g,T,S,E,M,F){return E===void 0&&(E=!0),F=this.getLayer(F),F===null?null:f.PutTileAtWorldXY(g,T,S,E,M,F)},putTilesAt:function(g,T,S,E,M){return E===void 0&&(E=!0),M=this.getLayer(M),M===null?null:(f.PutTilesAt(g,T,S,E,M),this)},randomize:function(g,T,S,E,M,F){return F=this.getLayer(F),F===null?null:(f.Randomize(g,T,S,E,M,F),this)},calculateFacesAt:function(g,T,S){return S=this.getLayer(S),S===null?null:(f.CalculateFacesAt(g,T,S),this)},calculateFacesWithin:function(g,T,S,E,M){return M=this.getLayer(M),M===null?null:(f.CalculateFacesWithin(g,T,S,E,M),this)},removeLayer:function(g){var T=this.getLayerIndex(g);if(T!==null){l(this.layers,T);for(var S=T;S<this.layers.length;S++)this.layers[S].tilemapLayer&&this.layers[S].tilemapLayer.layerIndex--;return this.currentLayerIndex===T&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(g){var T=this.getLayerIndex(g);return T!==null?(g=this.layers[T],g.tilemapLayer.destroy(),l(this.layers,T),this.currentLayerIndex===T&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var g=this.layers,T=0;T<g.length;T++)g[T].tilemapLayer&&g[T].tilemapLayer.destroy(!1);return g.length=0,this.currentLayerIndex=0,this},removeTile:function(g,T,S){T===void 0&&(T=-1),S===void 0&&(S=!0);var E=[];Array.isArray(g)||(g=[g]);for(var M=0;M<g.length;M++){var F=g[M];E.push(this.removeTileAt(F.x,F.y,!0,S,F.tilemapLayer)),T>-1&&this.putTileAt(T,F.x,F.y,S,F.tilemapLayer)}return E},removeTileAt:function(g,T,S,E,M){return S===void 0&&(S=!0),E===void 0&&(E=!0),M=this.getLayer(M),M===null?null:f.RemoveTileAt(g,T,S,E,M)},removeTileAtWorldXY:function(g,T,S,E,M,F){return S===void 0&&(S=!0),E===void 0&&(E=!0),F=this.getLayer(F),F===null?null:f.RemoveTileAtWorldXY(g,T,S,E,M,F)},renderDebug:function(g,T,S){return S=this.getLayer(S),S===null?null:(this.orientation===h.ORTHOGONAL&&f.RenderDebug(g,T,S),this)},renderDebugFull:function(g,T){for(var S=this.layers,E=0;E<S.length;E++)f.RenderDebug(g,T,S[E]);return this},replaceByIndex:function(g,T,S,E,M,F,A){return A=this.getLayer(A),A===null?null:(f.ReplaceByIndex(g,T,S,E,M,F,A),this)},setCollision:function(g,T,S,E,M){return T===void 0&&(T=!0),S===void 0&&(S=!0),M===void 0&&(M=!0),E=this.getLayer(E),E===null?null:(f.SetCollision(g,T,S,E,M),this)},setCollisionBetween:function(g,T,S,E,M){return S===void 0&&(S=!0),E===void 0&&(E=!0),M=this.getLayer(M),M===null?null:(f.SetCollisionBetween(g,T,S,E,M),this)},setCollisionByProperty:function(g,T,S,E){return T===void 0&&(T=!0),S===void 0&&(S=!0),E=this.getLayer(E),E===null?null:(f.SetCollisionByProperty(g,T,S,E),this)},setCollisionByExclusion:function(g,T,S,E){return T===void 0&&(T=!0),S===void 0&&(S=!0),E=this.getLayer(E),E===null?null:(f.SetCollisionByExclusion(g,T,S,E),this)},setCollisionFromCollisionGroup:function(g,T,S){return g===void 0&&(g=!0),T===void 0&&(T=!0),S=this.getLayer(S),S===null?null:(f.SetCollisionFromCollisionGroup(g,T,S),this)},setTileIndexCallback:function(g,T,S,E){return E=this.getLayer(E),E===null?null:(f.SetTileIndexCallback(g,T,S,E),this)},setTileLocationCallback:function(g,T,S,E,M,F,A){return A=this.getLayer(A),A===null?null:(f.SetTileLocationCallback(g,T,S,E,M,F,A),this)},setLayer:function(g){var T=this.getLayerIndex(g);return T!==null&&(this.currentLayerIndex=T),this},setBaseTileSize:function(g,T){this.tileWidth=g,this.tileHeight=T,this.widthInPixels=this.width*g,this.heightInPixels=this.height*T;for(var S=0;S<this.layers.length;S++){this.layers[S].baseTileWidth=g,this.layers[S].baseTileHeight=T;for(var E=this.layers[S].data,M=this.layers[S].width,F=this.layers[S].height,A=0;A<F;A++)for(var P=0;P<M;P++){var L=E[A][P];L!==null&&L.setSize(void 0,void 0,g,T)}}return this},setLayerTileSize:function(g,T,S){if(S=this.getLayer(S),S===null)return this;S.tileWidth=g,S.tileHeight=T;for(var E=S.data,M=S.width,F=S.height,A=0;A<F;A++)for(var P=0;P<M;P++){var L=E[A][P];L!==null&&L.setSize(g,T)}return this},shuffle:function(g,T,S,E,M){return M=this.getLayer(M),M===null?null:(f.Shuffle(g,T,S,E,M),this)},swapByIndex:function(g,T,S,E,M,F,A){return A=this.getLayer(A),A===null?null:(f.SwapByIndex(g,T,S,E,M,F,A),this)},tileToWorldX:function(g,T,S){return S=this.getLayer(S),S===null?null:this._convert.TileToWorldX(g,T,S)},tileToWorldY:function(g,T,S){return S=this.getLayer(S),S===null?null:this._convert.TileToWorldY(g,T,S)},tileToWorldXY:function(g,T,S,E,M){return M=this.getLayer(M),M===null?null:this._convert.TileToWorldXY(g,T,S,E,M)},getTileCorners:function(g,T,S,E){return E=this.getLayer(E),E===null?null:this._convert.GetTileCorners(g,T,S,E)},weightedRandomize:function(g,T,S,E,M,F){return F=this.getLayer(F),F===null?null:(f.WeightedRandomize(T,S,E,M,g,F),this)},worldToTileX:function(g,T,S,E){return E=this.getLayer(E),E===null?null:this._convert.WorldToTileX(g,T,S,E)},worldToTileY:function(g,T,S,E){return E=this.getLayer(E),E===null?null:this._convert.WorldToTileY(g,T,S,E)},worldToTileXY:function(g,T,S,E,M,F){return F=this.getLayer(F),F===null?null:this._convert.WorldToTileXY(g,T,S,E,M,F)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});c.exports=y},45939:(c,x,t)=>{/**
5463 * @author       Richard Davey <[email protected]>
5464 * @copyright    2013-2025 Phaser Studio Inc.
5465 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5466 */var o=t(44603),p=t(31989);o.register("tilemap",function(a){var n=a!==void 0?a:{};return p(this.scene,n.key,n.tileWidth,n.tileHeight,n.width,n.height,n.data,n.insertNull)})},46029:(c,x,t)=>{/**
5467 * @author       Richard Davey <[email protected]>
5468 * @copyright    2013-2025 Phaser Studio Inc.
5469 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5470 */var o=t(39429),p=t(31989);o.register("tilemap",function(a,n,r,e,s,h,i){return a===null&&(a=void 0),n===null&&(n=void 0),r===null&&(r=void 0),e===null&&(e=void 0),s===null&&(s=void 0),p(this.scene,a,n,r,e,s,h,i)})},20442:(c,x,t)=>{/**
5471 * @author       Richard Davey <[email protected]>
5472 * @copyright    2013-2025 Phaser Studio Inc.
5473 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5474 */var o=t(83419),p=t(78389),a=t(31401),n=t(95643),r=t(81086),e=t(19218),s=t(26099),h=new o({Extends:n,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,p,e],initialize:function(l,u,d,f,v,m){n.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=u,this.layerIndex=d,this.layer=u.layers[d],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=r.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new s,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(f),this.setAlpha(this.layer.alpha),this.setPosition(v,m),this.setOrigin(0,0),this.setSize(u.tileWidth*this.layer.width,u.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var l=[],u=[],d=this.tilemap;Array.isArray(i)||(i=[i]);for(var f=0;f<i.length;f++){var v=i[f];if(typeof v=="string"&&(v=d.getTileset(v)),v){u.push(v);for(var m=v.firstgid,y=0;y<v.total;y++)l[m+y]=v}}this.gidMap=l,this.tileset=u},setRenderOrder:function(i){var l=["right-down","left-down","right-up","left-up"];return typeof i=="string"&&(i=l.indexOf(i)),i>=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,l){return r.CalculateFacesAt(i,l,this.layer),this},calculateFacesWithin:function(i,l,u,d){return r.CalculateFacesWithin(i,l,u,d,this.layer),this},createFromTiles:function(i,l,u,d,f){return r.CreateFromTiles(i,l,u,d,f,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)}
5474,copy:function(i,l,u,d,f,v,m){return r.Copy(i,l,u,d,f,v,m,this.layer),this},fill:function(i,l,u,d,f,v){return r.Fill(i,l,u,d,f,v,this.layer),this},filterTiles:function(i,l,u,d,f,v,m){return r.FilterTiles(i,l,u,d,f,v,m,this.layer)},findByIndex:function(i,l,u){return r.FindByIndex(i,l,u,this.layer)},findTile:function(i,l,u,d,f,v,m){return r.FindTile(i,l,u,d,f,v,m,this.layer)},forEachTile:function(i,l,u,d,f,v,m){return r.ForEachTile(i,l,u,d,f,v,m,this.layer),this},setTint:function(i,l,u,d,f,v){i===void 0&&(i=16777215);var m=function(y){y.tint=i,y.tintFill=!1};return this.forEachTile(m,this,l,u,d,f,v)},setTintFill:function(i,l,u,d,f,v){i===void 0&&(i=16777215);var m=function(y){y.tint=i,y.tintFill=!0};return this.forEachTile(m,this,l,u,d,f,v)},getTileAt:function(i,l,u){return r.GetTileAt(i,l,u,this.layer)},getTileAtWorldXY:function(i,l,u,d){return r.GetTileAtWorldXY(i,l,u,d,this.layer)},getIsoTileAtWorldXY:function(i,l,u,d,f){u===void 0&&(u=!0);var v=this.tempVec;return r.IsometricWorldToTileXY(i,l,!0,v,f,this.layer,u),this.getTileAt(v.x,v.y,d)},getTilesWithin:function(i,l,u,d,f){return r.GetTilesWithin(i,l,u,d,f,this.layer)},getTilesWithinShape:function(i,l,u){return r.GetTilesWithinShape(i,l,u,this.layer)},getTilesWithinWorldXY:function(i,l,u,d,f,v){return r.GetTilesWithinWorldXY(i,l,u,d,f,v,this.layer)},hasTileAt:function(i,l){return r.HasTileAt(i,l,this.layer)},hasTileAtWorldXY:function(i,l,u){return r.HasTileAtWorldXY(i,l,u,this.layer)},putTileAt:function(i,l,u,d){return r.PutTileAt(i,l,u,d,this.layer)},putTileAtWorldXY:function(i,l,u,d,f){return r.PutTileAtWorldXY(i,l,u,d,f,this.layer)},putTilesAt:function(i,l,u,d){return r.PutTilesAt(i,l,u,d,this.layer),this},randomize:function(i,l,u,d,f){return r.Randomize(i,l,u,d,f,this.layer),this},removeTileAt:function(i,l,u,d){return r.RemoveTileAt(i,l,u,d,this.layer)},removeTileAtWorldXY:function(i,l,u,d,f){return r.RemoveTileAtWorldXY(i,l,u,d,f,this.layer)},renderDebug:function(i,l){return r.RenderDebug(i,l,this.layer),this},replaceByIndex:function(i,l,u,d,f,v){return r.ReplaceByIndex(i,l,u,d,f,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,l){return i===void 0&&(i=1),l===void 0&&(l=1),this.cullPaddingX=i,this.cullPaddingY=l,this},setCollision:function(i,l,u,d){return r.SetCollision(i,l,u,this.layer,d),this},setCollisionBetween:function(i,l,u,d){return r.SetCollisionBetween(i,l,u,d,this.layer),this},setCollisionByProperty:function(i,l,u){return r.SetCollisionByProperty(i,l,u,this.layer),this},setCollisionByExclusion:function(i,l,u){return r.SetCollisionByExclusion(i,l,u,this.layer),this},setCollisionFromCollisionGroup:function(i,l){return r.SetCollisionFromCollisionGroup(i,l,this.layer),this},setTileIndexCallback:function(i,l,u){return r.SetTileIndexCallback(i,l,u,this.layer),this},setTileLocationCallback:function(i,l,u,d,f,v){return r.SetTileLocationCallback(i,l,u,d,f,v,this.layer),this},shuffle:function(i,l,u,d){return r.Shuffle(i,l,u,d,this.layer),this},swapByIndex:function(i,l,u,d,f,v){return r.SwapByIndex(i,l,u,d,f,v,this.layer),this},tileToWorldX:function(i,l){return this.tilemap.tileToWorldX(i,l,this)},tileToWorldY:function(i,l){return this.tilemap.tileToWorldY(i,l,this)},tileToWorldXY:function(i,l,u,d){return this.tilemap.tileToWorldXY(i,l,u,d,this)},getTileCorners:function(i,l,u){return this.tilemap.getTileCorners(i,l,u,this)},weightedRandomize:function(i,l,u,d,f){return r.WeightedRandomize(l,u,d,f,i,this.layer),this},worldToTileX:function(i,l,u){return this.tilemap.worldToTileX(i,l,u,this)},worldToTileY:function(i,l,u){return this.tilemap.worldToTileY(i,l,u,this)},worldToTileXY:function(i,l,u,d,f){return this.tilemap.worldToTileXY(i,l,u,d,f,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=[],n.prototype.destroy.call(this))}});c.exports=h},16153:(c,x,t)=>{/**
5475 * @author       Richard Davey <[email protected]>
5476 * @copyright    2013-2025 Phaser Studio Inc.
5477 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5478 */var o=t(61340),p=new o,a=new o,n=new o,r=function(e,s,h,i){var l=s.cull(h),u=l.length,d=h.alpha*s.alpha;if(!(u===0||d<=0)){var f=p,v=a,m=n;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),f.copyFrom(h.matrix);var y=e.currentContext,g=s.gidMap;y.save(),i?(f.multiplyWithOffset(i,-h.scrollX*s.scrollFactorX,-h.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,f.multiply(v,m),m.copyToContext(y)):(v.e-=h.scrollX*s.scrollFactorX,v.f-=h.scrollY*s.scrollFactorY,v.copyToContext(y)),(!e.antialias||s.scaleX>1||s.scaleY>1)&&(y.imageSmoothingEnabled=!1);for(var T=0;T<u;T++){var S=l[T],E=g[S.index];if(E){var M=E.image.getSourceImage(),F=E.getTileTextureCoordinates(S.index),A=E.tileWidth,P=E.tileHeight;if(!(F===null||A===0||P===0)){var L=A*.5,O=P*.5;
5478F.x+=E.tileOffset.x,F.y+=E.tileOffset.y,y.save(),y.translate(S.pixelX+L,S.pixelY+O),S.rotation!==0&&y.rotate(S.rotation),(S.flipX||S.flipY)&&y.scale(S.flipX?-1:1,S.flipY?-1:1),y.globalAlpha=d*S.alpha,y.drawImage(M,F.x,F.y,A,P,-L,-O,A,P),y.restore()}}}y.restore()}};c.exports=r},19218:(c,x,t)=>{/**
5479 * @author       Richard Davey <[email protected]>
5480 * @copyright    2013-2025 Phaser Studio Inc.
5481 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5482 */var o=t(29747),p=o,a=o;p=t(99558),a=t(16153),c.exports={renderWebGL:p,renderCanvas:a}},99558:(c,x,t)=>{/**
5483 * @author       Richard Davey <[email protected]>
5484 * @copyright    2013-2025 Phaser Studio Inc.
5485 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5486 */var o=t(70554),p=function(a,n,r){var e=n.cull(r),s=e.length,h=r.alpha*n.alpha;if(!(s===0||h<=0)){var i=n.gidMap,l=a.pipelines.set(n.pipeline,n),u=o.getTintAppendFloatAlpha,d=n.scrollFactorX,f=n.scrollFactorY,v=n.x,m=n.y,y=n.scaleX,g=n.scaleY;a.pipelines.preBatch(n);for(var T=0;T<s;T++){var S=e[T],E=i[S.index];if(E){var M=E.getTileTextureCoordinates(S.index),F=E.tileWidth,A=E.tileHeight;if(!(!M||F===0||A===0)){var P=F*.5,L=A*.5,O=E.glTexture,G=l.setTexture2D(O,n),z=F,Y=A,X=M.x,I=M.y,U=E.tileOffset.x,D=E.tileOffset.y,V=u(S.tint,h*S.alpha);l.batchTexture(n,O,O.width,O.height,v+S.pixelX*y+(P*y-U),m+S.pixelY*g+(L*g-D),F,A,y,g,S.rotation,S.flipX,S.flipY,d,f,P,L,X,I,z,Y,V,V,V,V,S.tintFill,0,0,r,null,!0,G,!0)}}}a.pipelines.postBatch(n)}};c.exports=p},33629:(c,x,t)=>{/**
5487 * @author       Richard Davey <[email protected]>
5488 * @copyright    2013-2025 Phaser Studio Inc.
5489 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5490 */var o=t(83419),p=t(26099),a=new o({initialize:function(r,e,s,h,i,l,u,d,f){(s===void 0||s<=0)&&(s=32),(h===void 0||h<=0)&&(h=32),i===void 0&&(i=0),l===void 0&&(l=0),u===void 0&&(u={}),d===void 0&&(d={}),this.name=r,this.firstgid=e,this.tileWidth=s,this.tileHeight=h,this.tileMargin=i,this.tileSpacing=l,this.tileProperties=u,this.tileData=d,this.tileOffset=new p,f!==void 0&&this.tileOffset.set(f.x,f.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(n){return this.containsTileIndex(n)?this.tileProperties[n-this.firstgid]:null},getTileData:function(n){return this.containsTileIndex(n)?this.tileData[n-this.firstgid]:null},getTileCollisionGroup:function(n){var r=this.getTileData(n);return r&&r.objectgroup?r.objectgroup:null},containsTileIndex:function(n){return n>=this.firstgid&&n<this.firstgid+this.total},getTileTextureCoordinates:function(n){return this.containsTileIndex(n)?this.texCoordinates[n-this.firstgid]:null},setImage:function(n){this.image=n;var r=n.get(),e=n.getFrameBounds();return this.glTexture=r.source.glTexture,r.width>e.width||r.height>e.height?this.updateTileData(r.width,r.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(n,r){return n!==void 0&&(this.tileWidth=n),r!==void 0&&(this.tileHeight=r),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(n,r){return n!==void 0&&(this.tileMargin=n),r!==void 0&&(this.tileSpacing=r),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(n,r,e,s){e===void 0&&(e=0),s===void 0&&(s=0);var h=(r-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(n-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 l=this.tileMargin+e,u=this.tileMargin+s,d=0;d<this.rows;d++){for(var f=0;f<this.columns;f++)this.texCoordinates.push({x:l,y:u}),l+=this.tileWidth+this.tileSpacing;l=this.tileMargin+e,u+=this.tileHeight+this.tileSpacing}return this}});c.exports=a},72023:(c,x,t)=>{/**
5491 * @author       Richard Davey <[email protected]>
5492 * @copyright    2013-2025 Phaser Studio Inc.
5493 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5494 */var o=t(7423),p=function(a,n,r){var e=o(a,n,!0,r),s=o(a,n-1,!0,r),h=o(a,n+1,!0,r),i=o(a-1,n,!0,r),l=o(a+1,n,!0,r),u=e&&e.collides;return u&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(u&&(e.faceTop=!1),s.faceBottom=!u),h&&h.collides&&(u&&(e.faceBottom=!1),h.faceTop=!u),i&&i.collides&&(u&&(e.faceLeft=!1),i.faceRight=!u),l&&l.collides&&(u&&(e.faceRight=!1),l.faceLeft=!u),e&&!e.collides&&e.resetFaces(),e};c.exports=p},42573:(c,x,t)=>{/**
5495 * @author       Richard Davey <[email protected]>
5496 * @copyright    2013-2025 Phaser Studio Inc.
5497 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5498 */var o=t(7423),p=t(7386),a=function(n,r,e,s,h){for(var i=null,l=null,u=null,d=null,f=p(n,r,e,s,null,h),v=0;v<f.length;v++){var m=f[v];m&&(m.collides?(i=o(m.x,m.y-1,!0,h),l=o(m.x,m.y+1,!0,h),u=o(m.x-1,m.y,!0,h),d=o(m.x+1,m.y,!0,h),m.faceTop=!(i&&i.collides),m.faceBottom=!(l&&l.collides),m.faceLeft=!(u&&u.collides),m.faceRight=!(d&&d.collides)):m.resetFaces())}};c.exports=a},33528:(c,x,t)=>{/**
5499 * @author       Richard Davey <[email protected]>
5500 * @copyright    2013-2025 Phaser Studio Inc.
5501 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5502 */var o=t(26099),p=new o,a=function(n,r,e,s){var h=e.tilemapLayer,i=h.cullPaddingX,l=h.cullPaddingY,u=h.tilemap.tileToWorldXY(n,r,p,s,h);return u.x>s.worldView.x+h.scaleX*e.tileWidth*(-i-.5)&&u.x<s.worldView.right+h.scaleX*e.tileWidth*(i-.5)&&u.y>s.worldView.y+h.scaleY*e.tileHeight*(-l-1)&&u.y<s.worldView.bottom+h.scaleY*e.tileHeight*(l-.5)};c.exports=a},1785:(c,x,t)=>{/**
5503 * @author       Richard Davey <[email protected]>
5504 * @copyright    2013-2025 Phaser Studio Inc.
5505 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5506 */var o=t(42573),p=t(7386),a=t(62991),n=t(23029),r=function(e,s,h,i,l,u,d,f){d===void 0&&(d=!0);var v=p(e,s,h,i,null,f),m=[];v.forEach(function(F){var A=new n(F.layer,F.index,F.x,F.y,F.width,F.height,F.baseWidth,F.baseHeight);A.copy(F),m.push(A)});for(var y=l-e,g=u-s,T=0;T<m.length;T++){var S=m[T],E=S.x+y,M=S.y+g;a(E,M,f)&&f.data[M][E]&&(S.x=E,S.y=M,S.updatePixelXY(),f.data[M][E]=S)}d&&o(l-1,u-1,h+2,i+2,f),v.length=0,m.length=0};c.exports=r},78419:(c,x,t)=>{/**
5507 * @author       Richard Davey <[email protected]>
5508 * @copyright    2013-2025 Phaser Studio Inc.
5509 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5510 */var o=t(62644),p=t(7386),a=t(27987),n=function(r,e,s,h,i,l){s||(s={}),Array.isArray(r)||(r=[r]);var u=l.tilemapLayer;
5510h||(h=u.scene),i||(i=h.cameras.main);var d=l.width,f=l.height,v=p(0,0,d,f,null,l),m=[],y,g=function(M,F,A){for(var P=0;P<A.length;P++){var L=A[P];M.hasOwnProperty(L)||(M[L]=F[L])}};for(y=0;y<v.length;y++){var T=v[y],S=o(s);if(r.indexOf(T.index)!==-1){var E=u.tileToWorldXY(T.x,T.y,void 0,i,l);S.x=E.x,S.y=E.y,g(S,T,["rotation","flipX","flipY","alpha","visible","tint"]),S.hasOwnProperty("origin")||(S.x+=T.width*.5,S.y+=T.height*.5),S.hasOwnProperty("useSpriteSheet")&&(S.key=T.tileset.image,S.frame=T.index-T.tileset.firstgid),m.push(h.make.sprite(S))}}if(Array.isArray(e))for(y=0;y<r.length;y++)a(r[y],e[y],0,0,d,f,l);else if(e!==null)for(y=0;y<r.length;y++)a(r[y],e,0,0,d,f,l);return m};c.exports=n},19545:(c,x,t)=>{/**
5511 * @author       Richard Davey <[email protected]>
5512 * @copyright    2013-2025 Phaser Studio Inc.
5513 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5514 */var o=t(87841),p=t(63448),a=t(56583),n=new o,r=function(e,s){var h=e.tilemapLayer.tilemap,i=e.tilemapLayer,l=Math.floor(h.tileWidth*i.scaleX),u=Math.floor(h.tileHeight*i.scaleY),d=a(s.worldView.x-i.x,l,0,!0)-i.cullPaddingX,f=p(s.worldView.right-i.x,l,0,!0)+i.cullPaddingX,v=a(s.worldView.y-i.y,u,0,!0)-i.cullPaddingY,m=p(s.worldView.bottom-i.y,u,0,!0)+i.cullPaddingY;return n.setTo(d,v,f-d,m-v)};c.exports=r},30003:(c,x,t)=>{/**
5515 * @author       Richard Davey <[email protected]>
5516 * @copyright    2013-2025 Phaser Studio Inc.
5517 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5518 */var o=t(19545),p=t(32483),a=function(n,r,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var h=n.tilemapLayer,i=o(n,r);return(h.skipCull||h.scrollFactorX!==1||h.scrollFactorY!==1)&&(i.left=0,i.right=n.width,i.top=0,i.bottom=n.height),p(n,i,s,e),e};c.exports=a},35137:(c,x,t)=>{/**
5519 * @author       Richard Davey <[email protected]>
5520 * @copyright    2013-2025 Phaser Studio Inc.
5521 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5522 */var o=t(7386),p=t(42573),a=t(20576),n=function(r,e,s,h,i,l,u){for(var d=u.collideIndexes.indexOf(r)!==-1,f=o(e,s,h,i,null,u),v=0;v<f.length;v++)f[v].index=r,a(f[v],d);l&&p(e-1,s-1,h+2,i+2,u)};c.exports=n},40253:(c,x,t)=>{/**
5523 * @author       Richard Davey <[email protected]>
5524 * @copyright    2013-2025 Phaser Studio Inc.
5525 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5526 */var o=t(7386),p=function(a,n,r,e,s,h,i,l){var u=o(r,e,s,h,i,l);return u.filter(a,n)};c.exports=p},52692:c=>{/**
5527 * @author       Richard Davey <[email protected]>
5528 * @copyright    2013-2025 Phaser Studio Inc.
5529 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5530 */var x=function(t,o,p,a){o===void 0&&(o=0),p===void 0&&(p=!1);var n=0,r,e,s;if(p){for(e=a.height-1;e>=0;e--)for(r=a.width-1;r>=0;r--)if(s=a.data[e][r],s&&s.index===t){if(n===o)return s;n+=1}}else for(e=0;e<a.height;e++)for(r=0;r<a.width;r++)if(s=a.data[e][r],s&&s.index===t){if(n===o)return s;n+=1}return null};c.exports=x},66151:(c,x,t)=>{/**
5531 * @author       Richard Davey <[email protected]>
5532 * @copyright    2013-2025 Phaser Studio Inc.
5533 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5534 */var o=t(7386),p=function(a,n,r,e,s,h,i,l){var u=o(r,e,s,h,i,l);return u.find(a,n)||null};c.exports=p},97560:(c,x,t)=>{/**
5535 * @author       Richard Davey <[email protected]>
5536 * @copyright    2013-2025 Phaser Studio Inc.
5537 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5538 */var o=t(7386),p=function(a,n,r,e,s,h,i,l){var u=o(r,e,s,h,i,l);u.forEach(a,n)};c.exports=p},43305:(c,x,t)=>{/**
5539 * @author       Richard Davey <[email protected]>
5540 * @copyright    2013-2025 Phaser Studio Inc.
5541 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5542 */var o=t(91907),p=t(30003),a=t(9474),n=t(14018),r=t(29747),e=t(54503),s=function(h){return h===o.ORTHOGONAL?p:h===o.HEXAGONAL?a:h===o.STAGGERED?e:h===o.ISOMETRIC?n:r};c.exports=s},7423:(c,x,t)=>{/**
5543 * @author       Richard Davey <[email protected]>
5544 * @copyright    2013-2025 Phaser Studio Inc.
5545 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5546 */var o=t(62991),p=function(a,n,r,e){if(o(a,n,e)){var s=e.data[n][a]||null;return s?s.index===-1?r?s:null:s:null}else return null};c.exports=p},60540:(c,x,t)=>{/**
5547 * @author       Richard Davey <[email protected]>
5548 * @copyright    2013-2025 Phaser Studio Inc.
5549 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5550 */var o=t(7423),p=t(26099),a=new p,n=function(r,e,s,h,i){return i.tilemapLayer.worldToTileXY(r,e,!0,a,h),o(a.x,a.y,s,i)};c.exports=n},55826:(c,x,t)=>{/**
5551 * @author       Richard Davey <[email protected]>
5552 * @copyright    2013-2025 Phaser Studio Inc.
5553 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5554 */var o=t(26099),p=function(a,n,r,e){var s=e.baseTileWidth,h=e.baseTileHeight,i=e.tilemapLayer,l=0,u=0;i&&(r||(r=i.scene.cameras.main),l=i.x+r.scrollX*(1-i.scrollFactorX),u=i.y+r.scrollY*(1-i.scrollFactorY),s
5554*=i.scaleX,h*=i.scaleY);var d=l+a*s,f=u+n*h;return[new o(d,f),new o(d+s,f),new o(d+s,f+h),new o(d,f+h)]};c.exports=p},11758:(c,x,t)=>{/**
5555 * @author       Richard Davey <[email protected]>
5556 * @copyright    2013-2025 Phaser Studio Inc.
5557 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5558 */var o=t(91907),p=t(27229),a=t(29747),n=t(55826),r=function(e){return e===o.ORTHOGONAL?n:e===o.ISOMETRIC?a:e===o.HEXAGONAL?p:(e===o.STAGGERED,a)};c.exports=r},39167:(c,x,t)=>{/**
5559 * @author       Richard Davey <[email protected]>
5560 * @copyright    2013-2025 Phaser Studio Inc.
5561 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5562 */var o=t(91907),p=t(29747),a=t(97281),n=function(r){return r===o.ORTHOGONAL?a:p};c.exports=n},62e3:(c,x,t)=>{/**
5563 * @author       Richard Davey <[email protected]>
5564 * @copyright    2013-2025 Phaser Studio Inc.
5565 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5566 */var o=t(91907),p=t(19951),a=t(14127),n=t(29747),r=t(97202),e=t(70326),s=function(h){return h===o.ORTHOGONAL?e:h===o.ISOMETRIC?a:h===o.HEXAGONAL?p:h===o.STAGGERED?r:n};c.exports=s},5984:(c,x,t)=>{/**
5567 * @author       Richard Davey <[email protected]>
5568 * @copyright    2013-2025 Phaser Studio Inc.
5569 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5570 */var o=t(91907),p=t(29747),a=t(28054),n=t(29650),r=function(e){return e===o.ORTHOGONAL?n:e===o.STAGGERED?a:p};c.exports=r},7386:(c,x,t)=>{/**
5571 * @author       Richard Davey <[email protected]>
5572 * @copyright    2013-2025 Phaser Studio Inc.
5573 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5574 */var o=t(95540),p=function(a,n,r,e,s,h){a===void 0&&(a=0),n===void 0&&(n=0),r===void 0&&(r=h.width),e===void 0&&(e=h.height),s||(s={});var i=o(s,"isNotEmpty",!1),l=o(s,"isColliding",!1),u=o(s,"hasInterestingFace",!1);a<0&&(r+=a,a=0),n<0&&(e+=n,n=0),a+r>h.width&&(r=Math.max(h.width-a,0)),n+e>h.height&&(e=Math.max(h.height-n,0));for(var d=[],f=n;f<n+e;f++)for(var v=a;v<a+r;v++){var m=h.data[f][v];if(m!==null){if(i&&m.index===-1||l&&!m.collides||u&&!m.hasInterestingFace)continue;d.push(m)}}return d};c.exports=p},91141:(c,x,t)=>{/**
5575 * @author       Richard Davey <[email protected]>
5576 * @copyright    2013-2025 Phaser Studio Inc.
5577 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5578 */var o=t(55738),p=t(7386),a=t(91865),n=t(29747),r=t(26099),e=t(91907),s=function(d,f){return a.RectangleToTriangle(f,d)},h=new r,i=new r,l=new r,u=function(d,f,v,m){if(m.orientation!==e.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(d===void 0)return[];var y=n;d instanceof o.Circle?y=a.CircleToRectangle:d instanceof o.Rectangle?y=a.RectangleToRectangle:d instanceof o.Triangle?y=s:d instanceof o.Line&&(y=a.LineToRectangle),m.tilemapLayer.worldToTileXY(d.left,d.top,!0,i,v);var g=i.x,T=i.y;m.tilemapLayer.worldToTileXY(d.right,d.bottom,!1,l,v);var S=Math.ceil(l.x),E=Math.ceil(l.y),M=Math.max(S-g,1),F=Math.max(E-T,1),A=p(g,T,M,F,f,m),P=m.tileWidth,L=m.tileHeight;m.tilemapLayer&&(P*=m.tilemapLayer.scaleX,L*=m.tilemapLayer.scaleY);for(var O=[],G=new o.Rectangle(0,0,P,L),z=0;z<A.length;z++){var Y=A[z];m.tilemapLayer.tileToWorldXY(Y.x,Y.y,h,v),G.x=h.x,G.y=h.y,y(d,G)&&O.push(Y)}return O};c.exports=u},96523:(c,x,t)=>{/**
5579 * @author       Richard Davey <[email protected]>
5580 * @copyright    2013-2025 Phaser Studio Inc.
5581 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5582 */var o=t(7386),p=t(26099),a=new p,n=new p,r=function(e,s,h,i,l,u,d){var f=d.tilemapLayer.tilemap._convert.WorldToTileXY;f(e,s,!0,a,u,d);var v=a.x,m=a.y;f(e+h,s+i,!1,n,u,d);var y=Math.ceil(n.x),g=Math.ceil(n.y);return o(v,m,y-v,g-m,l,d)};c.exports=r},96113:(c,x,t)=>{/**
5583 * @author       Richard Davey <[email protected]>
5584 * @copyright    2013-2025 Phaser Studio Inc.
5585 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5586 */var o=t(91907),p=t(20242),a=t(10095),n=function(r){return r===o.ORTHOGONAL?a:p};c.exports=n},16926:(c,x,t)=>{/**
5587 * @author       Richard Davey <[email protected]>
5588 * @copyright    2013-2025 Phaser Studio Inc.
5589 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5590 */var o=t(91907),p=t(86625),a=t(96897),n=t(29747),r=t(15108),e=t(85896),s=function(h){return h===o.ORTHOGONAL?e:h===o.ISOMETRIC?a:h===o.HEXAGONAL?p:h===o.STAGGERED?r:n};c.exports=s},55762:(c,x,t)=>{/**
5591 * @author       Richard Davey <[email protected]>
5592 * @copyright    2013-2025 Phaser Studio Inc.
5593 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5594 */var o=t(91907),p=t(20242),a=t(51900),n=t(63288),r=function(e){return e===o.ORTHOGONAL?n:e===o.STAGGERED?a:p};c.exports=r},45091:(c,x,t)=>{/**
5595 * @author       Richard Davey <[email protected]>
5596 * @copyright    2013-2025 Phaser Studio Inc.
5597 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5598 */var o=t(62991),p=function(a,n,r){if(o(a,n,r)){var e=r.data[n][a];return e!==null&&e.index>-1}
5598else return!1};c.exports=p},24152:(c,x,t)=>{/**
5599 * @author       Richard Davey <[email protected]>
5600 * @copyright    2013-2025 Phaser Studio Inc.
5601 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5602 */var o=t(45091),p=t(26099),a=new p,n=function(r,e,s,h){h.tilemapLayer.worldToTileXY(r,e,!0,a,s);var i=a.x,l=a.y;return o(i,l,h)};c.exports=n},90454:(c,x,t)=>{/**
5603 * @author       Richard Davey <[email protected]>
5604 * @copyright    2013-2025 Phaser Studio Inc.
5605 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5606 */var o=t(63448),p=t(56583),a=function(n,r){var e=n.tilemapLayer.tilemap,s=n.tilemapLayer,h=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),l=n.hexSideLength,u,d,f,v;if(n.staggerAxis==="y"){var m=(i-l)/2+l;u=p(r.worldView.x-s.x,h,0,!0)-s.cullPaddingX,d=o(r.worldView.right-s.x,h,0,!0)+s.cullPaddingX,f=p(r.worldView.y-s.y,m,0,!0)-s.cullPaddingY,v=o(r.worldView.bottom-s.y,m,0,!0)+s.cullPaddingY}else{var y=(h-l)/2+l;u=p(r.worldView.x-s.x,y,0,!0)-s.cullPaddingX,d=o(r.worldView.right-s.x,y,0,!0)+s.cullPaddingX,f=p(r.worldView.y-s.y,i,0,!0)-s.cullPaddingY,v=o(r.worldView.bottom-s.y,i,0,!0)+s.cullPaddingY}return{left:u,right:d,top:f,bottom:v}};c.exports=a},9474:(c,x,t)=>{/**
5607 * @author       Richard Davey <[email protected]>
5608 * @copyright    2013-2025 Phaser Studio Inc.
5609 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5610 */var o=t(90454),p=t(32483),a=function(n,r,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var h=n.tilemapLayer,i=o(n,r);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(i.left=0,i.right=n.width,i.top=0,i.bottom=n.height),p(n,i,s,e),e};c.exports=a},27229:(c,x,t)=>{/**
5611 * @author       Richard Davey <[email protected]>
5612 * @copyright    2013-2025 Phaser Studio Inc.
5613 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5614 */var o=t(19951),p=t(26099),a=new p,n=function(r,e,s,h){var i=h.baseTileWidth,l=h.baseTileHeight,u=h.tilemapLayer;u&&(i*=u.scaleX,l*=u.scaleY);var d=o(r,e,a,s,h),f=[],v=.5773502691896257,m,y;h.staggerAxis==="y"?(m=v*i,y=l/2):(m=i/2,y=v*l);for(var g=0;g<6;g++){var T=2*Math.PI*(.5-g)/6;f.push(new p(d.x+m*Math.cos(T),d.y+y*Math.sin(T)))}return f};c.exports=n},19951:(c,x,t)=>{/**
5615 * @author       Richard Davey <[email protected]>
5616 * @copyright    2013-2025 Phaser Studio Inc.
5617 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5618 */var o=t(26099),p=function(a,n,r,e,s){r||(r=new o);var h=s.baseTileWidth,i=s.baseTileHeight,l=s.tilemapLayer,u=0,d=0;l&&(e||(e=l.scene.cameras.main),u=l.x+e.scrollX*(1-l.scrollFactorX),d=l.y+e.scrollY*(1-l.scrollFactorY),h*=l.scaleX,i*=l.scaleY);var f=h/2,v=i/2,m,y,g=s.staggerAxis,T=s.staggerIndex;return g==="y"?(m=u+h*a+h,y=d+1.5*n*v+v,n%2===0&&(T==="odd"?m-=f:m+=f)):g==="x"&&T==="odd"&&(m=u+1.5*a*f+f,y=d+i*a+i,a%2===0&&(T==="odd"?y-=v:y+=v)),r.set(m,y)};c.exports=p},86625:(c,x,t)=>{/**
5619 * @author       Richard Davey <[email protected]>
5620 * @copyright    2013-2025 Phaser Studio Inc.
5621 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5622 */var o=t(26099),p=function(a,n,r,e,s,h){e||(e=new o);var i=h.baseTileWidth,l=h.baseTileHeight,u=h.tilemapLayer;u&&(s||(s=u.scene.cameras.main),a=a-(u.x+s.scrollX*(1-u.scrollFactorX)),n=n-(u.y+s.scrollY*(1-u.scrollFactorY)),i*=u.scaleX,l*=u.scaleY);var d=.5773502691896257,f=-.3333333333333333,v=0,m=.6666666666666666,y=i/2,g=l/2,T,S,E,M,F;h.staggerAxis==="y"?(T=(a-y)/(d*i),S=(n-g)/g,E=d*T+f*S,M=v*T+m*S):(T=(a-y)/y,S=(n-g)/(d*l),E=f*T+d*S,M=m*T+v*S),F=-E-M;var A=Math.round(E),P=Math.round(M),L=Math.round(F),O=Math.abs(A-E),G=Math.abs(P-M),z=Math.abs(L-F);O>G&&O>z?A=-P-L:G>z&&(P=-A-L);var Y,X=P;return h.staggerIndex==="odd"?Y=X%2===0?P/2+A:P/2+A-.5:Y=X%2===0?P/2+A:P/2+A+.5,e.set(Y,X)};c.exports=p},62991:c=>{/**
5623 * @author       Richard Davey <[email protected]>
5624 * @copyright    2013-2025 Phaser Studio Inc.
5625 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5626 */var x=function(t,o,p){return t>=0&&t<p.width&&o>=0&&o<p.height};c.exports=x},14018:(c,x,t)=>{/**
5627 * @author       Richard Davey <[email protected]>
5628 * @copyright    2013-2025 Phaser Studio Inc.
5629 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5630 */var o=t(33528),p=function(a,n,r,e){r===void 0&&(r=[]),e===void 0&&(e=0),r.length=0;var s=a.tilemapLayer,h=a.data,i=a.width,l=a.height,u=s.skipCull,d=0,f=i,v=0,m=l,y,g,T;if(e===0)for(g=v;g<m;g++)for(y=d;y<f;y++)T=h[g][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!u&&!o(y,g,a,n)||r.push(T));else if(e===1)for(g=v;g<m;g++)for(y=f;y>=d;y--)T=h[g][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!u&&!o(y,g,a,n)||r.push(T));else if(e===2)for(g=m;g>=v;g--)for(y=d;y<f;y++)T=h[g][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!u&&!o(y,g,a,n)||r.push(T));else if(e===3)for(g=m;g>=v;g--)for(y=f;y>=d;y--)T=h[g][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!u&&!o(y,g,a,n)||r.push(T));return s.tilesDrawn=r.length,s.tilesTotal=i*l,r};c.exports=p},14127:(c,x,t)=>{/**
5631 * @author       Richard Davey <[email protected]>
5632 * @copyright    2013-2025 Phaser Studio Inc.
5633 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5634 */var o=t(26099),p=function(a,n,r,e,s){r||(r=new o);var h=s.baseTileWidth,i=s.baseTileHeight,l=s.tilemapLayer,u=0,d=0;l&&(e||(e=l.scene.cameras.main),u=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,d=l.
5634y+e.scrollY*(1-l.scrollFactorY),i*=l.scaleY);var f=u+(a-n)*(h/2),v=d+(a+n)*(i/2);return r.set(f,v)};c.exports=p},96897:(c,x,t)=>{/**
5635 * @author       Richard Davey <[email protected]>
5636 * @copyright    2013-2025 Phaser Studio Inc.
5637 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5638 */var o=t(26099),p=function(a,n,r,e,s,h,i){e||(e=new o);var l=h.baseTileWidth,u=h.baseTileHeight,d=h.tilemapLayer;d&&(s||(s=d.scene.cameras.main),n=n-(d.y+s.scrollY*(1-d.scrollFactorY)),u*=d.scaleY,a=a-(d.x+s.scrollX*(1-d.scrollFactorX)),l*=d.scaleX);var f=l/2,v=u/2;a=a-f,i||(n=n-u);var m=.5*(a/f+n/v),y=.5*(-a/f+n/v);return r&&(m=Math.floor(m),y=Math.floor(y)),e.set(m,y)};c.exports=p},71558:(c,x,t)=>{/**
5639 * @author       Richard Davey <[email protected]>
5640 * @copyright    2013-2025 Phaser Studio Inc.
5641 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5642 */var o=t(23029),p=t(62991),a=t(72023),n=t(20576),r=function(e,s,h,i,l){if(i===void 0&&(i=!0),!p(s,h,l))return null;var u,d=l.data[h][s],f=d&&d.collides;e instanceof o?(l.data[h][s]===null&&(l.data[h][s]=new o(l,e.index,s,h,l.tileWidth,l.tileHeight)),l.data[h][s].copy(e)):(u=e,l.data[h][s]===null?l.data[h][s]=new o(l,u,s,h,l.tileWidth,l.tileHeight):l.data[h][s].index=u);var v=l.data[h][s],m=l.collideIndexes.indexOf(v.index)!==-1;if(u=e instanceof o?e.index:e,u===-1)v.width=l.tileWidth,v.height=l.tileHeight;else{var y=l.tilemapLayer.tilemap,g=y.tiles,T=g[u][2],S=y.tilesets[T];v.width=S.tileWidth,v.height=S.tileHeight}return n(v,m),i&&f!==v.collides&&a(s,h,l),v};c.exports=r},26303:(c,x,t)=>{/**
5643 * @author       Richard Davey <[email protected]>
5644 * @copyright    2013-2025 Phaser Studio Inc.
5645 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5646 */var o=t(71558),p=t(26099),a=new p,n=function(r,e,s,h,i,l){return l.tilemapLayer.worldToTileXY(e,s,!0,a,i,l),o(r,a.x,a.y,h,l)};c.exports=n},14051:(c,x,t)=>{/**
5647 * @author       Richard Davey <[email protected]>
5648 * @copyright    2013-2025 Phaser Studio Inc.
5649 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5650 */var o=t(42573),p=t(71558),a=function(n,r,e,s,h){if(s===void 0&&(s=!0),!Array.isArray(n))return null;Array.isArray(n[0])||(n=[n]);for(var i=n.length,l=n[0].length,u=0;u<i;u++)for(var d=0;d<l;d++){var f=n[u][d];p(f,r+d,e+u,!1,h)}s&&o(r-1,e-1,l+2,i+2,h)};c.exports=a},77389:(c,x,t)=>{/**
5651 * @author       Richard Davey <[email protected]>
5652 * @copyright    2013-2025 Phaser Studio Inc.
5653 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5654 */var o=t(7386),p=t(26546),a=function(n,r,e,s,h,i){var l,u=o(n,r,e,s,{},i);if(!h)for(h=[],l=0;l<u.length;l++)h.indexOf(u[l].index)===-1&&h.push(u[l].index);for(l=0;l<u.length;l++)u[l].index=p(h)};c.exports=a},63557:(c,x,t)=>{/**
5655 * @author       Richard Davey <[email protected]>
5656 * @copyright    2013-2025 Phaser Studio Inc.
5657 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5658 */var o=t(23029),p=t(62991),a=t(72023),n=function(r,e,s,h,i){if(s===void 0&&(s=!0),h===void 0&&(h=!0),!p(r,e,i))return null;var l=i.data[e][r];if(l)i.data[e][r]=s?null:new o(i,-1,r,e,i.tileWidth,i.tileHeight);else return null;return h&&l&&l.collides&&a(r,e,i),l};c.exports=n},94178:(c,x,t)=>{/**
5659 * @author       Richard Davey <[email protected]>
5660 * @copyright    2013-2025 Phaser Studio Inc.
5661 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5662 */var o=t(63557),p=t(26099),a=new p,n=function(r,e,s,h,i,l){return l.tilemapLayer.worldToTileXY(r,e,!0,a,i,l),o(a.x,a.y,s,h,l)};c.exports=n},15533:(c,x,t)=>{/**
5663 * @author       Richard Davey <[email protected]>
5664 * @copyright    2013-2025 Phaser Studio Inc.
5665 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5666 */var o=t(7386),p=t(3956),a=new p(105,210,231,150),n=new p(243,134,48,200),r=new p(40,39,37,150),e=function(s,h,i){h===void 0&&(h={});var l=h.tileColor!==void 0?h.tileColor:a,u=h.collidingTileColor!==void 0?h.collidingTileColor:n,d=h.faceColor!==void 0?h.faceColor:r,f=o(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<f.length;
5666v++){var m=f[v],y=m.tileset?m.tileset.tileOffset:{x:0,y:0},g=m.width,T=m.height,S=m.pixelX-y.x,E=m.pixelY-y.y,M=m.collides?u:l;M!==null&&(s.fillStyle(M.color,M.alpha/255),s.fillRect(S,E,g,T)),S+=1,E+=1,g-=2,T-=2,d!==null&&(s.lineStyle(1,d.color,d.alpha/255),m.faceTop&&s.lineBetween(S,E,S+g,E),m.faceRight&&s.lineBetween(S+g,E,S+g,E+T),m.faceBottom&&s.lineBetween(S,E+T,S+g,E+T),m.faceLeft&&s.lineBetween(S,E,S,E+T))}};c.exports=e},27987:(c,x,t)=>{/**
5667 * @author       Richard Davey <[email protected]>
5668 * @copyright    2013-2025 Phaser Studio Inc.
5669 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5670 */var o=t(7386),p=function(a,n,r,e,s,h,i){for(var l=o(r,e,s,h,null,i),u=0;u<l.length;u++)l[u]&&l[u].index===a&&(l[u].index=n)};c.exports=p},32483:c=>{/**
5671 * @author       Richard Davey <[email protected]>
5672 * @copyright    2013-2025 Phaser Studio Inc.
5673 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5674 */var x=function(t,o,p,a){var n=t.data,r=t.width,e=t.height,s=t.tilemapLayer,h=Math.max(0,o.left),i=Math.min(r,o.right),l=Math.max(0,o.top),u=Math.min(e,o.bottom),d,f,v;if(p===0)for(f=l;f<u;f++)for(d=h;n[f]&&d<i;d++)v=n[f][d],!(!v||v.index===-1||!v.visible||v.alpha===0)&&a.push(v);else if(p===1)for(f=l;f<u;f++)for(d=i;n[f]&&d>=h;d--)v=n[f][d],!(!v||v.index===-1||!v.visible||v.alpha===0)&&a.push(v);else if(p===2)for(f=u;f>=l;f--)for(d=h;n[f]&&d<i;d++)v=n[f][d],!(!v||v.index===-1||!v.visible||v.alpha===0)&&a.push(v);else if(p===3)for(f=u;f>=l;f--)for(d=i;n[f]&&d>=h;d--)v=n[f][d],!(!v||v.index===-1||!v.visible||v.alpha===0)&&a.push(v);return s.tilesDrawn=a.length,s.tilesTotal=r*e,a};c.exports=x},57068:(c,x,t)=>{/**
5675 * @author       Richard Davey <[email protected]>
5676 * @copyright    2013-2025 Phaser Studio Inc.
5677 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5678 */var o=t(20576),p=t(42573),a=t(9589),n=function(r,e,s,h,i){e===void 0&&(e=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),Array.isArray(r)||(r=[r]);for(var l=0;l<r.length;l++)a(r[l],e,h);if(i)for(var u=0;u<h.height;u++)for(var d=0;d<h.width;d++){var f=h.data[u][d];f&&r.indexOf(f.index)!==-1&&o(f,e)}s&&p(0,0,h.width,h.height,h)};c.exports=n},37266:(c,x,t)=>{/**
5679 * @author       Richard Davey <[email protected]>
5680 * @copyright    2013-2025 Phaser Studio Inc.
5681 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5682 */var o=t(20576),p=t(42573),a=t(9589),n=function(r,e,s,h,i,l){if(s===void 0&&(s=!0),h===void 0&&(h=!0),l===void 0&&(l=!0),!(r>e)){for(var u=r;u<=e;u++)a(u,s,i);if(l)for(var d=0;d<i.height;d++)for(var f=0;f<i.width;f++){var v=i.data[d][f];v&&v.index>=r&&v.index<=e&&o(v,s)}h&&p(0,0,i.width,i.height,i)}};c.exports=n},75661:(c,x,t)=>{/**
5683 * @author       Richard Davey <[email protected]>
5684 * @copyright    2013-2025 Phaser Studio Inc.
5685 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5686 */var o=t(20576),p=t(42573),a=t(9589),n=function(r,e,s,h){e===void 0&&(e=!0),s===void 0&&(s=!0),Array.isArray(r)||(r=[r]);for(var i=0;i<h.height;i++)for(var l=0;l<h.width;l++){var u=h.data[i][l];u&&r.indexOf(u.index)===-1&&(o(u,e),a(u.index,e,h))}s&&p(0,0,h.width,h.height,h)};c.exports=n},64740:(c,x,t)=>{/**
5687 * @author       Richard Davey <[email protected]>
5688 * @copyright    2013-2025 Phaser Studio Inc.
5689 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5690 */var o=t(20576),p=t(42573),a=t(97022),n=function(r,e,s,h){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i<h.height;i++)for(var l=0;l<h.width;l++){var u=h.data[i][l];if(u){for(var d in r)if(a(u.properties,d)){var f=r[d];Array.isArray(f)||(f=[f]);for(var v=0;v<f.length;v++)u.properties[d]===f[v]&&o(u,e)}}}s&&p(0,0,h.width,h.height,h)};c.exports=n},63307:(c,x,t)=>{/**
5691 * @author       Richard Davey <[email protected]>
5692 * @copyright    2013-2025 Phaser Studio Inc.
5693 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5694 */var o=t(20576),p=t(42573),a=function(n,r,e){n===void 0&&(n=!0),r===void 0&&(r=!0);for(var s=0;s<e.height;s++)for(var h=0;h<e.width;h++){var i=e.data[s][h];if(i){var l=i.getCollisionGroup();l&&l.objects&&l.objects.length>0&&o(i,n)}}r&&p(0,0,e.width,e.height,e)};c.exports=a},9589:c=>{/**
5695 * @author       Richard Davey <[email protected]>
5696 * @copyright    2013-2025 Phaser Studio Inc.
5697 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5698 */var x=function(t,o,p){var a=p.collideIndexes.indexOf(t);o&&a===-1?p.collideIndexes.push(t):!o&&a!==-1&&p.collideIndexes.splice(a,1)};c.exports=x},20576:c=>{/**
5699 * @author       Richard Davey <[email protected]>
5700 * @copyright    2013-2025 Phaser Studio Inc.
5701 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5702 */var x=function(t,o){o?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};c.exports=x},79583:c=>{/**
5703 * @author       Richard Davey <[email protected]>
5704 * @copyright    2013-2025 Phaser Studio Inc.
5705 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5706 */var x=function(t,o,p,a){if(typeof t=="number")a.callbacks[t]=o!==null?{callback:o,callbackContext:p}:void 0;else for(var n=0,r=t.length;n<r;n++)a.callbacks[t[n]]=o!==null?{callback:o,callbackContext:p}:void 0};c.exports=x},93254:(c,x,t)=>{/**
5707 * @author       Richard Davey <[email protected]>
5708 * @copyright    2013-2025 Phaser Studio Inc.
5709 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5710 */var o=t(7386),p=function(a,n,r,e,s,h,i){for(var l=o(a,n,r,e,null,i),u=0;u<l.length;u++)l[u].setCollisionCallback(s,h)};c.exports=p},32903:(c,x,t)=>{/**
5711 * @author       Richard Davey <[email protected]>
5712 * @copyright    2013-2025 Phaser Studio Inc.
5713 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5714 */var o=t(7386),p=t(33680),a=function(n,r,e,s,h){var i=o(n,r,e,s,null,h),l=i.map(function(d){return d.index});p(l);for(var u=0;u<i.length;u++)i[u].index=l[u]};c.exports=a},61325:(c,x,t)=>{/**
5715 * @author       Richard Davey <[email protected]>
5716 * @copyright    2013-2025 Phaser Studio Inc.
5717 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5718 */var o=t(63448),p=t(56583),a=function(n,r){var e=n.tilemapLayer.tilemap,s=n.tilemapLayer,h=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),l=p(r.worldView.x-s.x,h,0,!0)-s.cullPaddingX,u=o(r.worldView.right-s.x,h,0,!0)+s.cullPaddingX,d=p(r.worldView.y-s.y,i/2,0,!0)-s.cullPaddingY,f=o(r.worldView.bottom-s.y,i/2,0,!0)+s.cullPaddingY;return{left:l,right:u,top:d,bottom:f}};c.exports=a},54503:(c,x,t)=>{/**
5719 * @author       Richard Davey <[email protected]>
5720 * @copyright    2013-2025 Phaser Studio Inc.
5721 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5722 */var o=t(61325),p=t(32483),a=function(n,r,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var h=n.tilemapLayer,i=o(n,r);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(i.left=0,i.right=n.width,i.top=0,i.bottom=n.height),p(n,i,s,e),e};c.exports=a},97202:(c,x,t)=>{/**
5723 * @author       Richard Davey <[email protected]>
5724 * @copyright    2013-2025 Phaser Studio Inc.
5725 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5726 */var o=t(26099),p=function(a,n,r,e,s){r||(r=new o);var h=s.baseTileWidth,i=s.baseTileHeight,l=s.tilemapLayer,u=0,d=0;l&&(e||(e=l.scene.cameras.main),u=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,d=l.y+e.scrollY*(1-l.scrollFactorY),i*=l.scaleY);var f=u+a*h+n%2*(h/2),v=d+n*(i/2);return r.set(f,v)};c.exports=p},28054:c=>{/**
5727 * @author       Richard Davey <[email protected]>
5728 * @copyright    2013-2025 Phaser Studio Inc.
5729 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5730 */var x=function(t,o,p){var a=p.baseTileHeight,n=p.tilemapLayer,r=0;return n&&(o===void 0&&(o=n.scene.cameras.main),r=n.y+o.scrollY*(1-n.scrollFactorY),a*=n.scaleY),r+t*(a/2)+a};c.exports=x},15108:(c,x,t)=>{/**
5731 * @author       Richard Davey <[email protected]>
5732 * @copyright    2013-2025 Phaser Studio Inc.
5733 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5734 */var o=t(26099),p=function(a,n,r,e,s,h){e||(e=new o);var i=h.baseTileWidth,l=h.baseTileHeight,u=h.tilemapLayer;u&&(s||(s=u.scene.cameras.main),n=n-(u.y+s.scrollY*(1-u.scrollFactorY)),l*=u.scaleY,a=a-(u.x+s.scrollX*(1-u.scrollFactorX)),i*=u.scaleX);var d=r?Math.floor(n/(l/2)):n/(l/2),f=r?Math.floor((a+d%2*.5*i)/i):(a+d%2*.5*i)/i;return e.set(f,d)};c.exports=p},51900:c=>{/**
5735 * @author       Richard Davey <[email protected]>
5736 * @copyright    2013-2025 Phaser Studio Inc.
5737 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5738 */var x=function(t,o,p,a){var n=a.baseTileHeight,r=a.tilemapLayer;return r&&(p||(p=r.scene.cameras.main),t=t-(r.y+p.scrollY*(1-r.scrollFactorY)),n*=r.scaleY),o?Math.floor(t/(n/2)):t/(n/2)};c.exports=x},86560:(c,x,t)=>{/**
5739 * @author       Richard Davey <[email protected]>
5740 * @copyright    2013-2025 Phaser Studio Inc.
5741 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5742 */var o=t(7386),p=function(a,n,r,e,s,h,i){for(var l=o(r,e,s,h,null,i),u=0;u<l.length;u++)l[u]&&(l[u].index===a?l[u].index=n:l[u].index===n&&(l[u].index=a))};c.exports=p},97281:c=>{/**
5743 * @author       Richard Davey <[email protected]>
5744 * @copyright    2013-2025 Phaser Studio Inc.
5745 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5746 */var x=function(t,o,p){var a=p.baseTileWidth,n=p.tilemapLayer,r=0;return n&&(o||(o=n.scene.cameras.main),r=n.x+o.scrollX*(1-n.scrollFactorX),a*=n.scaleX),r+t*a};c.exports=x},70326:(c,x,t)=>{/**
5747 * @author       Richard Davey <[email protected]>
5748 * @copyright    2013-2025 Phaser Studio Inc.
5749 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5750 */var o=t(97281),p=t(29650),a=t(26099),n=function(r,e,s,h,i){return s||(s=new a(0,0)),s.x=o(r,h,i),s.y=p(e,h,i),s};c.exports=n},29650:c=>{/**
5751 * @author       Richard Davey <[email protected]>
5752 * @copyright    2013-2025 Phaser Studio Inc.
5753 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5754 */var x=function(t,o,p){var a=p.baseTileHeight,n=p.tilemapLayer,r=0;return n&&(o||(o=n.scene.cameras.main),r=n.y+o.scrollY*(1-n.scrollFactorY),a*=n.scaleY),r+t*a};c.exports=x}
5754,77366:(c,x,t)=>{/**
5755 * @author       Richard Davey <[email protected]>
5756 * @copyright    2013-2025 Phaser Studio Inc.
5757 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5758 */var o=t(7386),p=t(75508),a=function(n,r,e,s,h,i){if(h){var l,u=o(n,r,e,s,null,i),d=0;for(l=0;l<h.length;l++)d+=h[l].weight;if(!(d<=0))for(l=0;l<u.length;l++){for(var f=p.RND.frac()*d,v=0,m=-1,y=0;y<h.length;y++)if(v+=h[y].weight,f<=v){var g=h[y].index;m=Array.isArray(g)?g[Math.floor(p.RND.frac()*g.length)]:g;break}u[l].index=m}}};c.exports=a},10095:(c,x,t)=>{/**
5759 * @author       Richard Davey <[email protected]>
5760 * @copyright    2013-2025 Phaser Studio Inc.
5761 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5762 */var o=t(85896),p=t(26099),a=new p,n=function(r,e,s,h){return o(r,0,e,a,s,h),a.x};c.exports=n},85896:(c,x,t)=>{/**
5763 * @author       Richard Davey <[email protected]>
5764 * @copyright    2013-2025 Phaser Studio Inc.
5765 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5766 */var o=t(26099),p=function(a,n,r,e,s,h){r===void 0&&(r=!0),e||(e=new o);var i=h.baseTileWidth,l=h.baseTileHeight,u=h.tilemapLayer;u&&(s||(s=u.scene.cameras.main),a=a-(u.x+s.scrollX*(1-u.scrollFactorX)),n=n-(u.y+s.scrollY*(1-u.scrollFactorY)),i*=u.scaleX,l*=u.scaleY);var d=a/i,f=n/l;return r&&(d=Math.floor(d),f=Math.floor(f)),e.set(d,f)};c.exports=p},63288:(c,x,t)=>{/**
5767 * @author       Richard Davey <[email protected]>
5768 * @copyright    2013-2025 Phaser Studio Inc.
5769 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5770 */var o=t(85896),p=t(26099),a=new p,n=function(r,e,s,h){return o(0,r,e,a,s,h),a.y};c.exports=n},81086:(c,x,t)=>{/**
5771 * @author       Richard Davey <[email protected]>
5772 * @copyright    2013-2025 Phaser Studio Inc.
5773 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5774 */c.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:c=>{/**
5775 * @author       Richard Davey <[email protected]>
5776 * @copyright    2013-2025 Phaser Studio Inc.
5777 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5778 */c.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(c,x,t)=>{/**
5779 * @author       Richard Davey <[email protected]>
5780 * @copyright    2013-2025 Phaser Studio Inc.
5781 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5782 */var o={ORIENTATION:t(91907)};c.exports=o},62501:(c,x,t)=>{/**
5783 * @author       Richard Davey <[email protected]>
5784 * @copyright    2013-2025 Phaser Studio Inc.
5785 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5786 */var o=t(79291),p=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=o(!1,a,p.ORIENTATION),c.exports=a},14977:(c,x,t)=>{/**
5787 * @author       Richard Davey <[email protected]>
5788 * @copyright    2013-2025 Phaser Studio Inc.
5789 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5790 */var o=t(83419),p=t(91907),a=t(95540),n=new o({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",p.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")}});c.exports=n},87010:(c,x,t)=>{/**
5791 * @author       Richard Davey <[email protected]>
5792 * @copyright    2013-2025 Phaser Studio Inc.
5793 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5794 */var o=t(83419),p=t(91907),a=t(95540),n=new o({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",p.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")}});c.exports=n},48700:(c,x,t)=>{/**
5795 * @author       Richard Davey <[email protected]>
5796 * @copyright    2013-2025 Phaser Studio Inc.
5797 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5798 */var o=t(83419),p=t(95540),a=new o({initialize:function(r){r===void 0&&(r={}),this.name=p(r,"name","object layer"),this.id=p(r,"id",0),this.opacity=p(r,"opacity",1),this.properties=p(r,"properties",{}),this.propertyTypes=p(r,"propertytypes",{}),this.type=p(r,"type","objectgroup"),this.visible=p(r,"visible",!0),this.objects=p(r,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});c.exports=a},6641:(c,x,t)=>{/**
5799 * @author       Richard Davey <[email protected]>
5800 * @copyright    2013-2025 Phaser Studio Inc.
5801 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5802 */var o=t(91907),p=function(a){return a=a.toLowerCase(),a==="isometric"?o.ISOMETRIC:a==="staggered"?o.STAGGERED:a==="hexagonal"?o.HEXAGONAL:o.ORTHOGONAL};c.exports=p},46177:(c,x,t)=>{/**
5803 * @author       Richard Davey <[email protected]>
5804 * @copyright    2013-2025 Phaser Studio Inc.
5805 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5806 */var o=t(80341),p=t(2342),a=t(82593),n=t(46594),r=t(87021),e=function(s,h,i,l,u,d){var f;switch(h){case o.ARRAY_2D:f=p(s,i,l,u,d);break;case o.CSV:f=a(s,i,l,u,d);break;case o.TILED_JSON:f=n(s,i,d);break;case o.WELTMEISTER:f=r(s,i,d);break;default:console.warn("Unrecognized tilemap data format: "+h),f=null}return f};c.exports=e},2342:(c,x,t)=>{/**
5807 * @author       Richard Davey <[email protected]>
5808 * @copyright    2013-2025 Phaser Studio Inc.
5809 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5810 */var o=t(80341),p=t(14977),a=t(87010),n=t(23029),r=function(e,s,h,i,l){for(var u=new p({tileWidth:h,tileHeight:i}),d=new a({name:e,tileWidth:h,tileHeight:i,format:o.ARRAY_2D,layers:[u]}),f=[],v=s.length,m=0,y=0;y<s.length;y++){f[y]=[];for(var g=s[y],T=0;T<g.length;T++){var S=parseInt(g[T],10);isNaN(S)||S===-1?f[y][T]=l?null:new n(u,-1,T,y,h,i):f[y][T]=new n(u,S,T,y,h,i)}m===0&&(m=g.length)}return d.width=u.width=m,d.height=u.height=v,d.widthInPixels=u.widthInPixels=m*h,d.heightInPixels=u.heightInPixels=v*i,u.data=f,d};c.exports=r},82593:(c,x,t)=>{/**
5811 * @author       Richard Davey <[email protected]>
5812 * @copyright    2013-2025 Phaser Studio Inc.
5813 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5814 */var o=t(80341),p=t(2342),a=function(n,r,e,s,h){var i=r.trim().split(`
5815`).map(function(u){return u.split(",")}),l=p(n,i,e,s,h);return l.format=o.CSV,l};c.exports=a},6656:(c,x,t)=>{/**
5816 * @author       Richard Davey <[email protected]>
5817 * @copyright    2013-2025 Phaser Studio Inc.
5818 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5819 */var o=t(14977),p=t(23029),a=function(n,r){for(var e=[],s=0;s<n.layer.length;s++){for(var h=n.layer[s],i=new o({name:h.name,width:h.width,height:h.height,tileWidth:h.tilesize,tileHeight:h.tilesize,visible:h.visible===1}),l=[],u=[],d=0;d<h.data.length;d++){for(var f=0;f<h.data[d].length;f++){var v=h.data[d][f]-1,m;v>-1?m=new p(i,v,f,d,h.tilesize,h.tilesize):m=r?null:new p(i,-1,f,d,h.tilesize,h.tilesize),l.push(m)}u.push(l),l=[]}i.data=u,e.push(i)}return e};c.exports=a},96483:(c,x,t)=>{/**
5820 * @author       Richard Davey <[email protected]>
5821 * @copyright    2013-2025 Phaser Studio Inc.
5822 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5823 */var o=t(33629),p=function(a){for(var n=[],r=[],e=0;e<a.layer.length;e++){var s=a.layer[e],h=s.tilesetName;h!==""&&r.indexOf(h)===-1&&(r.push(h),n.push(new o(h,0,s.tilesize,s.tilesize,0,0)))}return n};c.exports=p},87021:(c,x,t)=>{/**
5824 * @author       Richard Davey <[email protected]>
5825 * @copyright    2013-2025 Phaser Studio Inc.
5826 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5827 */var o=t(80341),p=t(87010),a=t(6656),n=t(96483),r=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,l=0,u=0;u<s.layer.length;u++)s.layer[u].width>i&&(i=s.layer[u].width),s.layer[u].height>l&&(l=s.layer[u].height);var d=new p({width:i,height:l,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:o.WELTMEISTER});return d.layers=a(s,h),d.tilesets=n(s),d};c.exports=r},52833:(c,x,t)=>{/**
5828 * @author       Richard Davey <[email protected]>
5829 * @copyright    2013-2025 Phaser Studio Inc.
5830 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5831 */c.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(c,x,t)=>{/**
5832 * @author       Richard Davey <[email protected]>
5833 * @copyright    2013-2025 Phaser Studio Inc.
5834 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5835 */c.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(c,x,t)=>{/**
5836 * @author       Richard Davey <[email protected]>
5837 * @copyright    2013-2025 Phaser Studio Inc.
5838 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5839 */var o=t(79291),p=function(a){for(var n,r,e,s,h,i=0;i<a.layers.length;i++){n=a.layers[i],s=null;for(var l=0;l<n.data.length;l++){h=n.data[l];for(var u=0;u<h.length;u++)r=h[u],!(r===null||r.index<0)&&(e=a.tiles[r.index][2],s=a.tilesets[e],r.width=s.tileWidth,r.height=s.tileHeight,s.tileProperties&&s.tileProperties[r.index-s.firstgid]&&(r.properties=o(r.properties,s.tileProperties[r.index-s.firstgid])))}}};c.exports=p},41868:c=>{/**
5840 * @author       Richard Davey <[email protected]>
5841 * @copyright    2013-2025 Phaser Studio Inc.
5842 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5843 */var x=function(t){for(var o=window.atob(t),p=o.length,a=new Array(p/4),n=0;n<p;
5843n+=4)a[n/4]=(o.charCodeAt(n)|o.charCodeAt(n+1)<<8|o.charCodeAt(n+2)<<16|o.charCodeAt(n+3)<<24)>>>0;return a};c.exports=x},84101:(c,x,t)=>{/**
5844 * @author       Richard Davey <[email protected]>
5845 * @copyright    2013-2025 Phaser Studio Inc.
5846 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5847 */var o=t(33629),p=function(a){var n,r,e=[];for(n=0;n<a.imageCollections.length;n++)for(var s=a.imageCollections[n],h=s.images,i=0;i<h.length;i++){var l=h[i],u={x:0,y:l.height-a.tileHeight};r=new o(l.image,l.gid,l.width,l.height,0,0,void 0,void 0,u),r.updateTileData(l.width,l.height),a.tilesets.push(r)}for(n=0;n<a.tilesets.length;n++){r=a.tilesets[n];for(var d=r.tileMargin,f=r.tileMargin,v=0,m=0,y=0,g=r.firstgid;g<r.firstgid+r.total&&(e[g]=[d,f,n],d+=r.tileWidth+r.tileSpacing,v++,!(v===r.total||(m++,m===r.columns&&(d=r.tileMargin,f+=r.tileHeight+r.tileSpacing,m=0,y++,y===r.rows))));g++);}return e};c.exports=p},79677:(c,x,t)=>{/**
5848 * @author       Seth Berrier <[email protected]>
5849 * @copyright    2013-2025 Phaser Studio Inc.
5850 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5851 */var o=t(95540),p=function(a,n,r){if(!n)return{i:0,layers:a.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=n.x+o(n,"startx",0)*a.tilewidth+o(n,"offsetx",0),s=n.y+o(n,"starty",0)*a.tileheight+o(n,"offsety",0);return{i:0,layers:n.layers,name:r.name+n.name+"/",opacity:r.opacity*n.opacity,visible:r.visible&&n.visible,x:r.x+e,y:r.y+s}};c.exports=p},29920:c=>{/**
5852 * @author       Richard Davey <[email protected]>
5853 * @copyright    2013-2025 Phaser Studio Inc.
5854 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5855 */var x=2147483648,t=1073741824,o=536870912,p=function(a){var n=!!(a&x),r=!!(a&t),e=!!(a&o);a=a&536870911;var s=0,h=!1;return n&&r&&e?(s=Math.PI/2,h=!0):n&&r&&!e?(s=Math.PI,h=!1):n&&!r&&e?(s=Math.PI/2,h=!1):n&&!r&&!e?(s=0,h=!0):!n&&r&&e?(s=3*Math.PI/2,h=!1):!n&&r&&!e?(s=Math.PI,h=!0):!n&&!r&&e?(s=3*Math.PI/2,h=!0):!n&&!r&&!e&&(s=0,h=!1),{gid:a,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:e,rotation:s,flipped:h}};c.exports=p},12635:(c,x,t)=>{/**
5856 * @author       Richard Davey <[email protected]>
5857 * @copyright    2013-2025 Phaser Studio Inc.
5858 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5859 */var o=t(95540),p=t(79677),a=function(n){for(var r=[],e=[],s=p(n);s.i<s.layers.length||e.length>0;){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=p(n,h,s);e.push(s),s=i}continue}var l=o(h,"offsetx",0)+o(h,"startx",0),u=o(h,"offsety",0)+o(h,"starty",0);r.push({name:s.name+h.name,image:h.image,x:s.x+l+h.x,y:s.y+u+h.y,alpha:s.opacity*h.opacity,visible:s.visible&&h.visible,properties:o(h,"properties",{})})}return r};c.exports=a},46594:(c,x,t)=>{/**
5860 * @author       Richard Davey <[email protected]>
5861 * @copyright    2013-2025 Phaser Studio Inc.
5862 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5863 */var o=t(51233),p=t(84101),a=t(91907),n=t(62644),r=t(80341),e=t(6641),s=t(87010),h=t(12635),i=t(22611),l=t(28200),u=t(24619),d=function(f,v,m){var y=n(v),g=new s({width:y.width,height:y.height,name:f,tileWidth:y.tilewidth,tileHeight:y.tileheight,orientation:e(y.orientation),format:r.TILED_JSON,version:y.version,properties:y.properties,renderOrder:y.renderorder,infinite:y.infinite});if(g.orientation===a.HEXAGONAL)if(g.hexSideLength=y.hexsidelength,g.staggerAxis=y.staggeraxis,g.staggerIndex=y.staggerindex,g.staggerAxis==="y"){var T=(g.tileHeight-g.hexSideLength)/2;g.widthInPixels=g.tileWidth*(g.width+.5),g.heightInPixels=g.height*(g.hexSideLength+T)+T}else{var S=(g.tileWidth-g.hexSideLength)/2;g.widthInPixels=g.width*(g.hexSideLength+S)+S,g.heightInPixels=g.tileHeight*(g.height+.5)}g.layers=l(y,m),g.images=h(y);var E=u(y);return g.tilesets=E.tilesets,g.imageCollections=E.imageCollections,g.objects=i(y),g.tiles=p(g),o(g),g};c.exports=d},52205:(c,x,t)=>{/**
5864 * @author       Richard Davey <[email protected]>
5865 * @copyright    2013-2025 Phaser Studio Inc.
5866 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5867 */var o=t(18254),p=t(29920),a=function(e){return{x:e.x,y:e.y}},n=["id","name","type","rotation","properties","visible","x","y","width","height"],r=function(e,s,h){s===void 0&&(s=0),h===void 0&&(h=0);var i=o(e,n);
5867if(i.x+=s,i.y+=h,e.gid){var l=p(e.gid);i.gid=l.gid,i.flippedHorizontal=l.flippedHorizontal,i.flippedVertical=l.flippedVertical,i.flippedAntiDiagonal=l.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};c.exports=r},22611:(c,x,t)=>{/**
5868 * @author       Richard Davey <[email protected]>
5869 * @copyright    2013-2025 Phaser Studio Inc.
5870 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5871 */var o=t(95540),p=t(52205),a=t(48700),n=t(79677),r=function(e){for(var s=[],h=[],i=n(e);i.i<i.layers.length||h.length>0;){if(i.i>=i.layers.length){if(h.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=h.pop();continue}var l=i.layers[i.i];if(i.i++,l.opacity*=i.opacity,l.visible=i.visible&&l.visible,l.type!=="objectgroup"){if(l.type==="group"){var u=n(e,l,i);h.push(i),i=u}continue}l.name=i.name+l.name;for(var d=i.x+o(l,"startx",0)+o(l,"offsetx",0),f=i.y+o(l,"starty",0)+o(l,"offsety",0),v=[],m=0;m<l.objects.length;m++){var y=p(l.objects[m],d,f);v.push(y)}var g=new a(l);g.objects=v,s.push(g)}return s};c.exports=r},28200:(c,x,t)=>{/**
5872 * @author       Richard Davey <[email protected]>
5873 * @copyright    2013-2025 Phaser Studio Inc.
5874 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5875 */var o=t(41868),p=t(91907),a=t(79677),n=t(6641),r=t(95540),e=t(14977),s=t(29920),h=t(23029),i=function(l,u){for(var d=r(l,"infinite",!1),f=[],v=[],m=a(l);m.i<m.layers.length||v.length>0;){if(m.i>=m.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=v.pop();continue}var y=m.layers[m.i];if(m.i++,y.type!=="tilelayer"){if(y.type==="group"){var g=a(l,y,m);v.push(m),m=g}continue}if(y.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+y.name+"'");continue}else if(y.encoding&&y.encoding==="base64"){if(y.chunks)for(var T=0;T<y.chunks.length;T++)y.chunks[T].data=o(y.chunks[T].data);y.data&&(y.data=o(y.data)),delete y.encoding}var S,E,M,F,A,P,L=[],O=0;if(d){var G=r(y,"startx",0)+y.x,z=r(y,"starty",0)+y.y;S=new e({name:m.name+y.name,id:y.id,x:m.x+r(y,"offsetx",0)+G*l.tilewidth,y:m.y+r(y,"offsety",0)+z*l.tileheight,width:y.width,height:y.height,tileWidth:l.tilewidth,tileHeight:l.tileheight,alpha:m.opacity*y.opacity,visible:m.visible&&y.visible,properties:r(y,"properties",[]),orientation:n(l.orientation)}),S.orientation===p.HEXAGONAL&&(S.hexSideLength=l.hexsidelength,S.staggerAxis=l.staggeraxis,S.staggerIndex=l.staggerindex,S.staggerAxis==="y"?(A=(S.tileHeight-S.hexSideLength)/2,S.widthInPixels=S.tileWidth*(S.width+.5),S.heightInPixels=S.height*(S.hexSideLength+A)+A):(P=(S.tileWidth-S.hexSideLength)/2,S.widthInPixels=S.width*(S.hexSideLength+P)+P,S.heightInPixels=S.tileHeight*(S.height+.5)));for(var Y=0;Y<y.height;Y++){L[Y]=[null];for(var X=0;X<y.width;X++)L[Y][X]=null}for(Y=0,k=y.chunks.length;Y<k;Y++)for(var I=y.chunks[Y],U=I.x-G,D=I.y-z,V=0,B=0,W=I.data.length;B<W;B++){var K=O+U,J=V+D;E=s(I.data[B]),E.gid>0?(M=new h(S,E.gid,K,J,l.tilewidth,l.tileheight),M.rotation=E.rotation,M.flipX=E.flipped,L[J][K]=M):(F=u?null:new h(S,-1,K,J,l.tilewidth,l.tileheight),L[J][K]=F),O++,O===I.width&&(V++,O=0)}}else{S=new e({name:m.name+y.name,id:y.id,x:m.x+r(y,"offsetx",0)+y.x,y:m.y+r(y,"offsety",0)+y.y,width:y.width,height:y.height,tileWidth:l.tilewidth,tileHeight:l.tileheight,alpha:m.opacity*y.opacity,visible:m.visible&&y.visible,properties:r(y,"properties",[]),orientation:n(l.orientation)}),S.orientation===p.HEXAGONAL&&(S.hexSideLength=l.hexsidelength,S.staggerAxis=l.staggeraxis,S.staggerIndex=l.staggerindex,S.staggerAxis==="y"?(A=(S.tileHeight-S.hexSideLength)/2,S.widthInPixels=S.tileWidth*(S.width+.5),S.heightInPixels=S.height*(S.hexSideLength+A)+A):(P=(S.tileWidth-S.hexSideLength)/2,S.widthInPixels=S.width*(S.hexSideLength+P)+P,S.heightInPixels=S.tileHeight*(S.height+.5)));for(var Z=[],j=0,k=y.data.length;j<k;j++)E=s(y.data[j]),E.gid>0?(M=new h(S,E.gid,O,L.length,l.tilewidth,l.tileheight),M.rotation=E.rotation,M.flipX=E.flipped,Z.push(M)):(F=u?null:new h(S,-1,O,L.length,l.tilewidth,l.tileheight),Z.push(F)),O++,O===y.width&&(L.push(Z),O=0,Z=[])}S.data=L,f.push(S)}return f};c.exports=i},24619:(c,x,t)=>{/**
5876 * @author       Richard Davey <[email protected]>
5877 * @copyright    2013-2025 Phaser Studio Inc.
5878 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5879 */var o=t(33629),p=t(16536),a=t(52205),n=t(57880),r=function(e){for(var s=[],h=[],i=null,l,u=0;u<e.tilesets.length;u++){var d=e.tilesets[u];if(d.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(d.image){var f=new o(d.name,d.firstgid,d.tilewidth,d.tileheight,d.margin,d.spacing,void 0,void 0,d.tileoffset);if(e.version>1){var v=void 0,m=void 0;if(Array.isArray(d.tiles)){v=v||{},m=m||{};for(var y=0;y<d.tiles.length;y++){var g=d.tiles[y];if(g.properties){var T={};
5879g.properties.forEach(function(Y){T[Y.name]=Y.value}),m[g.id]=T}if(g.objectgroup&&((v[g.id]||(v[g.id]={})).objectgroup=g.objectgroup,g.objectgroup.objects)){var S=g.objectgroup.objects.map(function(Y){return a(Y)});v[g.id].objectgroup.objects=S}g.animation&&((v[g.id]||(v[g.id]={})).animation=g.animation),g.type&&((v[g.id]||(v[g.id]={})).type=g.type)}}Array.isArray(d.wangsets)&&(v=v||{},m=m||{},n(d.wangsets,v)),v&&(f.tileData=v,f.tileProperties=m)}else if(d.tileproperties&&(f.tileProperties=d.tileproperties),d.tiles){f.tileData=d.tiles;for(l in f.tileData){var E=f.tileData[l].objectgroup;if(E&&E.objects){var M=E.objects.map(function(Y){return a(Y)});f.tileData[l].objectgroup.objects=M}}}f.updateTileData(d.imagewidth,d.imageheight),s.push(f)}else{var F=new p(d.name,d.firstgid,d.tilewidth,d.tileheight,d.margin,d.spacing,d.properties),A=0;for(y=0;y<d.tiles.length;y++){g=d.tiles[y];var P=g.image,L=parseInt(g.id,10),O=d.firstgid+L,G=g.imagewidth,z=g.imageheight;F.addImage(O,P,G,z),A=Math.max(L,A)}F.maxId=A,h.push(F)}i&&(i.lastgid=d.firstgid-1),i=d}return{tilesets:s,imageCollections:h}};c.exports=r},57880:c=>{/**
5880 * @author       Richard Davey <[email protected]>
5881 * @copyright    2013-2025 Phaser Studio Inc.
5882 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5883 */var x=function(t,o){for(var p=0;p<t.length;p++){var a=t[p],n=p;if(a.name&&a.name!==""&&(n=a.name),Array.isArray(a.wangtiles)&&a.wangtiles.length>0){var r={},e={},s,h,i;if(Array.isArray(a.edgecolors))for(s=0;s<a.edgecolors.length;s++)i=1+s,h=a.edgecolors[s],h.name!==""&&(r[i]=h.name);if(Array.isArray(a.cornercolors))for(s=0;s<a.cornercolors.length;s++)i=1+s,h=a.cornercolors[s],h.name!==""&&(e[i]=h.name);if(Array.isArray(a.colors))for(s=0;s<a.colors.length;s++)h=a.colors[s],i=1+s,h.name!==""&&(r[i]=e[i]=h.name);for(var l=[r,e,r,e,r,e,r,e],u=0;u<a.wangtiles.length;u++){var d=a.wangtiles[u],f=o[d.tileid]||(o[d.tileid]={});f=f.wangid||(f.wangid={});for(var v=[],m=0;m<Math.min(l.length,d.wangid.length);m++){if(h=d.wangid[m],h===0){v.push(void 0);continue}var y=l[m][h];if(y!==void 0){v.push(y);continue}v.push(h)}f[n]=v}}}};c.exports=x},96761:(c,x,t)=>{/**
5884 * @author       Richard Davey <[email protected]>
5885 * @copyright    2013-2025 Phaser Studio Inc.
5886 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5887 */c.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:(c,x,t)=>{/**
5888 * @author       Richard Davey <[email protected]>
5889 * @copyright    2013-2025 Phaser Studio Inc.
5890 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5891 */var o=t(83419),p=t(37277),a=t(44594),n=t(94880),r=t(72905),e=new o({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;if(s instanceof n){if(h=s,this.removeEvent(h),h.elapsed=h.startAt,h.hasDispatched=!1,h.repeatCount=h.repeat===-1||h.loop?999999999999:h.repeat,h.delay<=0&&h.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay")}else h=new n(s);return this._pendingInsertion.push(h),h},delayedCall:function(s,h,i,l){return this.addEvent({delay:s,callback:h,args:i,callbackScope:l})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var h=0;h<s.length;h++){var i=s[h];
vendor: 4,262 bytes, lines 5891-5895
5891r(this._pendingRemoval,i),r(this._pendingInsertion,i),r(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var s=this._pendingRemoval.length,h=this._pendingInsertion.length;if(!(s===0&&h===0)){var i,l;for(i=0;i<s;i++){l=this._pendingRemoval[i];var u=this._active.indexOf(l);u>-1&&this._active.splice(u,1),l.destroy()}for(i=0;i<h;i++)l=this._pendingInsertion[i],this._active.push(l);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(s,h){if(this.now=s,!this.paused){h*=this.timeScale;for(var i=0;i<this._active.length;i++){var l=this._active[i];if(!l.paused&&(l.elapsed+=h*l.timeScale,l.elapsed>=l.delay)){var u=l.elapsed-l.delay;if(l.elapsed=l.delay,!l.hasDispatched&&l.callback&&(l.hasDispatched=!0,l.callback.apply(l.callbackScope,l.args)),l.repeatCount>0){if(l.repeatCount--,u>=l.delay)for(;u>=l.delay&&l.repeatCount>0;)l.callback&&l.callback.apply(l.callbackScope,l.args),u-=l.delay,l.repeatCount--;l.elapsed=u,l.hasDispatched=!1}else l.hasDispatched&&this._pendingRemoval.push(l)}}}},shutdown:function(){var s;for(s=0;s<this._pendingInsertion.length;s++)this._pendingInsertion[s].destroy();for(s=0;s<this._active.length;s++)this._active[s].destroy();for(s=0;s<this._pendingRemoval.length;s++)this._pendingRemoval[s].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var h=this.systems.events;h.off(a.PRE_UPDATE,this.preUpdate,this),h.off(a.UPDATE,this.update,this),h.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});p.register("Clock",e,"time"),c.exports=e},96120:(c,x,t)=>{/**
5892 * @author       Richard Davey <[email protected]>
5893 * @copyright    2013-2025 Phaser Studio Inc.
5894 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5895 */var o=t(83419),p=t(50792),a=t(39429),n=t(95540),r=t(44594),e=t(89809),s=new o({Extends:p,initialize:function(i,l){p.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var u=this.systems.events;u.on(r.PRE_UPDATE,this.preUpdate,this),u.on(r.UPDATE,this.update,this),u.once(r.SHUTDOWN,this.destroy,this),l&&this.add(l)},preUpdate:function(h,i){this.paused||(this.elapsed+=i*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var h,i=this.events,l=!1,u=this.systems,d;for(h=0;h<i.length;h++){var f=i[h];if(!f.complete&&f.time<=this.elapsed){if(f.complete=!0,this.totalComplete++,d=f.target?f.target:this,f.if&&!f.if.call(d,f))continue;if(f.once&&(l=!0),f.set&&f.target)for(var v in f.set)f.target[v]=f.set[v];this.iteration&&f.repeat++,f.loop&&f.repeat&&f.loop.call(d),f.tween&&(f.tweenInstance=u.tweens.add(f.tween)),f.sound&&(typeof f.sound=="string"?u.sound.play(f.sound):u.sound.play(f.sound.key,f.sound.config)),f.event&&this.emit(f.event,d),f.run&&f.run.call(d),f.stop&&this.stop()}}if(l)for(h=0;h<i.length;h++)i[h].complete&&i[h].once&&(i.splice(h,1),h--);this.totalComplete>=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(){this.paused=!0;for(var h=this.events,i=0;i<h.length;i++){var l=h[i];l.tweenInstance&&(l.tweenInstance.paused=!0)}return this},repeat:function(h){return(h===void 0||h===!0)&&(h=-1),h===!1&&(h=0),this.loop=h,this},resume:function(){this.paused=!1;for(var h=this.events,i=0;i<h.length;i++){var l=h[i];l.tweenInstance&&(l.tweenInstance.paused=!1)}return 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=this.events,l=0;l<i.length;l++){var u=i[l];u.complete=!1,h||(u.repeat=0),u.tweenInstance&&u.tweenInstance.stop()}return this.play(!1)},add:function(h){Array.isArray(h)||(h=[h]);var i=this.events,l=0;i.length>0&&(l=i[i.length-1].time);for(var u=0;u<h.length;u++){var d=h[u],f=n(d,"at",0),v=n(d,"in",null);
5895v!==null&&(f=this.elapsed+v);var m=n(d,"from",null);m!==null&&(f=l+m),i.push({complete:!1,time:f,repeat:0,if:n(d,"if",null),run:n(d,"run",null),loop:n(d,"loop",null),event:n(d,"event",null),target:n(d,"target",null),set:n(d,"set",null),tween:n(d,"tween",null),sound:n(d,"sound",null),once:n(d,"once",!1),stop:n(d,"stop",!1)}),l=f}return this.complete=!1,this},clear:function(){for(var h=this.events,i=0;i<h.length;i++){var l=h[i];l.tweenInstance&&l.tweenInstance.stop()}return h=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){var h=Math.min(this.totalComplete,this.events.length);return h/this.events.length},destroy:function(){var h=this.systems.events;h.off(r.PRE_UPDATE,this.preUpdate,this),h.off(r.UPDATE,this.update,this),h.off(r.SHUTDOWN,this.destroy,this),this.clear(),this.scene=null,this.systems=null}});a.register("timeline",function(h){return new s(this.scene,h)}),c.exports=s},94880:(c,x,t)=>{/**
5896 * @author       Richard Davey <[email protected]>
5897 * @copyright    2013-2025 Phaser Studio Inc.
5898 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5899 */var o=t(83419),p=t(95540),a=new o({initialize:function(r){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(r)},reset:function(n){if(this.delay=p(n,"delay",0),this.repeat=p(n,"repeat",0),this.loop=p(n,"loop",!1),this.callback=p(n,"callback",void 0),this.callbackScope=p(n,"callbackScope",this),this.args=p(n,"args",[]),this.timeScale=p(n,"timeScale",1),this.startAt=p(n,"startAt",0),this.paused=p(n,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay<=0&&this.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var n=this.delay+this.delay*this.repeat,r=this.elapsed+this.delay*(this.repeat-this.repeatCount);return r/n}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(n){n===void 0&&(n=!1),this.elapsed=this.delay,this.hasDispatched=!n,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});c.exports=a},35945:c=>{/**
5900 * @author       Richard Davey <[email protected]>
5901 * @copyright    2013-2025 Phaser Studio Inc.
5902 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5903 */c.exports="complete"},89809:(c,x,t)=>{/**
5904 * @author       Richard Davey <[email protected]>
5905 * @copyright    2013-2025 Phaser Studio Inc.
5906 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5907 */c.exports={COMPLETE:t(35945)}},90291:(c,x,t)=>{/**
5908 * @author       Richard Davey <[email protected]>
5909 * @copyright    2013-2025 Phaser Studio Inc.
5910 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5911 */c.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(c,x,t)=>{/**
5912 * @author       Richard Davey <[email protected]>
5913 * @copyright    2013-2025 Phaser Studio Inc.
5914 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5915 */var o=t(72905),p=t(83419),a=t(43491),n=t(88032),r=t(37277),e=t(44594),s=t(93109),h=t(86081),i=t(8357),l=t(43960),u=t(26012),d=new p({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(f){Array.isArray(f)||(f=[f]);for(var v=[],m=0;m<f.length;m++){var y=f[m];y instanceof h||y instanceof l?v.push(y):Array.isArray(y.tweens)?v.push(u(this,y)):v.push(i(this,y))}return v.length===1?v[0]:v},add:function(f){var v=f,m=this.tweens;return v instanceof h||v instanceof l||(Array.isArray(v.tweens)?v=u(this,v):v=i(this,v)),m.push(v.reset()),v},addMultiple:function(f){for(var v,m=[],y=this.tweens,g=0;g<f.length;g++)v=f[g],v instanceof h||v instanceof l||(Array.isArray(v.tweens)?v=u(this,v):v=i(this,v)),y.push(v.reset()),m.push(v);return m},chain:function(f){var v=u(this,f);return this.tweens.push(v.init()),v},getChainedTweens:function(f){return f.getChainedTweens()},has:function(f){return this.tweens.indexOf(f)>-1},existing:function(f){return this.has(f)||this.tweens.push(f.reset()),this},addCounter:function(f){var v=n(this,f);return this.tweens.push(v.reset()),v},stagger:function(f,v){return s(f,v)},setLagSmooth:function(f,v){return f===void 0&&(f=1/1e-8),v===void 0&&(v=0),this.maxLag=f,this.lagSkip=Math.min(v,this.maxLag),this},setFps:function(f){return f===void 0&&(f=240),this.gap=1e3/f,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(f){var v=Date.now()-this.prevTime;v>this.maxLag&&(this.startTime+=v-this.lagSkip),this.prevTime+=v;var m=this.prevTime-this.startTime,y=m-this.nextTime,g=m-this.time*1e3;return y>0||f?(m/=1e3,this.time=m,this.nextTime+=y+(y>=this.gap?4:this.gap-y)):g=0,g},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(f){f===void 0&&(f=!1);var v=this.getDelta(f);if(!(v<=0)){this.processing=!0;var m,y,g=[],T=this.tweens;for(m=0;m<T.length;m++)y=T[m],y.update(v)&&g.push(y);var S=g.length;if(S&&T.length>0){for(m=0;m<S;m++){y=g[m];var E=T.indexOf(y);E>-1&&(y.isPendingRemove()||y.isDestroyed())&&(T.splice(E,1),y.destroy())}g.length=0}this.processing=!1}},remove:function(f){return this.processing?f.setPendingRemoveState():(o(this.tweens,f),f.setRemovedState()),this},reset:function(f){return this.existing(f),f.seek(),f.setActiveState(),this},makeActive:function(f){return this.existing(f),f.setActiveState(),this},each:function(f,v){var m,y=[null];for(m=1;m<arguments.length;m++)y.push(arguments[m]);return this.tweens.forEach(function(g){y[0]=g,f.apply(v,y)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(f){var v=[],m=this.tweens;Array.isArray(f)?f=a(f):f=[f];for(var y=f.length,g=0;g<m.length;g++)for(var T=m[g],S=0;S<y;S++)!T.isDestroyed()&&T.hasTarget(f[S])&&v.push(T);return v},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(f){return this.timeScale=f,this},isTweening:function(f){for(var v=this.tweens,m,y=0;y<v.length;y++)if(m=v[y],m.isPlaying()&&m.hasTarget(f))return!0;return!1},killAll:function(){for(var f=this.processing?this.getTweens():this.tweens,v=0;v<f.length;v++)f[v].destroy();return this.processing||(f.length=0),this},killTweensOf:function(f){for(var v=this.getTweensOf(f),m=0;m<v.length;m++)v[m].destroy();return this},pauseAll:function(){return this.paused=!0,this},resumeAll:function(){return this.paused=!1,this},shutdown:function(){this.killAll(),this.tweens=[],this.events.off(e.UPDATE,this.update,this),this.events.off(e.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(e.START,this.start,this),this.scene=null,this.events=null}});r.register("TweenManager",d,"tweens"),c.exports=d},57355:c=>{/**
5916 * @author       Richard Davey <[email protected]>
5917 * @copyright    2013-2025 Phaser Studio Inc.
5918 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5919 */var x=function(t,o,p){return t&&t.hasOwnProperty(o)?t[o]:p};c.exports=x},6113:(c,x,t)=>{/**
5920 * @author       Richard Davey <[email protected]>
5921 * @copyright    2013-2025 Phaser Studio Inc.
5922 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5923 */var o=t(62640),p=t(35355),a=function(n,r){var e=o.Power0;if(typeof n=="string")if(o.hasOwnProperty(n))e=o[n];else{var s="";if(n.indexOf(".")){s=n.substring(n.indexOf(".")+1);var h=s.toLowerCase();h==="in"?s="easeIn":h==="out"?s="easeOut":h==="inout"&&(s="easeInOut")}n=p(n.substring(0,n.indexOf(".")+1)+s),o.hasOwnProperty(n)&&(e=o[n])}else typeof n=="function"&&(e=n);if(!r)return e;var i=r.slice(0);return i.unshift(0),function(l){return i[0]=l,e.apply(this,i)}};c.exports=a},91389:(c,x,t)=>{/**
5924 * @author       Richard Davey <[email protected]>
5925 * @copyright    2013-2025 Phaser Studio Inc.
5926 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5927 */var o=t(89318),p=t(77259),a=t(28392),n={bezier:o,catmull:p,catmullrom:p,linear:a},r=function(e){if(e===null)return null;var s=n.linear;return typeof e=="string"?n.hasOwnProperty(e)&&(s=n[e]):typeof e=="function"&&(s=e),s};c.exports=r},55292:c=>{/**
5928 * @author       Richard Davey <[email protected]>
5929 * @copyright    2013-2025 Phaser Studio Inc.
5930 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5931 */var x=function(t,o,p){var a;if(t.hasOwnProperty(o)){var n=typeof t[o];n==="function"?a=function(r,e,s,h,i,l){return t[o](r,e,s,h,i,l)}:a=function(){return t[o]}}else typeof p=="function"?a=p:a=function(){return p};return a};c.exports=x},82985:(c,x,t)=>{/**
5932 * @author       Richard Davey <[email protected]>
5933 * @copyright    2013-2025 Phaser Studio Inc.
5934 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5935 */var o=t(81076),p=function(a){var n,r=[];if(a.hasOwnProperty("props"))for(n in a.props)n.substring(0,1)!=="_"&&r.push({key:n,value:a.props[n]});else for(n in a)o.indexOf(n)===-1&&n.substring(0,1)!=="_"&&r.push({key:n,value:a[n]});return r};c.exports=p},62329:(c,x,t)=>{/**
5936 * @author       Richard Davey <[email protected]>
5937 * @copyright    2013-2025 Phaser Studio Inc.
5938 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5939 */var o=t(35154),p=function(a){var n=o(a,"targets",null);return n===null||(typeof n=="function"&&(n=n.call()),Array.isArray(n)||(n=[n])),n};c.exports=p},17777:(c,x,t)=>{/**
5940 * @author       Richard Davey <[email protected]>
5941 * @copyright    2013-2025 Phaser Studio Inc.
5942 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5943 */var o=t(30976),p=t(99472);function a(h){return!!h.getActive&&typeof h.getActive=="function"}function n(h){return!!h.getStart&&typeof h.getStart=="function"}function r(h){return!!h.getEnd&&typeof h.getEnd=="function"}function e(h){return n(h)||r(h)||a(h)}var s=function(h,i){var l,u=function(Y,X,I){return I},d=function(Y,X,I){return I},f=null,v=typeof i;if(v==="number")u=function(){return i};else if(Array.isArray(i))d=function(){return i[0]},u=function(){return i[i.length-1]};else if(v==="string"){var m=i.toLowerCase(),y=m.substring(0,6)==="random",g=m.substring(0,3)==="int";if(y||g){var T=m.indexOf("("),S=m.indexOf(")"),E=m.indexOf(",");if(T&&S&&E){var M=parseFloat(m.substring(T+1,E)),F=parseFloat(m.substring(E+1,S));y?u=function(){return p(M,F)}
5943:u=function(){return o(M,F)}}else throw new Error("invalid random() format")}else{m=m[0];var A=parseFloat(i.substr(2));switch(m){case"+":u=function(Y,X,I){return I+A};break;case"-":u=function(Y,X,I){return I-A};break;case"*":u=function(Y,X,I){return I*A};break;case"/":u=function(Y,X,I){return I/A};break;default:u=function(){return parseFloat(i)}}}}else if(v==="function")u=i;else if(v==="object")if(e(i))a(i)&&(f=i.getActive),r(i)&&(u=i.getEnd),n(i)&&(d=i.getStart);else if(i.hasOwnProperty("value"))l=s(h,i.value);else{var P=i.hasOwnProperty("to"),L=i.hasOwnProperty("from"),O=i.hasOwnProperty("start");if(P&&(L||O)){if(l=s(h,i.to),O){var G=s(h,i.start);l.getActive=G.getEnd}if(L){var z=s(h,i.from);l.getStart=z.getEnd}}}return l||(l={getActive:f,getEnd:u,getStart:d}),l};c.exports=s},88032:(c,x,t)=>{/**
5944 * @author       Richard Davey <[email protected]>
5945 * @copyright    2013-2025 Phaser Studio Inc.
5946 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5947 */var o=t(70402),p=t(69902),a=t(23568),n=t(57355),r=t(6113),e=t(95540),s=t(55292),h=t(35154),i=t(17777),l=t(269),u=t(86081),d=function(f,v,m){if(v instanceof u)return v.parent=f,v;m===void 0?m=p:m=l(p,m);var y=e(v,"from",0),g=e(v,"to",1),T=[{value:y}],S=e(v,"delay",m.delay),E=e(v,"easeParams",m.easeParams),M=e(v,"ease",m.ease),F=i("value",g),A=new u(f,T),P=A.add(0,"value",F.getEnd,F.getStart,F.getActive,r(e(v,"ease",M),e(v,"easeParams",E)),s(v,"delay",S),e(v,"duration",m.duration),n(v,"yoyo",m.yoyo),e(v,"hold",m.hold),e(v,"repeat",m.repeat),e(v,"repeatDelay",m.repeatDelay),!1,!1);P.start=y,P.current=y,A.completeDelay=a(v,"completeDelay",0),A.loop=Math.round(a(v,"loop",0)),A.loopDelay=Math.round(a(v,"loopDelay",0)),A.paused=n(v,"paused",!1),A.persist=n(v,"persist",!1),A.isNumberTween=!0,A.callbackScope=h(v,"callbackScope",A);for(var L=o.TYPES,O=0;O<L.length;O++){var G=L[O],z=h(v,G,!1);if(z){var Y=h(v,G+"Params",[]);A.setCallback(G,z,Y)}}return A};c.exports=d},93109:(c,x,t)=>{/**
5948 * @author       Richard Davey <[email protected]>
5949 * @copyright    2013-2025 Phaser Studio Inc.
5950 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5951 */var o=t(6113),p=t(35154),a=t(36383),n=function(r,e){e===void 0&&(e={});var s,h=p(e,"start",0),i=p(e,"ease",null),l=p(e,"grid",null),u=p(e,"from",0),d=u==="first",f=u==="center",v=u==="last",m=typeof u=="number",y=Array.isArray(r),g=parseFloat(y?r[0]:r),T=y?parseFloat(r[1]):0,S=Math.max(g,T);if(y&&(h+=g),l){var E=l[0],M=l[1],F=0,A=0,P=0,L=0,O=[];v?(F=E-1,A=M-1):m?(F=u%E,A=Math.floor(u/E)):f&&(F=(E-1)/2,A=(M-1)/2);for(var G=a.MIN_SAFE_INTEGER,z=0;z<M;z++){O[z]=[];for(var Y=0;Y<E;Y++){P=F-Y,L=A-z;var X=Math.sqrt(P*P+L*L);X>G&&(G=X),O[z][Y]=X}}}var I=i?o(i):null;return l?s=function(U,D,V,B){var W=0,K=B%E,J=Math.floor(B/E);K>=0&&K<E&&J>=0&&J<M&&(W=O[J][K]);var Z;if(y){var j=T-g;I?Z=W/G*j*I(W/G):Z=W/G*j}else I?Z=W*g*I(W/G):Z=W*g;return Z+h}:s=function(U,D,V,B,W){W--;var K;d?K=B:f?K=Math.abs(W/2-B):v?K=W-B:m&&(K=Math.abs(u-B));var J;if(y){var Z;f?Z=(T-g)/W*(K*2):Z=(T-g)/W*K,I?J=Z*I(K/W):J=Z}else I?J=W*S*I(K/W):J=K*g;return J+h},s};c.exports=n},8357:(c,x,t)=>{/**
5952 * @author       Richard Davey <[email protected]>
5953 * @copyright    2013-2025 Phaser Studio Inc.
5954 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5955 */var o=t(70402),p=t(69902),a=t(23568),n=t(57355),r=t(6113),e=t(95540),s=t(91389),h=t(55292),i=t(82985),l=t(62329),u=t(35154),d=t(17777),f=t(269),v=t(86081),m=function(y,g,T){if(g instanceof v)return g.parent=y,g;T===void 0?T=p:T=f(p,T);var S=l(g);!S&&T.targets&&(S=T.targets);for(var E=i(g),M=e(g,"delay",T.delay),F=e(g,"duration",T.duration),A=e(g,"easeParams",T.easeParams),P=e(g,"ease",T.ease),L=e(g,"hold",T.hold),O=e(g,"repeat",T.repeat),G=e(g,"repeatDelay",T.repeatDelay),z=n(g,"yoyo",T.yoyo),Y=n(g,"flipX",T.flipX),X=n(g,"flipY",T.flipY),I=e(g,"interpolation",T.interpolation),U=function(q,et,nt,tt){if(nt==="texture"){var ot=tt,ht=void 0;Array.isArray(tt)?(ot=tt[0],ht=tt[1]):tt.hasOwnProperty("value")?(ot=tt.value,Array.isArray(tt.value)?(ot=tt.value[0],ht=tt.value[1]):typeof tt.value=="string"&&(ot=tt.value)):typeof tt=="string"&&(ot=tt),q.addFrame(et,ot,ht,h(tt,"delay",M),e(tt,"duration",F),e(tt,"hold",L),e(tt,"repeat",O),e(tt,"repeatDelay",G),n(tt,"flipX",Y),n(tt,"flipY",X))}else{var lt=d(nt,tt),it=s(e(tt,"interpolation",I));q.add(et,nt,lt.getEnd,lt.getStart,lt.getActive,r(e(tt,"ease",P),e(tt,"easeParams",A)),h(tt,"delay",M),e(tt,"duration",F),n(tt,"yoyo",z),e(tt,"hold",L),e(tt,"repeat",O),e(tt,"repeatDelay",G),n(tt,"flipX",Y),n(tt,"flipY",X),it,it?tt:null)}},D=new v(y,S),V=0;V<E.length;V++)for(var B=E[V].key,W=E[V].value,K=0;K<S.length;K++)B==="scale"&&!S[K].hasOwnProperty("scale")?(U(D,K,"scaleX",W),U(D,K,"scaleY",W)):U(D,K,B,W);D.completeDelay=a(g,"completeDelay",0),D.loop=Math.round(a(g,"loop",0)),D.loopDelay=Math.round(a(g,"loopDelay",0)),D.paused=n(g,"paused",!1),D.persist=n(g,"persist",!1),D.callbackScope=e(g,"callbackScope",D);for(var J=o.TYPES,Z=0;Z<J.length;Z++){var j=J[Z],k=u(g,j,!1);if(k){var _=u(g,j+"Params",[]);D.setCallback(j,k,_)}}return D};c.exports=m},26012:(c,x,t)=>{/**
5956 * @author       Richard Davey <[email protected]>
5957 * @copyright    2013-2025 Phaser Studio Inc.
5958 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5959 */var o=t(70402),p=t(23568),a=t(57355),n=t(62329),r=t(35154),e=t(8357),s=t(43960),h=function(i,l){if(l instanceof s)return l.parent=i,l;var u=new s(i);u.startDelay=r(l,"delay",0),u.completeDelay=p(l,"completeDelay",0),u.loop=Math.round(p(l,"loop",r(l,"repeat",0))),u.loopDelay=Math.round(p(l,"loopDelay",r(l,"repeatDelay",0))),u.paused=a(l,"paused",!1),u.persist=a(l,"persist",!1),u.callbackScope=r(l,"callbackScope",u);var d,f=o.TYPES;for(d=0;d<f.length;d++){var v=f[d],m=r(l,v,!1);
5959if(m){var y=r(l,v+"Params",[]);u.setCallback(v,m,y)}}var g=r(l,"tweens",null);if(Array.isArray(g)){var T=[],S=n(l),E=void 0;for(S&&(E={targets:S}),d=0;d<g.length;d++)T.push(e(u,g[d],E));u.add(T)}return u};c.exports=h},30231:(c,x,t)=>{/**
5960 * @author       Richard Davey <[email protected]>
5961 * @copyright    2013-2025 Phaser Studio Inc.
5962 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5963 */c.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:c=>{/**
5964 * @author       Richard Davey <[email protected]>
5965 * @copyright    2013-2025 Phaser Studio Inc.
5966 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5967 */c.exports="active"},98540:c=>{/**
5968 * @author       Richard Davey <[email protected]>
5969 * @copyright    2013-2025 Phaser Studio Inc.
5970 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5971 */c.exports="complete"},67233:c=>{/**
5972 * @author       Richard Davey <[email protected]>
5973 * @copyright    2013-2025 Phaser Studio Inc.
5974 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5975 */c.exports="loop"},2859:c=>{/**
5976 * @author       Richard Davey <[email protected]>
5977 * @copyright    2013-2025 Phaser Studio Inc.
5978 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5979 */c.exports="pause"},98336:c=>{/**
5980 * @author       Richard Davey <[email protected]>
5981 * @copyright    2013-2025 Phaser Studio Inc.
5982 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5983 */c.exports="repeat"},25764:c=>{/**
5984 * @author       Richard Davey <[email protected]>
5985 * @copyright    2013-2025 Phaser Studio Inc.
5986 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5987 */c.exports="resume"},32193:c=>{/**
5988 * @author       Richard Davey <[email protected]>
5989 * @copyright    2013-2025 Phaser Studio Inc.
5990 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5991 */c.exports="start"},84371:c=>{/**
5992 * @author       samme
5993 * @copyright    2013-2025 Phaser Studio Inc.
5994 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5995 */c.exports="stop"},70766:c=>{/**
5996 * @author       Richard Davey <[email protected]>
5997 * @copyright    2013-2025 Phaser Studio Inc.
5998 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
5999 */c.exports="update"},55659:c=>{/**
6000 * @author       Richard Davey <[email protected]>
6001 * @copyright    2013-2025 Phaser Studio Inc.
6002 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6003 */c.exports="yoyo"},842:(c,x,t)=>{/**
6004 * @author       Richard Davey <[email protected]>
6005 * @copyright    2013-2025 Phaser Studio Inc.
6006 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6007 */c.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:(c,x,t)=>{/**
6008 * @author       Richard Davey <[email protected]>
6009 * @copyright    2013-2025 Phaser Studio Inc.
6010 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6011 */var o={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)};c.exports=o},70402:(c,x,t)=>{/**
6012 * @author       Richard Davey <[email protected]>
6013 * @copyright    2013-2025 Phaser Studio Inc.
6014 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6015 */var o=t(83419),p=t(50792),a=t(842),n=t(86353),r=new o({Extends:p,initialize:function(s){p.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=n.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")}
6015,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=n.PENDING},setActiveState:function(){this.state=n.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=n.LOOP_DELAY},setCompleteDelayState:function(){this.state=n.COMPLETE_DELAY},setStartDelayState:function(){this.state=n.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=n.PENDING_REMOVE},setRemovedState:function(){this.state=n.REMOVED},setFinishedState:function(){this.state=n.FINISHED},setDestroyedState:function(){this.state=n.DESTROYED},isPending:function(){return this.state===n.PENDING},isActive:function(){return this.state===n.ACTIVE},isLoopDelayed:function(){return this.state===n.LOOP_DELAY},isCompleteDelayed:function(){return this.state===n.COMPLETE_DELAY},isStartDelayed:function(){return this.state===n.START_DELAY},isPendingRemove:function(){return this.state===n.PENDING_REMOVE},isRemoved:function(){return this.state===n.REMOVED},isFinished:function(){return this.state===n.FINISHED},isDestroyed:function(){return this.state===n.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()}});r.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],c.exports=r},95042:(c,x,t)=>{/**
6016 * @author       Richard Davey <[email protected]>
6017 * @copyright    2013-2025 Phaser Studio Inc.
6018 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6019 */var o=t(83419),p=t(842),a=t(86353),n=new o({initialize:function(e,s,h,i,l,u,d,f,v,m){this.tween=e,this.targetIndex=s,this.duration=i<=0?.01:i,this.totalDuration=0,this.delay=0,this.getDelay=h,this.yoyo=l,this.hold=u,this.repeat=d,this.repeatDelay=f,this.repeatCounter=0,this.flipX=v,this.flipY=m,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(r){r===void 0&&(r=this.current),this.tween.targets[this.targetIndex][this.key]=r},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(r){this.yoyo?this.onRepeat(r,!0,!0):this.repeatCounter>0?this.onRepeat(r,!0,!1):this.setCompleteState()},setStateFromStart:function(r){this.repeatCounter>0?this.onRepeat(r,!1):this.setCompleteState()},reset:function(){var r=this.tween,e=r.totalTargets,s=this.targetIndex,h=r.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(h,i,0,s,e,r),this.repeatCounter=this.repeat===-1?a.MAX:this.repeat,this.setPendingRenderState();var l=this.duration+this.hold;this.yoyo&&(l+=this.duration);var u=l+this.repeatDelay;this.totalDuration=this.delay+l,this.repeat===-1?(this.totalDuration+=u*a.MAX,r.isInfinite=!0):this.repeat>0&&(this.totalDuration+=u*this.repeat),this.totalDuration>r.duration&&(r.duration=this.totalDuration),this.delay<r.startDelay&&(r.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(r,e,s){var h=this.tween,i=h.totalTargets,l=this.targetIndex,u=h.targets[l],d=this.key,f=d!=="texture";if(this.elapsed=r,this.progress=r/this.duration,this.flipX&&u.toggleFlipX(),this.flipY&&u.toggleFlipY(),f&&(e||s)&&(this.start=this.getStartValue(u,d,this.start,l,i,h)),s){this.setPlayingBackwardState(),this.dispatchEvent(p.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,f&&(this.end=this.getEndValue(u,d,this.start,l,i,h)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-r,f&&(this.current=this.start,u[d]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(p.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});c.exports=n},69902:c=>{/**
6020 * @author       Richard Davey <[email protected]>
6021 * @copyright    2013-2025 Phaser Studio Inc.
6022 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6023 */var x={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};c.exports=x},81076:c=>{/**
6024 * @author       Richard Davey <[email protected]>
6025 * @copyright    2013-2025 Phaser Studio Inc.
6026 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6027 */c.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:(c,x,t)=>{/**
6028 * @author       Richard Davey <[email protected]>
6029 * @copyright    2013-2025 Phaser Studio Inc.
6030 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6031 */var o=t(70402),p=t(83419),a=t(842),n=t(44603),r=t(39429),e=t(36383),s=t(86353),h=t(48177),i=t(42220),l=new p({Extends:o,initialize:function(d,f){o.call(this,d),this.targets=f,this.totalTargets=f.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.isNumberTween=!1},add:function(u,d,f,v,m,y,g,T,S,E,M,F,A,P,L,O){var G=new h(this,u,d,f,v,m,y,g,T,S,E,M,F,A,P,L,O);return this.totalData=this.data.push(G),G},addFrame:function(u,d,f,v,m,y,g,T,S,E){var M=new i(this,u,d,f,v,m,y,g,T,S,E);return this.totalData=this.data.push(M),M},getValue:function(u){u===void 0&&(u=0);var d=null;return this.data&&(d=this.data[u].current),d},hasTarget:function(u){return this.targets&&this.targets.indexOf(u)!==-1},updateTo:function(u,d,f){if(f===void 0&&(f=!1),u!=="texture")for(var v=0;v<this.totalData;v++){var m=this.data[v];m.key===u&&(m.isPlayingForward()||m.isPlayingBackward())&&(m.end=d,f&&(m.start=m.current))}return this},restart:function(){switch(this.state){case s.REMOVED:case s.FINISHED:this.seek(),this.parent.makeActive(this);break;
6031case s.PENDING:case s.PENDING_REMOVE:this.parent.reset(this);break;case s.DESTROYED:console.warn("Cannot restart destroyed Tween",this);break;default:this.seek();break}return this.paused=!1,this.hasStarted=!1,this},nextState:function(){if(this.loopCounter>0)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,o.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(u,d,f){if(u===void 0&&(u=0),d===void 0&&(d=16.6),f===void 0&&(f=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;f||(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,u>0){for(var m=Math.floor(u/d),y=u-m*d,g=0;g<m;g++)this.update(d);y>0&&this.update(y)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(u){u===void 0&&(u=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var d=this.data,f=0;f<this.totalData;f++)d[f].reset(u);this.duration=Math.max(this.duration,.01);var v=this.duration,m=this.completeDelay,y=this.loopCounter,g=this.loopDelay;y>0?this.totalDuration=v+m+(v+g)*y:this.totalDuration=v+m},reset:function(u){return u===void 0&&(u=!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),u||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive")),this},update:function(u){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.paused||this.isFinished())return!1;if(u*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(u),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(u),!1;this.hasStarted||(this.startDelay-=u,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(a.TWEEN_START,"onStart"),u=0));var d=!1;if(this.isActive())for(var f=this.data,v=0;v<this.totalData;v++)f[v].update(u)&&(d=!0);this.elapsed+=u,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=u,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),d||this.nextState();var m=this.isPendingRemove();return m&&this.persist&&(this.setFinishedState(),m=!1),m},forward:function(u){return this.update(u),this},rewind:function(u){return this.update(-u),this},dispatchEvent:function(u,d){if(!this.isSeeking){if(this.emit(u,this,this.targets),!this.callbacks)return;var f=this.callbacks[d];f&&f.func.apply(this.callbackScope,[this,this.targets].concat(f.params))}},destroy:function(){o.prototype.destroy.call(this),this.targets=null}});r.register("tween",function(u){return this.scene.sys.tweens.add(u)}),n.register("tween",function(u){return this.scene.sys.tweens.create(u)}),c.exports=l},43960:(c,x,t)=>{/**
6032 * @author       Richard Davey <[email protected]>
6033 * @copyright    2013-2025 Phaser Studio Inc.
6034 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6035 */var o=t(72905),p=t(70402),a=t(83419),n=t(842),r=t(44603),e=t(39429),s=t(86353),h=new a({Extends:p,initialize:function(l){p.call(this,l),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?s.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(i){var l=this.parent.create(i);Array.isArray(l)||(l=[l]);for(var u=this.data,d=0;d<l.length;d++){var f=l[d];f.parent=this,u.push(f.reset())}return this.totalData=u.length,this},remove:function(i){return o(this.data,i),i.setRemovedState(),i===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(i){for(var l=this.data,u=0;u<this.totalData;u++)if(l[u].hasTarget(i))return!0;return!1},restart:function(){return this.isDestroyed()?(console.warn("Cannot restart destroyed TweenChain",this),this):(this.isRemoved()&&this.parent.makeActive(this),this.resetTweens(),this.paused=!1,this.init())},reset:function(i){return i.seek(),i.setActiveState(),this},makeActive:function(i){return i.reset(),i.setActiveState(),this},nextState:function(){if(this.loopCounter>0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(n.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,l=this.totalData,u=0;u<l;u++)i[u].reset(!1);this.setCurrentTween(0)},update:function(i){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.isFinished()||this.paused)return!1;if(i*=this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(i),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(i),!1;this.hasStarted||(this.startDelay-=i,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(n.TWEEN_START,"onStart"),i=0));var l=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(i)&&this.nextTween()&&this.nextState(),l=this.isPendingRemove(),l&&this.persist&&(this.setFinishedState(),l=!1)),l},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData?!0:(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(i){this.currentIndex=i,this.currentTween=this.data[i],this.currentTween.setActiveState()}
vendor: 5,856 bytes, lines 6035-6051
6035,dispatchEvent:function(i,l){this.emit(i,this);var u=this.callbacks[l];u&&u.func.apply(this.callbackScope,[this].concat(u.params))},destroy:function(){p.prototype.destroy.call(this),this.currentTween=null}});e.register("tweenchain",function(i){return this.scene.sys.tweens.chain(i)}),r.register("tweenchain",function(i){return this.scene.sys.tweens.create(i)}),c.exports=h},48177:(c,x,t)=>{/**
6036 * @author       Richard Davey <[email protected]>
6037 * @copyright    2013-2025 Phaser Studio Inc.
6038 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6039 */var o=t(95042),p=t(45319),a=t(83419),n=t(842),r=new a({Extends:o,initialize:function(s,h,i,l,u,d,f,v,m,y,g,T,S,E,M,F,A){o.call(this,s,h,v,m,y,g,T,S,E,M),this.key=i,this.getActiveValue=d,this.getEndValue=l,this.getStartValue=u,this.ease=f,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=F,this.interpolationData=A},reset:function(e){o.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,l=s.targets[i],u=this.key;if(!l)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(n.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(l,u,l[u],i,h,s),this.end=this.getEndValue(l,u,this.start,i,h,s),this.current=this.start,l[u]=this.start,this.setPlayingForwardState(),!0;var d=this.isPlayingForward(),f=this.isPlayingBackward();if(d||f){var v=this.elapsed,m=this.duration,y=0,g=!1;v+=e,v>=m?(y=v-m,v=m,g=!0):v<0&&(v=0);var T=p(v/m,0,1);this.elapsed=v,this.progress=T,this.previous=this.current,d||(T=1-T);var S=this.ease(T);this.interpolation?this.current=this.interpolation(this.interpolationData,S):this.current=this.start+(this.end-this.start)*S,l[u]=this.current,g&&(d?(s.isNumberTween&&(this.current=this.end,l[u]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(y)):(s.isNumberTween&&(this.current=this.start,l[u]=this.current),this.setStateFromStart(y))),this.dispatchEvent(n.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var h=this.tween;if(!h.isSeeking){var i=h.targets[this.targetIndex],l=this.key,u=this.current,d=this.previous;h.emit(e,h,l,i,u,d);var f=h.callbacks[s];f&&f.func.apply(h.callbackScope,[h,i,l,u,d].concat(f.params))}},destroy:function(){o.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});c.exports=r},42220:(c,x,t)=>{/**
6040 * @author       Richard Davey <[email protected]>
6041 * @copyright    2013-2025 Phaser Studio Inc.
6042 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6043 */var o=t(95042),p=t(45319),a=t(83419),n=t(842),r=new a({Extends:o,initialize:function(s,h,i,l,u,d,f,v,m,y,g){o.call(this,s,h,u,d,!1,f,v,m,y,g),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=l,this.yoyo=v!==0},reset:function(e){o.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(n.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var l=this.isPlayingForward(),u=this.isPlayingBackward();if(l||u){var d=this.elapsed,f=this.duration,v=0,m=!1;d+=e,d>=f?(v=d-f,d=f,m=!0):d<0&&(d=0);var y=p(d/f,0,1);this.elapsed=d,this.progress=y,m&&(l?(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(n.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var h=this.tween;if(!h.isSeeking){var i=h.targets[this.targetIndex],l=this.key;h.emit(e,h,l,i);var u=h.callbacks[s];u&&u.func.apply(h.callbackScope,[h,i,l].concat(u.params))}},destroy:function(){o.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});c.exports=r},86353:c=>{/**
6044 * @author       Richard Davey <[email protected]>
6045 * @copyright    2013-2025 Phaser Studio Inc.
6046 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6047 */var x={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};c.exports=x},83419:c=>{/**
6048 * @author       Richard Davey <[email protected]>
6049 * @copyright    2013-2025 Phaser Studio Inc.
6050 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6051 */function x(r){return!!r.get&&typeof r.get=="function"||!!r.set&&typeof r.set=="function"}function t(r,e,s){var h=s?r[e]:Object.getOwnPropertyDescriptor(r,e);return!s&&h.value&&typeof h.value=="object"&&(h=h.value),h&&x(h)?(typeof h.enumerable>"u"&&(h.enumerable=!0),typeof h.configurable>"u"&&(h.configurable=!0),h):!1}function o(r,e){var s=Object.getOwnPropertyDescriptor(r,e);
6051return s?(s.value&&typeof s.value=="object"&&(s=s.value),s.configurable===!1):!1}function p(r,e,s,h){for(var i in e)if(e.hasOwnProperty(i)){var l=t(e,i,s);if(l!==!1){var u=h||r;if(o(u.prototype,i)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(r.prototype,i,l)}else r.prototype[i]=e[i]}}function a(r,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s<e.length;s++)p(r,e[s].prototype||e[s])}}function n(r){r||(r={});var e,s;if(r.initialize){if(typeof r.initialize!="function")throw new Error("initialize must be a function");e=r.initialize,delete r.initialize}else if(r.Extends){var h=r.Extends;e=function(){h.apply(this,arguments)}}else e=function(){};r.Extends?(e.prototype=Object.create(r.Extends.prototype),e.prototype.constructor=e,s=r.Extends,delete r.Extends):e.prototype.constructor=e;var i=null;return r.Mixins&&(i=r.Mixins,delete r.Mixins),a(e,i),p(e,r,!0,s),e}n.extend=p,n.mixin=a,n.ignoreFinals=!1,c.exports=n},29747:c=>{/**
6052 * @author       Richard Davey <[email protected]>
6053 * @copyright    2013-2025 Phaser Studio Inc.
6054 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6055 */var x=function(){};c.exports=x},20242:c=>{/**
6056 * @author       Richard Davey <[email protected]>
6057 * @copyright    2013-2025 Phaser Studio Inc.
6058 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6059 */var x=function(){return null};c.exports=x},71146:c=>{/**
6060 * @author       Richard Davey <[email protected]>
6061 * @copyright    2013-2025 Phaser Studio Inc.
6062 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6063 */var x=function(t,o,p,a,n){if(n===void 0&&(n=t),p>0){var r=p-t.length;if(r<=0)return null}if(!Array.isArray(o))return t.indexOf(o)===-1?(t.push(o),a&&a.call(n,o),o):null;for(var e=o.length-1;e>=0;)t.indexOf(o[e])!==-1&&o.splice(e,1),e--;if(e=o.length,e===0)return null;p>0&&e>r&&(o.splice(r),e=r);for(var s=0;s<e;s++){var h=o[s];t.push(h),a&&a.call(n,h)}return o};c.exports=x},51067:c=>{/**
6064 * @author       Richard Davey <[email protected]>
6065 * @copyright    2013-2025 Phaser Studio Inc.
6066 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6067 */var x=function(t,o,p,a,n,r){if(p===void 0&&(p=0),r===void 0&&(r=t),a>0){var e=a-t.length;if(e<=0)return null}if(!Array.isArray(o))return t.indexOf(o)===-1?(t.splice(p,0,o),n&&n.call(r,o),o):null;for(var s=o.length-1;s>=0;)t.indexOf(o[s])!==-1&&o.pop(),s--;if(s=o.length,s===0)return null;a>0&&s>e&&(o.splice(e),s=e);for(var h=s-1;h>=0;h--){var i=o[h];t.splice(p,0,i),n&&n.call(r,i)}return o};c.exports=x},66905:c=>{/**
6068 * @author       Richard Davey <[email protected]>
6069 * @copyright    2013-2025 Phaser Studio Inc.
6070 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6071 */var x=function(t,o){var p=t.indexOf(o);return p!==-1&&p<t.length&&(t.splice(p,1),t.push(o)),o};c.exports=x},21612:(c,x,t)=>{/**
6072 * @author       Richard Davey <[email protected]>
6073 * @copyright    2013-2025 Phaser Studio Inc.
6074 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6075 */var o=t(82011),p=function(a,n,r,e,s){e===void 0&&(e=0),s===void 0&&(s=a.length);var h=0;if(o(a,e,s))for(var i=e;i<s;i++){var l=a[i];l[n]===r&&h++}return h};c.exports=p},95428:c=>{/**
6076 * @author       Richard Davey <[email protected]>
6077 * @copyright    2013-2025 Phaser Studio Inc.
6078 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6079 */var x=function(t,o,p){var a,n=[null];for(a=3;a<arguments.length;a++)n.push(arguments[a]);for(a=0;a<t.length;a++)n[0]=t[a],o.apply(p,n);return t};c.exports=x},36914:(c,x,t)=>{/**
6080 * @author       Richard Davey <[email protected]>
6081 * @copyright    2013-2025 Phaser Studio Inc.
6082 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6083 */var o=t(82011),p=function(a,n,r,e,s){if(e===void 0&&(e=0),s===void 0&&(s=a.length),o(a,e,s)){var h,i=[null];for(h=5;h<arguments.length;h++)i.push(arguments[h]);for(h=e;h<s;h++)i[0]=a[h],n.apply(r,i)}return a};c.exports=p},81957:c=>{/**
6084 * @author       Richard Davey <[email protected]>
6085 * @copyright    2013-2025 Phaser Studio Inc.
6086 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6087 */var x=function(t,o,p){if(o.length){if(o.length===1)return o[0]}else return NaN;var a=1,n,r;if(p){if(t<o[0][p])return o[0];for(;o[a][p]<t;)a++}else for(;o[a]<t;)a++;return a>o.length&&(a=o.length),p?(n=o[a-1][p],r=o[a][p],r-t<=t-n?o[a]:o[a-1]):(n=o[a-1],r=o[a],r-t<=t-n?r:n)};c.exports=x},43491:c=>{/**
6088 * @author       Richard Davey <[email protected]>
6089 * @copyright    2013-2025 Phaser Studio Inc.
6090 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6091 */var x=function(t,o){o===void 0&&(o=[]);for(var p=0;p<t.length;p++)Array.isArray(t[p])?x(t[p],o):o.push(t[p]);return o};c.exports=x},46710:(c,x,t)=>{/**
6092 * @author       Richard Davey <[email protected]>
6093 * @copyright    2013-2025 Phaser Studio Inc.
6094 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6095 */var o=t(82011),p=function(a,n,r,e,s){e===void 0&&(e=0),s===void 0&&(s=a.length);var h=[];if(o(a,e,s))for(var i=e;i<s;i++){var l=a[i];(!n||n&&r===void 0&&l.hasOwnProperty(n)||n&&r!==void 0&&l[n]===r)&&h.push(l)}return h};c.exports=p},58731:(c,x,t)=>{/**
6096 * @author       Richard Davey <[email protected]>
6097 * @copyright    2013-2025 Phaser Studio Inc.
6098 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6099 */var o=t(82011),p=function(a,n,r,e,s){if(e===void 0&&(e=0),s===void 0&&(s=a.length),e!==-1){if(o(a,e,s))for(var h=e;h<s;h++){var i=a[h];if(!n||n&&r===void 0&&i.hasOwnProperty(n)||n&&r!==void 0&&i[n]===r)return i}}else if(o(a,0,s))for(var h=s;h>=0;h--){var i=a[h];if(!n||n&&r===void 0&&i.hasOwnProperty(n)||n&&r!==void 0&&i[n]===r)return i}return null};c.exports=p},26546:c=>{/**
6100 * @author       Richard Davey <[email protected]>
6101 * @copyright    2013-2025 Phaser Studio Inc.
6102 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6103 */var x=function(t,o,p){o===void 0&&(o=0),p===void 0&&(p=t.length);var a=o+Math.floor(Math.random()*p);return t[a]===void 0?null:t[a]};c.exports=x},85835:c=>{/**
6104 * @author       Richard Davey <[email protected]>
6105 * @copyright    2013-2025 Phaser Studio Inc.
6106 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6107 */var x=function(t,o,p){if(o===p)return t;var a=t.indexOf(o),n=t.indexOf(p);if(a<0||n<0)throw new Error("Supplied items must be elements of the same array");return a>n||(t.splice(a,1),n=t.indexOf(p),t.splice(n+1,0,o)),t};c.exports=x},83371:c=>{/**
6108 * @author       Richard Davey <[email protected]>
6109 * @copyright    2013-2025 Phaser Studio Inc.
6110 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6111 */var x=function(t,o,p){if(o===p)return t;var a=t.indexOf(o),n=t.indexOf(p);if(a<0||n<0)throw new Error("Supplied items must be elements of the same array");return a<n||(t.splice(a,1),n===0?t.unshift(o):t.splice(n,0,o)),t};c.exports=x},70864:c=>{/**
6112 * @author       Richard Davey <[email protected]>
6113 * @copyright    2013-2025 Phaser Studio Inc.
6114 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6115 */var x=function(t,o){var p=t.indexOf(o);if(p>0){var a=t[p-1],n=t.indexOf(a);t[p]=a,t[n]=o}return t};c.exports=x},69693:c=>{/**
6116 * @author       Richard Davey <[email protected]>
6117 * @copyright    2013-2025 Phaser Studio Inc.
6118 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6119 */var x=function(t,o,p){var a=t.indexOf(o);if(a===-1||p<0||p>=t.length)throw new Error("Supplied index out of bounds");return a!==p&&(t.splice(a,1),t.splice(p,0,o)),o};c.exports=x},40853:c=>{/**
6120 * @author       Richard Davey <[email protected]>
6121 * @copyright    2013-2025 Phaser Studio Inc.
6122 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6123 */var x=function(t,o){var p=t.indexOf(o);if(p!==-1&&p<t.length-1){var a=t[p+1],n=t.indexOf(a);t[p]=a,t[n]=o}return t};c.exports=x},20283:c=>{/**
6124 * @author       Richard Davey <[email protected]>
6125 * @copyright    2013-2025 Phaser Studio Inc.
6126 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6127 */var x=function(t,o,p,a){var n=[],r,e=!1;if((p||a)&&(e=!0,p||(p=""),a||(a="")),o<t)for(r=t;r>=o;r--)e?n.push(p+r.toString()+a):n.push(r);else for(r=t;r<=o;r++)e?n.push(p+r.toString()+a):n.push(r);return n};c.exports=x},593:(c,x,t)=>{/**
6128 * @author       Richard Davey <[email protected]>
6129 * @copyright    2013-2025 Phaser Studio Inc.
6130 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6131 */var o=t(2284),p=function(a,n,r){a===void 0&&(a=0),n===void 0&&(n=null),r===void 0&&(r=1),n===null&&(n=a,a=0);for(var e=[],s=Math.max(o((n-a)/(r||1)),0),h=0;h<s;
6131h++)e.push(a),a+=r;return e};c.exports=p},43886:c=>{/**
6132 * @author       Richard Davey <[email protected]>
6133 * @copyright    2013-2025 Phaser Studio Inc.
6134 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6135 */function x(p,a,n){var r=p[a];p[a]=p[n],p[n]=r}function t(p,a){return p<a?-1:p>a?1:0}var o=function(p,a,n,r,e){for(n===void 0&&(n=0),r===void 0&&(r=p.length-1),e===void 0&&(e=t);r>n;){if(r-n>600){var s=r-n+1,h=a-n+1,i=Math.log(s),l=.5*Math.exp(2*i/3),u=.5*Math.sqrt(i*l*(s-l)/s)*(h-s/2<0?-1:1),d=Math.max(n,Math.floor(a-h*l/s+u)),f=Math.min(r,Math.floor(a+(s-h)*l/s+u));o(p,a,d,f,e)}var v=p[a],m=n,y=r;for(x(p,n,a),e(p[r],v)>0&&x(p,n,r);m<y;){for(x(p,m,y),m++,y--;e(p[m],v)<0;)m++;for(;e(p[y],v)>0;)y--}e(p[n],v)===0?x(p,n,y):(y++,x(p,y,r)),y<=a&&(n=y+1),a<=y&&(r=y-1)}};c.exports=o},88492:(c,x,t)=>{/**
6136 * @author       Richard Davey <[email protected]>
6137 * @copyright    2013-2025 Phaser Studio Inc.
6138 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6139 */var o=t(35154),p=t(33680),a=function(r,e,s){for(var h=[],i=0;i<r.length;i++)for(var l=0;l<e.length;l++)for(var u=0;u<s;u++)h.push({a:r[i],b:e[l]});return h},n=function(r,e,s){var h=o(s,"max",0),i=o(s,"qty",1),l=o(s,"random",!1),u=o(s,"randomB",!1),d=o(s,"repeat",0),f=o(s,"yoyo",!1),v=[];if(u&&p(e),d===-1)if(h===0)d=0;else{var m=r.length*e.length*i;f&&(m*=2),d=Math.ceil(h/m)}for(var y=0;y<=d;y++){var g=a(r,e,i);l&&p(g),v=v.concat(g),f&&(g.reverse(),v=v.concat(g))}return h&&v.splice(h),v};c.exports=n},72905:(c,x,t)=>{/**
6140 * @author       Richard Davey <[email protected]>
6141 * @copyright    2013-2025 Phaser Studio Inc.
6142 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6143 */var o=t(19133),p=function(a,n,r,e){e===void 0&&(e=a);var s;if(!Array.isArray(n))return s=a.indexOf(n),s!==-1?(o(a,s),r&&r.call(e,n),n):null;for(var h=n.length-1,i=[];h>=0;){var l=n[h];s=a.indexOf(l),s!==-1&&(o(a,s),i.push(l),r&&r.call(e,l)),h--}return i};c.exports=p},60248:(c,x,t)=>{/**
6144 * @author       Richard Davey <[email protected]>
6145 * @copyright    2013-2025 Phaser Studio Inc.
6146 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6147 */var o=t(19133),p=function(a,n,r,e){if(e===void 0&&(e=a),n<0||n>a.length-1)throw new Error("Index out of bounds");var s=o(a,n);return r&&r.call(e,s),s};c.exports=p},81409:(c,x,t)=>{/**
6148 * @author       Richard Davey <[email protected]>
6149 * @copyright    2013-2025 Phaser Studio Inc.
6150 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6151 */var o=t(82011),p=function(a,n,r,e,s){if(n===void 0&&(n=0),r===void 0&&(r=a.length),s===void 0&&(s=a),o(a,n,r)){var h=r-n,i=a.splice(n,h);if(e)for(var l=0;l<i.length;l++){var u=i[l];e.call(s,u)}return i}else return[]};c.exports=p},31856:(c,x,t)=>{/**
6152 * @author       Richard Davey <[email protected]>
6153 * @copyright    2013-2025 Phaser Studio Inc.
6154 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6155 */var o=t(19133),p=function(a,n,r){n===void 0&&(n=0),r===void 0&&(r=a.length);var e=n+Math.floor(Math.random()*r);return o(a,e)};c.exports=p},42169:c=>{/**
6156 * @author       Richard Davey <[email protected]>
6157 * @copyright    2013-2025 Phaser Studio Inc.
6158 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6159 */var x=function(t,o,p){var a=t.indexOf(o),n=t.indexOf(p);return a!==-1&&n===-1?(t[a]=p,!0):!1};c.exports=x},86003:c=>{/**
6160 * @author       Richard Davey <[email protected]>
6161 * @copyright    2013-2025 Phaser Studio Inc.
6162 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6163 */var x=function(t,o){o===void 0&&(o=1);for(var p=null,a=0;a<o;a++)p=t.shift(),t.push(p);return p};c.exports=x},49498:c=>{/**
6164 * @author       Richard Davey <[email protected]>
6165 * @copyright    2013-2025 Phaser Studio Inc.
6166 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6167 */var x=function(t,o){o===void 0&&(o=1);for(var p=null,a=0;a<o;a++)p=t.pop(),t.unshift(p);return p};c.exports=x},82011:c=>{/**
6168 * @author       Richard Davey <[email protected]>
6169 * @copyright    2013-2025 Phaser Studio Inc.
6170 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6171 */var x=function(t,o,p,a){var n=t.length;if(o<0||o>=n||o>=p||p>n){if(a)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};c.exports=x},89545:c=>{/**
6172 * @author       Richard Davey <[email protected]>
6173 * @copyright    2013-2025 Phaser Studio Inc.
6174 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6175 */var x=function(t,o){var p=t.indexOf(o);return p!==-1&&p>0&&(t.splice(p,1),t.unshift(o)),o};c.exports=x},17810:(c,x,t)=>{/**
6176 * @author       Richard Davey <[email protected]>
6177 * @copyright    2013-2025 Phaser Studio Inc.
6178 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6179 */var o=t(82011),p=function(a,n,r,e,s){if(e===void 0&&(e=0),s===void 0&&(s=a.length),o(a,e,s))for(var h=e;h<s;h++){var i=a[h];i.hasOwnProperty(n)&&(i[n]=r)}return a};c.exports=p},33680:c=>{/**
6180 * @author       Richard Davey <[email protected]>
6181 * @copyright    2013-2025 Phaser Studio Inc.
6182 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6183 */var x=function(t){for(var o=t.length-1;o>0;o--){var p=Math.floor(Math.random()*(o+1)),a=t[o];t[o]=t[p],t[p]=a}return t};c.exports=x},90126:c=>{/**
6184 * @author       Richard Davey <[email protected]>
6185 * @copyright    2013-2025 Phaser Studio Inc.
6186 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6187 */var x=function(t){var o=/\D/g;return t.sort(function(p,a){return parseInt(p.replace(o,""),10)-parseInt(a.replace(o,""),10)}),t};c.exports=x},19133:c=>{/**
6188 * @author       Richard Davey <[email protected]>
6189 * @copyright    2013-2025 Phaser Studio Inc.
6190 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6191 */var x=function(t,o){if(!(o>=t.length)){for(var p=t.length-1,a=t[o],n=o;n<p;n++)t[n]=t[n+1];return t.length=p,a}};c.exports=x},19186:(c,x,t)=>{/**
6192 * @author       Richard Davey <[email protected]>
6193 * @author       Angry Bytes (and contributors)
6194 * @copyright    2013-2025 Phaser Studio Inc.
6195 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6196 */var o=t(82264);function p(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),l=1;l<h;l*=2){n(e,s,l,i);var u=e;e=i,i=u}return e}function n(e,s,h,i){var l=e.length,u=0,d=h*2,f,v,m,y,g;for(f=0;f<l;f+=d)for(v=f+h,m=v+h,v>l&&(v=l),m>l&&(m=l),y=f,g=v;;)if(y<v&&g<m)s(e[y],e[g])<=0?i[u++]=e[y++]:i[u++]=e[g++];else if(y<v)i[u++]=e[y++];else if(g<m)i[u++]=e[g++];else break}var r=function(e,s){if(s===void 0&&(s=p),!e||e.length<2)return e;if(o.features.stableSort)return e.sort(s);var h=a(e,s);return h!==e&&n(h,null,e.length,e),e};c.exports=r},25630:c=>{/**
6197 * @author       Richard Davey <[email protected]>
6198 * @copyright    2013-2025 Phaser Studio Inc.
6199 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6200 */var x=function(t,o,p){if(o===p)return t;var a=t.indexOf(o),n=t.indexOf(p);if(a<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[a]=p,t[n]=o,t};c.exports=x},37105:(c,x,t)=>{/**
6201 * @author       Richard Davey <[email protected]>
6202 * @copyright    2013-2025 Phaser Studio Inc.
6203 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6204 */c.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
6204(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}},86922:c=>{/**
6205 * @author       Richard Davey <[email protected]>
6206 * @copyright    2013-2025 Phaser Studio Inc.
6207 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6208 */var x=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var o=t[0].length,p=1;p<t.length;p++)if(t[p].length!==o)return!1;return!0};c.exports=x},63362:(c,x,t)=>{/**
6209 * @author       Richard Davey <[email protected]>
6210 * @copyright    2013-2025 Phaser Studio Inc.
6211 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6212 */var o=t(41836),p=t(86922),a=function(n){var r="";if(!p(n))return r;for(var e=0;e<n.length;e++){for(var s=0;s<n[e].length;s++){var h=n[e][s].toString();h!=="undefined"?r+=o(h,2):r+="?",s<n[e].length-1&&(r+=" |")}if(e<n.length-1){r+=`
6213`;for(var i=0;i<n[e].length;i++)r+="---",i<n[e].length-1&&(r+="+");r+=`
6214`}}return r};c.exports=a},92598:c=>{/**
6215 * @author       Richard Davey <[email protected]>
6216 * @copyright    2013-2025 Phaser Studio Inc.
6217 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6218 */var x=function(t){return t.reverse()};c.exports=x},21224:c=>{/**
6219 * @author       Richard Davey <[email protected]>
6220 * @copyright    2013-2025 Phaser Studio Inc.
6221 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6222 */var x=function(t){for(var o=0;o<t.length;o++)t[o].reverse();return t};c.exports=x},98717:(c,x,t)=>{/**
6223 * @author       Richard Davey <[email protected]>
6224 * @copyright    2013-2025 Phaser Studio Inc.
6225 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6226 */var o=t(37829),p=function(a){return o(a,180)};c.exports=p},44657:(c,x,t)=>{/**
6227 * @author       Richard Davey <[email protected]>
6228 * @copyright    2013-2025 Phaser Studio Inc.
6229 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6230 */var o=t(37829),p=function(a,n){n===void 0&&(n=1);for(var r=0;r<n;r++)a=o(a,90);return a};c.exports=p},37829:(c,x,t)=>{/**
6231 * @author       Richard Davey <[email protected]>
6232 * @copyright    2013-2025 Phaser Studio Inc.
6233 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6234 */var o=t(86922),p=t(2429),a=function(n,r){if(r===void 0&&(r=90),!o(n))return null;if(typeof r!="string"&&(r=(r%360+360)%360),r===90||r===-270||r==="rotateLeft")n=p(n),n.reverse();else if(r===-90||r===270||r==="rotateRight")n.reverse(),n=p(n);else if(Math.abs(r)===180||r==="rotate180"){for(var e=0;e<n.length;e++)n[e].reverse();n.reverse()}return n};c.exports=a},92632:(c,x,t)=>{/**
6235 * @author       Richard Davey <[email protected]>
6236 * @copyright    2013-2025 Phaser Studio Inc.
6237 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6238 */var o=t(37829),p=function(a,n){n===void 0&&(n=1);for(var r=0;r<n;r++)a=o(a,-90);return a};c.exports=p},69512:(c,x,t)=>{/**
6239 * @author       Richard Davey <[email protected]>
6240 * @copyright    2013-2025 Phaser Studio Inc.
6241 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6242 */var o=t(86003),p=t(49498),a=function(n,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),e!==0&&(e<0?o(n,Math.abs(e)):p(n,e)),r!==0)for(var s=0;s<n.length;s++){var h=n[s];r<0?o(h,Math.abs(r)):p(h,r)}return n};c.exports=a},2429:c=>{/**
6243 * @author       Richard Davey <[email protected]>
6244 * @copyright    2013-2025 Phaser Studio Inc.
6245 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6246 */var x=function(t){for(var o=t.length,p=t[0].length,a=new Array(p),n=0;n<p;n++){a[n]=new Array(o);for(var r=o-1;r>-1;r--)a[n][r]=t[r][n]}return a};c.exports=x},54915:(c,x,t)=>{/**
6247 * @author       Richard Davey <[email protected]>
6248 * @copyright    2013-2025 Phaser Studio Inc.
6249 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6250 */c.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:c=>{/**
6251 * @author       Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
6252 * @author       Richard Davey <[email protected]>
6253 * @copyright    2013-2025 Phaser Studio Inc.
6254 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6255 */var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
6255+/",t=function(o,p){for(var a=new Uint8Array(o),n=a.length,r=p?"data:"+p+";base64,":"",e=0;e<n;e+=3)r+=x[a[e]>>2],r+=x[(a[e]&3)<<4|a[e+1]>>4],r+=x[(a[e+1]&15)<<2|a[e+2]>>6],r+=x[a[e+2]&63];return n%3===2?r=r.substring(0,r.length-1)+"=":n%3===1&&(r=r.substring(0,r.length-2)+"=="),r};c.exports=t},53134:c=>{/**
6256 * @author       Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
6257 * @author       Richard Davey <[email protected]>
6258 * @copyright    2013-2025 Phaser Studio Inc.
6259 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6260 */for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),o=0;o<x.length;o++)t[x.charCodeAt(o)]=o;var p=function(a){a=a.substr(a.indexOf(",")+1);var n=a.length,r=n*.75,e=0,s,h,i,l;a[n-1]==="="&&(r--,a[n-2]==="="&&r--);for(var u=new ArrayBuffer(r),d=new Uint8Array(u),f=0;f<n;f+=4)s=t[a.charCodeAt(f)],h=t[a.charCodeAt(f+1)],i=t[a.charCodeAt(f+2)],l=t[a.charCodeAt(f+3)],d[e++]=s<<2|h>>4,d[e++]=(h&15)<<4|i>>2,d[e++]=(i&3)<<6|l&63;return u};c.exports=p},65839:(c,x,t)=>{/**
6261 * @author       Richard Davey <[email protected]>
6262 * @copyright    2013-2025 Phaser Studio Inc.
6263 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6264 */c.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(c,x,t)=>{/**
6265 * @author       Richard Davey <[email protected]>
6266 * @copyright    2013-2025 Phaser Studio Inc.
6267 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6268 */c.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:c=>{/**
6269 * @author       Richard Davey <[email protected]>
6270 * @copyright    2013-2025 Phaser Studio Inc.
6271 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6272 */var x=function(t){var o={};for(var p in t)Array.isArray(t[p])?o[p]=t[p].slice(0):o[p]=t[p];return o};c.exports=x},62644:c=>{/**
6273 * @author       Richard Davey <[email protected]>
6274 * @copyright    2013-2025 Phaser Studio Inc.
6275 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6276 */var x=function(t){var o,p,a;if(typeof t!="object"||t===null)return t;o=Array.isArray(t)?[]:{};for(a in t)p=t[a],o[a]=x(p);return o};c.exports=x},79291:(c,x,t)=>{/**
6277 * @author       Richard Davey <[email protected]>
6278 * @copyright    2013-2025 Phaser Studio Inc.
6279 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6280 */var o=t(41212),p=function(){var a,n,r,e,s,h,i=arguments[0]||{},l=1,u=arguments.length,d=!1;for(typeof i=="boolean"&&(d=i,i=arguments[1]||{},l=2),u===l&&(i=this,--l);l<u;l++)if((a=arguments[l])!=null)for(n in a)r=i[n],e=a[n],i!==e&&(d&&e&&(o(e)||(s=Array.isArray(e)))?(s?(s=!1,h=r&&Array.isArray(r)?r:[]):h=r&&o(r)?r:{},i[n]=p(d,h,e)):e!==void 0&&(i[n]=e));return i};c.exports=p},23568:(c,x,t)=>{/**
6281 * @author       Richard Davey <[email protected]>
6282 * @copyright    2013-2025 Phaser Studio Inc.
6283 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6284 */var o=t(75508),p=t(35154),a=function(n,r,e){var s=p(n,r,null);if(s===null)return e;if(Array.isArray(s))return o.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return o.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return o.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(r);return s};c.exports=a},95540:c=>{/**
6285 * @author       Richard Davey <[email protected]>
6286 * @copyright    2013-2025 Phaser Studio Inc.
6287 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6288 */var x=function(t,o,p){var a=typeof t;return!t||a==="number"||a==="string"?p:t.hasOwnProperty(o)&&t[o]!==void 0?t[o]:p};c.exports=x},82840:(c,x,t)=>{/**
6289 * @author       Richard Davey <[email protected]>
6290 * @copyright    2013-2025 Phaser Studio Inc.
6291 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6292 */var o=t(35154),p=t(45319),a=function(n,r,e,s,h){h===void 0&&(h=e);var i=o(n,r,h);return p(i,e,s)};c.exports=a},35154:c=>{/**
6293 * @author       Richard Davey <[email protected]>
6294 * @copyright    2013-2025 Phaser Studio Inc.
6295 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6296 */var x=function(t,o,p,a){if(!t&&!a||typeof t=="number")return p;if(t&&t.hasOwnProperty(o))return t[o];if(a&&a.hasOwnProperty(o))return a[o];if(o.indexOf(".")!==-1){for(var n=o.split("."),r=t,e=a,s=p,h=p,i=!0,l=!0,u=0;u<n.length;u++)r&&r.hasOwnProperty(n[u])?(s=r[n[u]],r=r[n[u]]):i=!1,e&&e.hasOwnProperty(n[u])?(h=e[n[u]],e=e[n[u]]):l=!1;return i?s:l?h:p}else return p};c.exports=x},69036:c=>{/**
6297 * @author       Richard Davey <[email protected]>
6298 * @copyright    2013-2025 Phaser Studio Inc.
6299 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6300 */var x=function(t,o){for(var p=0;p<o.length;p++)if(!t.hasOwnProperty(o[p]))return!1;return!0};c.exports=x},1985:c=>{/**
6301 * @author       Richard Davey <[email protected]>
6302 * @copyright    2013-2025 Phaser Studio Inc.
6303 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6304 */var x=function(t,o){for(var p=0;p<o.length;p++)if(t.hasOwnProperty(o[p]))return!0;return!1};c.exports=x},97022:c=>{/**
6305 * @author       Richard Davey <[email protected]>
6306 * @copyright    2013-2025 Phaser Studio Inc.
6307 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6308 */var x=function(t,o){return t.hasOwnProperty(o)};c.exports=x},41212:c=>{/**
6309 * @author       Richard Davey <[email protected]>
6310 * @copyright    2013-2025 Phaser Studio Inc.
6311 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6312 */var x=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};c.exports=x},46975:(c,x,t)=>{/**
6313 * @author       Richard Davey <[email protected]>
6314 * @copyright    2013-2025 Phaser Studio Inc.
6315 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6316 */var o=t(41786),p=function(a,n){var r=o(a);for(var e in n)r.hasOwnProperty(e)||(r[e]=n[e]);return r};c.exports=p},269:(c,x,t)=>{/**
6317 * @author       Richard Davey <[email protected]>
6318 * @copyright    2013-2025 Phaser Studio Inc.
6319 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6320 */var o=t(41786),p=function(a,n){var r=o(a);for(var e in n)r.hasOwnProperty(e)&&(r[e]=n[e]);return r};c.exports=p},18254:(c,x,t)=>{/**
6321 * @author       Richard Davey <[email protected]>
6322 * @copyright    2013-2025 Phaser Studio Inc.
6323 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6324 */var o=t(97022),p=function(a,n){for(var r={},e=0;e<n.length;e++){var s=n[e];o(a,s)&&(r[s]=a[s])}return r};c.exports=p},61622:c=>{/**
6325 * @author       Richard Davey <[email protected]>
6326 * @copyright    2013-2025 Phaser Studio Inc.
6327 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6328 */var x=function(t,o,p){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(o))return t[o]=p,!0;if(o.indexOf(".")!==-1){for(var a=o.split("."),n=t,r=t,e=0;e<a.length;e++)if(n.hasOwnProperty(a[e]))r=n,n=n[a[e]];else return!1;return r[a[a.length-1]]=p,!0}return!1};c.exports=x},1183:(c,x,t)=>{/**
6329 * @author       Richard Davey <[email protected]>
6330 * @copyright    2013-2025 Phaser Studio Inc.
6331 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6332 */c.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:c=>{/**
6333 * @author       Richard Davey <[email protected]>
6334 * @copyright    2013-2025 Phaser Studio Inc.
6335 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6336 */var x=function(t,o){return t.replace(/%([0-9]+)/g,function(p,a){return o[Number(a)-1]})};c.exports=x},41836:c=>{/**
6337 * @author       Richard Davey <[email protected]>
6338 * @copyright    2013-2025 Phaser Studio Inc.
6339 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6340 */var x=function(t,o,p,a){o===void 0&&(o=0),p===void 0&&(p=" "),a===void 0&&(a=3),t=t.toString();var n=0;if(o+1>=t.length)switch(a){case 1:t=new Array(o+1-t.length).join(p)+t;break;case 3:var r=Math.ceil((n=o-t.length)/2),e=n-r;t=new Array(e+1).join(p)+t+new Array(r+1).join(p);break;default:t=t+new Array(o+1-t.length).join(p);break}return t};c.exports=x},33628:c=>{/**
6341 * @author       Richard Davey <[email protected]>
6342 * @copyright    2013-2025 Phaser Studio Inc.
6343 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6344 */var x=function(t,o){return o===0?t.slice(1):t.slice(0,o)+t.slice(o+1)};c.exports=x},27671:c=>{/**
6345 * @author       Richard Davey <[email protected]>
6346 * @copyright    2013-2025 Phaser Studio Inc.
6347 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6348 */var x=function(t){return t.split("").reverse().join("")};c.exports=x},45650:c=>{/**
6349 * @author       Richard Davey <[email protected]>
6350 * @copyright    2013-2025 Phaser Studio Inc.
6351 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6352 */var x=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var o=Math.random()*16|0,p=t==="x"?o:o&3|8;return p.toString(16)})};c.exports=x},35355:c=>{/**
6353 * @author       Richard Davey <[email protected]>
6354 * @copyright    2013-2025 Phaser Studio Inc.
6355 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6356 */var x=function(t){return t&&t[0].toUpperCase()+t.slice(1)};c.exports=x},31749:(c,x,t)=>{/**
6357 * @author       Richard Davey <[email protected]>
6358 * @copyright    2013-2025 Phaser Studio Inc.
6359 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
6360 */c.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},w={};function R(c){var x=w[c];if(x!==void 0)return x.exports;var t=w[c]={exports:{}};return C[c](t,t.exports,R),t.exports}R.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}
6360}();var b=R(85454);return b})())})(On);var Zn=On.exports;const st=Jn(Zn),Ws=""+new URL("hurt-XHwOIxyF.png",import.meta.url).href,Hs=""+new URL("idle-CEw5VQMc.png",import.meta.url).href,Ks=""+new URL("jump-tXQaSiU5.png",import.meta.url).href,Js=""+new URL("run-B70rytj1.png",import.meta.url).href,Zs=""+new URL("spin-CpPSIXli.png",import.meta.url).href;class Qn extends st.Scene{constructor(){super("boot")}preload(){const N=(C,w)=>this.load.image(C,new URL(Object.assign({"../assets/sprites/boar/hurt.png":Ws,"../assets/sprites/boar/idle.png":Hs,"../assets/sprites/boar/jump.png":Ks,"../assets/sprites/boar/run.png":Js,"../assets/sprites/boar/spin.png":Zs})[`../assets/sprites/boar/${w}`],import.meta.url).href);N("boar_idle","idle.png"),N("boar_run","run.png"),N("boar_jump","jump.png"),N("boar_spin","spin.png"),N("boar_hurt","hurt.png")}create(){const N=new URLSearchParams(location.search),C=N.get("level"),w=N.get("organ");this.scene.start(C==="4"?w?"level4":"bodymap":C==="3pipe"?"level3pipe":C==="3"||C==="3boss"?"level3":C==="2"?"level2":"menu",C==="3boss"?{toBoss:!0}:C==="4"&&w?{organ:w}:void 0)}}const Dn={name:"爆炸辣椒",hp:80,attacks:{aimed1:{pattern:"aimed",params:{count:1,speed:340},telegraph:500,recover:650},aimed3:{pattern:"aimed",params:{count:3,speed:360,spread:14},telegraph:550,recover:650},fan5:{pattern:"fan",params:{count:5,speed:300,arc:55},telegraph:500,recover:600},ring16:{pattern:"ring",params:{count:16,speed:260},telegraph:700,recover:800},spiral:{pattern:"ring",params:{count:9,speed:250,rotate:14},telegraph:550,recover:700,repeat:9,interval:120},wall:{pattern:"wall",params:{count:9,speed:240,gap:4},telegraph:700,recover:800},laserHold:{pattern:"laser",params:{mode:0,count:1,duration:3e3},telegraph:200,recover:3400},laserMove:{pattern:"laser",params:{mode:2,count:3,spacing:300,speed:160,dir:-1},telegraph:200,recover:1500},laserSpin:{pattern:"laser",params:{mode:1,speed:45,duration:4e3},telegraph:200,recover:4300}},phases:[{hpAbove:.75,attacks:["aimed1","fan5"]},{hpAbove:.5,attacks:["aimed3","ring16","wall"]},{hpAbove:.25,attacks:["laserHold","spiral","aimed3"]},{hpAbove:0,attacks:["laserMove","laserSpin","aimed3","wall"]}]},xi={name:"飞翼辣椒",hp:80,movement:"fly",attacks:{seedrain6:{pattern:"seedrain",params:{count:6,speed:250,arc:75},telegraph:600,recover:700},feathers4:{pattern:"feathers",params:{count:4,speed:330,spread:12},telegraph:550,recover:600,repeat:2,interval:400},seedspiral:{pattern:"ring",params:{count:8,speed:210,rotate:16},telegraph:600,recover:450,repeat:10,interval:120},cross3:{pattern:"crossfire",params:{count:3,speed:280,span:100},telegraph:650,recover:750},seedrain9:{pattern:"seedrain",params:{count:9,speed:270,arc:100},telegraph:600,recover:700,repeat:2,interval:550},aimed3:{pattern:"aimed",params:{count:3,speed:290,spread:12},telegraph:550,recover:600,repeat:2,interval:500}},phases:[{hpAbove:.5,attacks:["seedrain6","feathers4","seedspiral"]},{hpAbove:0,attacks:["cross3","seedrain9","aimed3","seedspiral"]}]},Ue=Math.PI/180;function Ce($,N,C,w,R){$.spawn(N,C,Math.cos(w)*R,Math.sin(w)*R)}const jn={aimed($,N){const C=N.count??1,w=N.speed??320,R=(N.spread??0)*Ue,b=Math.atan2($.ty-$.oy,$.tx-$.ox);for(let c=0;c<C;c++)Ce($,$.ox,$.oy,b+(c-(C-1)/2)*R,w)},fan($,N){const C=N.count??5,w=N.speed??300,R=(N.arc??50)*Ue,b=Math.atan2($.ty-$.oy,$.tx-$.ox);for(let c=0;c<C;c++){const x=C===1?.5:c/(C-1);Ce($,$.ox,$.oy,b-R/2+x*R,w)}},ring($,N){const C=N.count??16,w=N.speed??260,R=((N.offset??0)+$.wave*(N.rotate??0))*Ue;for(let b=0;b<C;b++)Ce($,$.cx,$.cy,R+b/C*Math.PI*2,w)},wall($,N){const C=N.count??9,w=N.speed??230,R=Math.round(N.gap??Math.floor(C/2)),b=N.dir??-1,c=110,x=630;for(let t=0;t<C;t++){if(t===R)continue;const o=c+t/(C-1)*(x-c);$.spawn($.ox,o,b*w,0)}},laser($,N){$.laser(N.mode??0,N)},seedrain($,N){const C=N.count??6,w=N.speed??320,R=(N.arc??70)*Ue,b=Math.PI/2;for(let c=0;c<C;c++){const x=C===1?.5:c/(C-1);Ce($,$.ox,$.oy,b-R/2+x*R,w)}},feathers($,N){const C=N.count??4,w=N.speed??460,R=(N.spread??8)*Ue,b=Math.atan2($.ty-$.oy,$.tx-$.ox);for(let c=0;c<C;c++)Ce($,$.ox,$.oy,b+(c-(C-1)/2)*R,w)},crossfire($,N){const C=N.count??3,w=N.speed??340,R=N.span??90;for(let b=0;b<C;b++){const c=$.cy-40+(C===1?40:b*80/(C-1)),x=$.cx-R,t=$.cx+R;Ce($,x,c,Math.atan2($.ty-c,$.tx-x),w),Ce($,t,c,Math.atan2($.ty-c,$.tx-t),w)}}},$n=200;class yi extends st.Physics.Arcade.Sprite{constructor(C,w,R,b,c,x,t,o){super(C,w,R,b);H(this,"hp");H(this,"state","idle");H(this,"phaseIdx",0);H(this,"attackIdx",0);H(this,"currentAttack","—");H(this,"baseY");H(this,"stateAt",0);H(this,"waveFired",0);H(this,"idleMs",600);H(this,"targetX",-1);H(this,"warn");H(this,"bulb");H(this,"bulbTween");H(this,"flashUntil",-1);this.cfg=c,this.player=x,this.enemyPool=t,this.lasers=o,this.baseY=R,this.hp=c.hp,
6360C.add.existing(this),C.physics.add.existing(this);const p=this.body;p.setAllowGravity(!1),p.setImmovable(!0),p.setSize(this.width*.72,this.height*.72),this.setDepth(5),this.warn=C.add.text(w,R-this.height/2-26,"!",{fontSize:"52px",color:"#ff3355",fontStyle:"bold",fontFamily:"monospace"}).setOrigin(.5).setDepth(6).setVisible(!1),this.bulb=C.add.image(w+40,R-168,"bulb_glow").setDepth(6).setAlpha(.25)}startFight(C=600){this.idleMs=C,this.state="idle",this.stateAt=this.scene.time.now}update(C,w){if(this.state==="dead")return;const R=this.hp/this.cfg.hp;if(this.cfg.movement==="fly"){(this.targetX<0||Math.abs(this.x-this.targetX)<8)&&(this.targetX=st.Math.Between(220,1060));const c=this.targetX-this.x;this.x+=Math.sign(c)*Math.min($n*w/1e3,Math.abs(c)),this.y=this.baseY+Math.sin(C/600)*40}else{let c=16,x=700;R<=.25?(c=9,x=1e3):R<=.5&&(c=22,x=540),this.y=this.baseY+Math.sin(C/x)*c}this.warn.setPosition(this.x,this.y-this.height/2-24),this.bulb.setPosition(this.x+40,this.y-168),C>this.flashUntil&&(R<=.25?this.setTint(12174540):R<=.5?this.setTint(16757664):this.clearTint());const b=C-this.stateAt;if(this.state==="idle")b>=this.idleMs&&this.beginTelegraph(C);else if(this.state==="telegraph"){const c=this.currentAttackDef();c&&b>=c.telegraph&&this.fire(c,C)}else if(this.state==="firing"){const c=this.currentAttackDef();if(c){const x=c.repeat??1,t=c.interval??0;for(;this.waveFired<x&&b>=this.waveFired*t;)this.fireWave(c,this.waveFired),this.waveFired++;this.waveFired>=x&&b>=(x-1)*t+c.recover&&(this.attackIdx++,this.beginTelegraph(C))}}}hit(C){if(this.state==="dead"||this.state==="idle")return;this.hp-=C,this.setTintFill(16777215),this.flashUntil=this.scene.time.now+50,this.scene.tweens.add({targets:this,x:this.x+st.Math.Between(-5,5),duration:38,yoyo:!0,repeat:2});for(let b=0;b<3;b++){const c=this.scene.add.image(this.x+st.Math.Between(-90,40),this.y-st.Math.Between(-120,60),"particle").setDepth(7).setTint(9309981).setScale(.9);this.scene.tweens.add({targets:c,y:c.y-20-Math.random()*20,alpha:0,duration:300,onComplete:()=>c.destroy()})}const w=this.hp/this.cfg.hp;let R=0;for(;R<this.cfg.phases.length-1&&w<=this.cfg.phases[R].hpAbove;)R++;R!==this.phaseIdx&&(this.phaseIdx=R,this.attackIdx=0,this.scene.cameras.main.shake(140,.005),this.setTintFill(16724821),this.flashUntil=this.scene.time.now+160,this.emit("phase",R+1)),this.hp<=0&&this.die()}skipAttack(){this.state!=="dead"&&(this.stopBulb(),this.warn.setVisible(!1),this.flashUntil=-1,this.attackIdx++,this.beginTelegraph(this.scene.time.now))}reset(){this.stopBulb(),this.hp=this.cfg.hp,this.phaseIdx=0,this.attackIdx=0,this.currentAttack="—",this.waveFired=0,this.flashUntil=-1,this.setScale(1).setAngle(0).setAlpha(1).clearTint(),this.warn.setVisible(!1),this.bulb.setAlpha(.25),this.startFight()}beginTelegraph(C){if(this.state==="dead")return;const w=this.currentAttackDef();w&&(this.state="telegraph",this.stateAt=C,this.currentAttack=w.name,this.warn.setVisible(!0),this.setTintFill(16746649),this.flashUntil=C+w.telegraph*.5,this.bulb.setAlpha(.4).setScale(1),this.bulbTween=this.scene.tweens.add({targets:this.bulb,alpha:1,scale:1.9,duration:w.telegraph,ease:"Quad.in"}))}fire(C,w){this.state!=="dead"&&(this.state="firing",this.stateAt=w,this.waveFired=0,this.warn.setVisible(!1),this.stopBulb())}fireWave(C,w){this.state!=="dead"&&jn[C.pattern]({ox:this.x-this.width*.42,oy:this.y-this.height*.08,cx:this.x,cy:this.y,tx:this.player.x,ty:this.player.y,wave:w,spawn:(R,b,c,x)=>{this.enemyPool.spawn(R,b,c,x)},laser:(R,b)=>this.lasers.fire(R,b)},C.params)}stopBulb(){var C;(C=this.bulbTween)==null||C.stop(),this.bulbTween=void 0,this.bulb.setAlpha(.25).setScale(1)}die(){this.state="dead",this.stopBulb(),this.enemyPool.clear(),this.warn.setVisible(!1),this.bulb.setVisible(!1),this.body.enable=!1,this.scene.cameras.main.shake(320,.009);const C=this.scene;for(let R=0;R<22;R++){const b=R/22*Math.PI*2+Math.random()*.3,c=C.add.image(this.x,this.y,"particle").setDepth(8).setTint(R%2?16746496:16768307),x=90+Math.random()*110;C.tweens.add({targets:c,x:this.x+Math.cos(b)*x,y:this.y+Math.sin(b)*x,alpha:0,scale:.2,duration:500+Math.random()*350,ease:"Cubic.out",onComplete:()=>c.destroy()})}const w=C.add.rectangle(640,360,1280,720,16746496,.35).setDepth(7);C.tweens.add({targets:w,alpha:0,duration:420,onComplete:()=>w.destroy()}),this.scene.tweens.add({targets:this,scaleX:0,scaleY:0,angle:30,duration:720,ease:"Back.in",onComplete:()=>
6360this.emit("cleared")})}saveState(){return{hp:this.hp,phaseIdx:this.phaseIdx,attackIdx:this.attackIdx,state:this.state,stateElapsed:this.scene.time.now-this.stateAt,waveFired:this.waveFired,currentAttack:this.currentAttack,x:this.x,targetX:this.targetX,idleMs:this.idleMs}}loadState(C){if(this.hp=C.hp,this.phaseIdx=C.phaseIdx,this.attackIdx=C.attackIdx,this.state=C.state,this.waveFired=C.waveFired,this.currentAttack=C.currentAttack,this.stateAt=this.scene.time.now-C.stateElapsed,this.x=C.x??this.x,this.targetX=C.targetX??-1,this.idleMs=C.idleMs??600,this.flashUntil=-1,this.stopBulb(),this.setScale(1).setAngle(0).setAlpha(1).clearTint().setVisible(C.state!=="dead"),this.body.enable=C.state!=="dead",this.warn.setVisible(C.state==="telegraph"),this.bulb.setVisible(C.state!=="dead"),C.state==="telegraph"){const w=this.currentAttackDef();if(w){const R=Math.max(0,w.telegraph-C.stateElapsed),b=st.Math.Clamp(C.stateElapsed/w.telegraph,0,1);this.bulb.setAlpha(.4+.6*b).setScale(1+.9*b),this.bulbTween=this.scene.tweens.add({targets:this.bulb,alpha:1,scale:1.9,duration:R,ease:"Quad.in"})}}}dispose(){this.stopBulb(),this.warn.destroy(),this.bulb.destroy(),this.destroy()}currentAttackDef(){const C=this.cfg.phases[this.phaseIdx],w=C.attacks[this.attackIdx%C.attacks.length],R=this.cfg.attacks[w];return R?{...R,name:w}:null}}const ks=2400,kn=320,qn=2e3,_n=-660,tr=-620,qs=-150,er=1e3,ir=100,sr=120,nr=220,_s=760,rr=92,ar=64,or=2/3,hr=24,Ti=24;class bn extends st.Physics.Arcade.Sprite{constructor(C,w,R,b){super(C,w,R,"boar_idle");H(this,"god",!1);H(this,"alive",!0);H(this,"facing",1);H(this,"jumpsLeft",0);H(this,"lastGrounded",-1e9);H(this,"bufferedUntil",-1e9);H(this,"lastShot",-1e9);H(this,"jumping",!1);H(this,"wasGrounded",!0);H(this,"spinTween");H(this,"baseOriginY",0);H(this,"fitScale",1);H(this,"sizeMul",1);this.keys=b,C.add.existing(this),C.physics.add.existing(this);const c=this.body;c.setCollideWorldBounds(!0),c.setMaxVelocity(kn,1400),c.setDragX(qn),this.setDepth(10),this.fitFrame()}update(C,w,R,b="auto"){var s;if(!this.alive)return;const c=this.body;c.setGravityY(c.velocity.y>0?er:0);const{left:x,right:t,jump:o,shoot:p,cursors:a}=this.keys,n=o.isDown||a.up.isDown,r=c.blocked.down||c.touching.down;r&&!this.wasGrounded&&this.emit("land",this.x,this.y+Ti/2),this.wasGrounded=r,r&&(this.lastGrounded=C,this.jumpsLeft=1,this.jumping=!1);let e=!1;if(x.isDown||a.left.isDown?(c.setAccelerationX(-ks),this.facing=-1,e=!0):t.isDown||a.right.isDown?(c.setAccelerationX(ks),this.facing=1,e=!0):c.setAccelerationX(0),(st.Input.Keyboard.JustDown(o)||st.Input.Keyboard.JustDown(a.up))&&(this.bufferedUntil=C+sr),C<this.bufferedUntil&&(C-this.lastGrounded<ir?(this.startJump(_n),this.bufferedUntil=-1e9,this.lastGrounded=-1e9):this.jumpsLeft>0&&(this.jumpsLeft--,this.swap("boar_spin"),this.startJump(tr),this.bufferedUntil=-1e9,(s=this.spinTween)==null||s.stop(),this.setAngle(0),this.spinTween=this.scene.tweens.add({targets:this,angle:360*this.facing,duration:420,ease:"Cubic.out",onComplete:()=>this.setAngle(0)}),this.emit("djump"))),this.jumping&&!n&&(this.jumping=!1,c.velocity.y<qs&&c.setVelocityY(qs)),this.jumping&&c.velocity.y>=0&&(this.jumping=!1),p.isDown&&C-this.lastShot>nr){this.lastShot=C;const h=b==="right"?0:b==="up"?-Math.PI/2:Math.atan2(w.y-this.y,w.x-this.x),i=Math.cos(h),l=Math.sin(h),u=R.spawn(this.x+i*18,this.y-6+l*18,i*_s,l*_s);u&&(u.rotation=h),this.scene.tweens.add({targets:this,displayOriginX:this.frame.width/2-4*this.facing,duration:55,yoyo:!0})}r?Math.abs(c.velocity.x)>40?this.swap("boar_run"):this.swap("boar_idle"):this.swap(this.jumpsLeft===0?"boar_spin":"boar_jump"),this.setFlipX(this.facing>0),r&&e?this.displayOriginY=this.baseOriginY+Math.sin(C/55)*2.2:this.displayOriginY=this.baseOriginY,!r&&this.jumpsLeft>0?this.setAngle(st.Math.Clamp(c.velocity.y/55,-12,12)):r&&this.angle!==0&&this.setAngle(this.angle*.7)}startJump(C){this.body.setVelocityY(C),this.jumping=!0}hit(){var C;!this.alive||this.god||(this.alive=!1,(C=this.spinTween)==null||C.stop(),this.swap("boar_hurt"),this.body.enable=!1,this.setAcceleration(0).setVelocity(0),this.scene.tweens.add({targets:this,y:this.y-46,alpha:0,duration:520,ease:"Quad.out"}
6360),this.emit("dead"))}respawn(C,w){var b;(b=this.spinTween)==null||b.stop(),this.wasGrounded=!0,this.setPosition(C,w).setAlpha(1).setAngle(0),this.swap("boar_idle");const R=this.body;R.enable=!0,R.reset(C,w),this.setAcceleration(0).setVelocity(0),this.alive=!0}saveState(){const C=this.body;return{x:this.x,y:this.y,vx:C.velocity.x,vy:C.velocity.y,alive:this.alive,facing:this.facing,angle:this.angle,tex:this.texture.key,jumpsLeft:this.jumpsLeft,god:this.god}}loadState(C){var R;(R=this.spinTween)==null||R.stop(),this.setPosition(C.x,C.y).setAlpha(1).setAngle(C.angle),this.swap(C.tex);const w=this.body;w.enable=!0,w.reset(C.x,C.y),w.setVelocity(C.vx,C.vy),this.facing=C.facing,this.setFlipX(C.facing>0),this.jumpsLeft=C.jumpsLeft,this.god=C.god,this.alive=C.alive,this.wasGrounded=w.blocked.down||w.touching.down,this.jumping=!1,this.lastGrounded=-1e9,this.bufferedUntil=-1e9,this.lastShot=-1e9}swap(C){this.texture.key!==C&&(this.setTexture(C),this.fitFrame())}fitFrame(){const C=this.frame.width,w=this.frame.height;this.fitScale=Math.min(ar/w,rr/C)*or,this.applyScale()}applyScale(){const C=this.fitScale*this.sizeMul;this.setScale(C);const w=this.frame.width,R=this.frame.height;this.displayOriginX=w/2,this.baseOriginY=R-Ti/2/C,this.displayOriginY=this.baseOriginY;const b=hr/C,c=Ti/C,x=this.body;x.setSize(b,c),x.setOffset((w-b)/2,R-c)}shrinkAnim(C,w){this.scene.tweens.add({targets:this,sizeMul:C,duration:w,ease:"Quad.inOut",onUpdate:()=>this.applyScale()})}setSizeMul(C){this.sizeMul=C,this.applyScale()}}class pt{constructor(N,C,w){H(this,"cv");H(this,"ctx");this.gw=N,this.gh=C,this.cell=w,this.cv=document.createElement("canvas"),this.cv.width=N*w,this.cv.height=C*w,this.ctx=this.cv.getContext("2d")}rect(N,C,w,R,b){this.ctx.fillStyle=b,this.ctx.fillRect(Math.round(N)*this.cell,Math.round(C)*this.cell,Math.round(w)*this.cell,Math.round(R)*this.cell)}circle(N,C,w,R){for(let b=Math.floor(C-w);b<=C+w;b++)for(let c=Math.floor(N-w);c<=N+w;c++)(c+.5-N)**2+(b+.5-C)**2<=w*w&&this.rect(c,b,1,1,R)}ellipse(N,C,w,R,b){for(let c=Math.floor(C-R);c<=C+R;c++)for(let x=Math.floor(N-w);x<=N+w;x++){const t=(x+.5-N)/w,o=(c+.5-C)/R;t*t+o*o<=1&&this.rect(x,c,1,1,b)}}line(N,C,w,R,b,c=1){const x=Math.max(Math.abs(w-N),Math.abs(R-C),1);for(let t=0;t<=x;t++){const o=N+(w-N)*t/x,p=C+(R-C)*t/x;for(let a=0;a<c;a++)this.rect(Math.round(o)+a,Math.round(p),1,1,b)}}}function ve($,N,C){const w=new pt($[0].length,$.length,N);return $.forEach((R,b)=>{for(let c=0;c<R.length;c++){const x=R[c];x!=="."&&C[x]&&w.rect(c,b,1,1,C[x])}}),w.cv}const Xt=656,Si=26,tn=22,ze=640,ei=452;class lr{constructor(N,C,w){H(this,"beams",[]);H(this,"pendings",[]);H(this,"group");H(this,"all",[]);H(this,"rotateHitCdUntil",0);this.scene=N,this.player=C,this.onHitPlayer=w,this.group=N.physics.add.group({allowGravity:!1,runChildUpdate:!1}),N.physics.add.overlap(this.group,this.player,()=>this.onHitPlayer())}fire(N,C){const w=C.telegraph??700;N===2?this.fireMove(C,w):N===1?this.fireRotate(C,w):this.fireHold(C,w)}update(N,C){for(let w=this.pendings.length-1;w>=0;w--){const R=this.pendings[w];if(!(N<R.fireAt))if(this.pendings.splice(w,1),R.kind==="v")R.blink.stop(),R.mark.destroy(),R.line.destroy(),this.makeVerticalBeam(R.x,R.expireAt,R.vx);else{R.spin.stop(),R.mark.destroy();const b=R.preview.angle;R.preview.destroy(),this.makeRotateBeam(b,R.angVel,R.fireAt+R.dur)}}for(let w=this.beams.length-1;w>=0;w--){const R=this.beams[w],b=R.obj;R.vx&&(b.x+=R.vx*C/1e3),R.angVel!==void 0&&R.ang!==void 0&&(R.ang+=R.angVel*C/1e3,b.setAngle(R.ang),this.rotateCollide(R,N));const c=b.x<-100||b.x>1380;(N>R.expireAt||c)&&(this.group.remove(b),this.scene.tweens.add({targets:b,alpha:0,duration:130,onComplete:()=>b.destroy()}),this.beams.splice(w,1))}}clear(){for(const N of this.pendings)N.kind==="v"?N.blink.stop():N.spin.stop();this.pendings=[],this.beams=[],this.all.forEach(N=>N.destroy()),this.all=[]}saveState(){const N=this.scene.time.now,C=this.pendings.map(R=>R.kind==="v"?{kind:"v",x:R.x,teleRemain:R.fireAt-N,expireRemain:R.expireAt-R.fireAt,vx:R.vx}:{kind:"r",teleRemain:R.fireAt-N,angVel:R.angVel,dur:R.dur}),w=this.beams.map(R=>{const b=R.obj;return R.angVel!==void 0?{kind:"r",ang:R.ang??b.angle,angVel:R.angVel,expireRemain:R.expireAt-N}:{kind:"v",x:b.x,expireRemain:R.expireAt-N,vx:R.vx??0}});return{pendings:C,beams:w}}loadState(N){this.clear();const C=this.scene.time.now;for(const w of N.pendings){const R=Math.max(0,w.teleRemain);w.kind==="v"?this.spawnVerticalPending(w.x,R,C+R+w.expireRemain,w.vx):this.spawnRotatePending(R,w.angVel,w.dur)}for(const w of N.beams){const R=C+Math.max(0,w.expireRemain);w.kind==="v"?this.makeVerticalBeam(w.x,R,w.vx,!1):this.makeRotateBeam(w.ang,w.angVel,R)}}fireHold(N,C){const w=N.count??1,R=N.spacing??170,b=N.duration??3e3;for(let c=0;c<w;c++){const x=this.player.x+(c-(w-1)/2)*R;this.spawnVerticalPending(x,C,this.scene.time.now+C+b,0)}}fireMove(N,C){const w=N.count??3,R=N.spacing??300,b=N.dir===1?1:-1,c=N.speed??160;for(let x=0;x<w;x++){const t=b<0?1320+x*R:-40-x*R;this.spawnVerticalPending(t,C,this.scene.time.now+C+12e3,b*c)}}fireRotate(N,C){const w=N.speed??45,R=N.duration??4e3;this.spawnRotatePending(C,w,R)}spawnVerticalPending(N,C,w,R){const b=this.text(N,46,"!"),c=this.scene.add.tileSprite(N,Xt/2,6,Xt,"laser_thin").setAlpha(.4).setDepth(8);this.all.push(b,c);
6360const x=this.scene.tweens.add({targets:[b,c],alpha:.12,duration:110,yoyo:!0,repeat:Math.ceil(C/220)});this.pendings.push({kind:"v",x:N,fireAt:this.scene.time.now+C,expireAt:w,vx:R,mark:b,line:c,blink:x})}spawnRotatePending(N,C,w){const R=this.text(ze,64,"!"),b=this.scene.add.tileSprite(ze,ei,6,600,"laser_thin").setOrigin(.5,1).setAngle(-50).setAlpha(.35).setDepth(8);this.all.push(R,b);const c=this.scene.tweens.add({targets:b,angle:"+=360",duration:360/C*1e3,repeat:-1,ease:"Linear"});this.pendings.push({kind:"r",fireAt:this.scene.time.now+N,angVel:C,dur:w,mark:R,preview:b,spin:c})}makeVerticalBeam(N,C,w,R=!0){const b=this.scene.add.tileSprite(N,Xt/2,Si,Xt,"laser").setDepth(8);this.scene.physics.add.existing(b);const c=b.body;c.setAllowGravity(!1),c.setSize(Si-6,Xt),this.group.add(b),R&&(b.scaleX=.15,this.scene.tweens.add({targets:b,scaleX:1,duration:120,ease:"Quad.out"})),this.all.push(b),this.beams.push({obj:b,expireAt:C,vx:w})}makeRotateBeam(N,C,w){const R=this.scene.add.tileSprite(ze,ei,Si,600,"laser").setOrigin(.5,1).setAngle(N).setDepth(8);this.all.push(R),this.beams.push({obj:R,expireAt:w,ang:N,angVel:C})}text(N,C,w){return this.scene.add.text(N,C,w,{fontSize:"40px",fontStyle:"bold",color:"#ff2e63",fontFamily:"monospace"}).setOrigin(.5).setDepth(9)}rotateCollide(N,C){if(C<this.rotateHitCdUntil)return;const w=(N.ang??0)*Math.PI/180,R=Math.sin(w),b=-Math.cos(w),c=this.player.x-ze,x=this.player.y-ei,t=st.Math.Clamp(c*R+x*b,0,600),o=ze+t*R,p=ei+t*b;(this.player.x-o)**2+(this.player.y-p)**2<tn*tn&&(this.rotateHitCdUntil=C+500,this.onHitPlayer())}}function mi($){const N=$.scale.parentSize;return!N||N.height<=0?0:Math.max(0,(1280-720*N.width/N.height)/2)}const Q={font:"monospace",color:{panelBg:1450027,panelBgAlpha:.86,border:659737,edge:3362923,corner:4876938,textMain:"#eef4ec",textDim:"#93a7a0",textWarm:"#ffcf6b",textInk:"#4a3348",textInkDim:"#7d6a7d",danger:"#ff4d5e",success:"#7bd66f",ghost:6040371},size:{border:3,pad:8,sm:"13px",md:"16px",lg:"22px",xl:"40px"}};function Pt($,N,C,w,R){const b=Q.color,c=Q.size.border;$.fillStyle(b.border,1).fillRect(N,C,w,R),$.fillStyle(b.panelBg,b.panelBgAlpha).fillRect(N+c,C+c,w-c*2,R-c*2),$.fillStyle(b.edge,1).fillRect(N+c,C+c,w-c*2,2),$.fillStyle(b.corner,1);const x=3;$.fillRect(N+c,C+c,x,x),$.fillRect(N+w-c-x,C+c,x,x),$.fillRect(N+c,C+R-c-x,x,x),$.fillRect(N+w-c-x,C+R-c-x,x,x)}function Bn($,N,C,w,R){const b=$.add.graphics().setDepth(R),c=12+w.length*9;Pt(b,N,C,c,22);const x=$.add.text(N+c/2,C+11,w,{fontFamily:Q.font,fontSize:"12px",color:Q.color.textWarm}).setOrigin(.5).setDepth(R);return{g:b,t:x,w:c,setVisible(t){b.setVisible(t),x.setVisible(t)},destroy(){b.destroy(),x.destroy()}}}function dt($,N,C){$.textures.exists(N)||$.textures.addCanvas(N,C)}const Ve=1280;class ur{constructor(N){H(this,"clouds",[]);H(this,"hills");H(this,"hills2");this.scene=N,this.build()}update(N){const C=N/1e3;for(const w of this.clouds)w.img.x-=w.spd*C,w.img.x<-w.w&&(w.img.x=Ve+w.w);for(const w of[this.hills,this.hills2])w.x-=3*C,w.x<=-Ve&&(w.x+=Ve*2)}build(){const N=this.scene,C=new pt(640,180,2),w=[[109,185,234],[169,220,245],[244,230,191]];for(let t=0;t<180;t++){const o=t/179,p=o<.55?0:1,a=p===0?o/.55:(o-.55)/.45,n=w[p],r=w[p+1],e=Math.round(n[0]+(r[0]-n[0])*a),s=Math.round(n[1]+(r[1]-n[1])*a),h=Math.round(n[2]+(r[2]-n[2])*a);C.rect(0,t,640,1,`rgb(${e},${s},${h})`)}C.circle(520,34,15,"#ffe98a"),C.circle(520,34,10,"#fff6c8"),dt(N,"sky",C.cv),N.add.image(0,0,"sky").setOrigin(0).setDepth(-10);const R=new pt(320,40,4);R.ellipse(70,46,85,34,"#9ccf9a"),R.ellipse(230,50,100,38,"#a9d6a2"),R.ellipse(160,52,70,28,"#84bd85");for(let t=0;t<3;t++)for(let o=0;o<9;o++)R.rect(30+o*30+t%2*14,24+t*7,2,2,"#d64545"),R.rect(30+o*30+t%2*14,26+t*7,1,2,"#4e8a4a");dt(N,"hills",R.cv),this.hills=N.add.image(0,Xt-150,"hills").setOrigin(0).setDepth(-8).setAlpha(.9),this.hills2=N.add.image(Ve,Xt-150,"hills").setOrigin(0).setDepth(-8).setAlpha(.9);const b=(t,o,p)=>{const a=new pt(o,p,4),n=o/2,r=p/2;a.ellipse(n,r+1,o*.42,p*.32,"#f2f7fa"),a.ellipse(n-o*.22,r,o*.2,p*.26,"#f2f7fa"),a.ellipse(n+o*.24,r+.5,o*.18,p*.22,"#f2f7fa"),a.ellipse(n,r+p*.3,o*.4,p*.16,"#dcebf5"),dt(N,t,a.
6360cv)};b("cloud_s",22,7),b("cloud_m",34,9),b("cloud_l",46,11);const c=[["cloud_s",5,.55,-7,90],["cloud_m",9,.75,-6,130],["cloud_l",14,.92,-4,190]];for(const[t,o,p,a,n]of c)for(let r=0;r<3;r++){const e=N.add.image(st.Math.Between(0,Ve),st.Math.Between(30,300),t).setAlpha(p).setDepth(a);this.clouds.push({img:e,spd:o,w:n})}const x=new pt(320,14,4);for(let t=0;t<26;t++){const o=Math.random()*320|0,p=3+(Math.random()*5|0);x.rect(o,14-p,3,p,Math.random()<.5?"#5a9e52":"#6db35f"),Math.random()<.35&&x.rect(o+1,12-p,1,1,"#e05252")}dt(N,"shrubs",x.cv),N.add.image(0,Xt-52,"shrubs").setOrigin(0).setDepth(-2).setAlpha(.95)}}class ti{constructor(N,C,w=500,R=10,b=0){H(this,"group");this.scene=N,this.radius=R,this.depth=b,this.group=N.physics.add.group({defaultKey:C,maxSize:w,allowGravity:!1,runChildUpdate:!1})}spawn(N,C,w,R,b=16777215){const c=this.group.get(N,C);if(!c)return null;c.enableBody(!0,N,C,!0,!0),c.setVelocity(w,R),c.setTint(b),c.setDepth(this.depth);const x=c.body;return x.setCircle(this.radius),x.setOffset(c.width/2-this.radius,c.height/2-this.radius),c}recycle(N){N.disableBody(!0,!0)}sweep(N=80){this.group.children.each(C=>{const w=C;return w.active&&(w.x<-N||w.x>1280+N||w.y<-N||w.y>720+N)&&w.disableBody(!0,!0),!0})}saveState(){const N=[];return this.group.children.each(C=>{const w=C;if(w.active){const R=w.body;N.push({x:w.x,y:w.y,vx:R.velocity.x,vy:R.velocity.y,rot:w.rotation,tint:w.tintTopLeft})}return!0}),N}loadState(N){this.clear();for(const C of N){const w=this.spawn(C.x,C.y,C.vx,C.vy,C.tint);w&&(w.rotation=C.rot)}}clear(){this.group.children.each(N=>{const C=N;return C.active&&C.disableBody(!0,!0),!0})}}const Pe=520,en=92,Re=472,le=16;class gi{constructor(N,C){H(this,"box");H(this,"grad");H(this,"ghost");H(this,"nameText");H(this,"phaseText");H(this,"attackText");H(this,"flash");H(this,"ghostVal",1);H(this,"curVal",1);this.scene=N;const w=document.createElement("canvas");w.width=8,w.height=le;const R=w.getContext("2d"),b=R.createLinearGradient(0,0,8,0);b.addColorStop(0,"#ff5a4e"),b.addColorStop(1,"#ff9a3d"),R.fillStyle=b,R.fillRect(0,0,8,le),dt(N,"hp_grad",w);const c=(1280-Pe)/2;this.box=N.add.container(c,16).setDepth(30);const x=N.add.graphics();Pt(x,0,0,Pe,en),this.box.add(x),this.nameText=N.add.text(Pe/2,12,C,{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5,0),this.phaseText=N.add.text(Pe-14,14,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(1,0),this.box.add([this.nameText,this.phaseText]);const t=N.add.graphics();t.fillStyle(Q.color.border,1).fillRect(22,42,Re+6,le+6),t.fillStyle(659737,1).fillRect(25,45,Re,le),this.box.add(t),this.ghost=N.add.graphics(),this.box.add(this.ghost),this.grad=N.add.image(25,45,"hp_grad").setOrigin(0).setDisplaySize(Re,le),this.box.add(this.grad);const o=N.add.graphics();o.fillStyle(659737,.8);for(let p=1;p<10;p++)o.fillRect(25+Re*p/10-1,45,2,le);this.box.add(o),this.attackText=N.add.text(Pe/2,66,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5,0),this.box.add(this.attackText),this.flash=N.add.graphics(),this.flash.lineStyle(3,16764779,1).strokeRect(0,0,Pe,en),this.flash.setAlpha(0),this.box.add(this.flash)}update(N,C,w,R,b,c,x){const t=st.Math.Clamp(w/R,0,1);this.curVal=t,this.grad.setCrop(0,0,Math.max(.001,8*t),le),this.ghostVal>t?this.ghostVal=Math.max(t,this.ghostVal-C/1e3*.6):this.ghostVal=t,this.ghost.clear(),this.ghostVal>t+.004&&this.ghost.fillStyle(Q.color.ghost,1).fillRect(25+Re*t,45,Re*(this.ghostVal-t),le),this.phaseText.setText(`PHASE ${b}/${c}`),this.attackText.setText(x==="—"?"":`» ${x}`),t>0&&t<.25?this.box.setAlpha(.72+Math.sin(N/110)*.28):this.box.setAlpha(1)}phasePulse(){this.scene.tweens.add({targets:this.box,y:22,duration:90,yoyo:!0}),this.scene.tweens.add({targets:this.flash,alpha:.9,duration:130,yoyo:!0})}setName(N){this.nameText.setText(N)}setVisible(N){this.box.setVisible(N)}}class fr{constructor(N){H(this,"redEdge");H(this,"enrage");H(this,"enrageOn",!1);this.scene=N;const C=document.createElement("canvas");C.width=1280,C.height=720;const w=C.getContext("2d"),R=w.createRadialGradient(640,360,260,640,360,680);R.addColorStop(0,"rgba(255,40,50,0)"),R.addColorStop(1,"rgba(255,40,50,0.55)"),w.fillStyle=R,w.fillRect(0,0,1280,720),dt(N,"fx_rededge",C),this.redEdge=N.add.image(0,0,"fx_rededge").setOrigin(0).setAlpha(0).setDepth(40),this.enrage=N.add.rectangle(0,0,1280,720,16723514,0).setOrigin(0).setDepth(39)}
6360bossHit(N,C){const w=this.scene,R=w.add.text(N,C-8,"1",{fontFamily:Q.font,fontSize:"15px",color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5).setDepth(35);w.tweens.add({targets:R,y:C-34,alpha:0,duration:480,ease:"Quad.out",onComplete:()=>R.destroy()});for(let b=0;b<4;b++){const c=w.add.image(N,C,"particle").setDepth(7).setTint(b%2?9309981:16764779).setScale(.9),x=Math.random()*Math.PI*2,t=16+Math.random()*22;w.tweens.add({targets:c,x:N+Math.cos(x)*t,y:C+Math.sin(x)*t,alpha:0,scale:.1,duration:240+Math.random()*120,onComplete:()=>c.destroy()})}}playerHurt(){this.redEdge.setAlpha(.9),this.scene.tweens.add({targets:this.redEdge,alpha:0,duration:420}),this.scene.cameras.main.shake(150,.004)}landDust(N,C){for(let w=0;w<3;w++){const R=this.scene.add.image(N+(w-1)*8,C,"particle").setDepth(3).setTint(12101772).setScale(.8);this.scene.tweens.add({targets:R,x:R.x+(w-1)*12,y:C-6-Math.random()*6,alpha:0,duration:300,onComplete:()=>R.destroy()})}}afterimage(N,C,w,R,b){for(let c=1;c<=3;c++)this.scene.time.delayedCall(c*55,()=>{const x=this.scene.add.image(C,w,N).setFlipX(R).setScale(b).setTint(9425151).setAlpha(.32).setDepth(9);this.scene.tweens.add({targets:x,alpha:0,duration:260,onComplete:()=>x.destroy()})})}phaseChange(N){const C=this.scene.add.text(640,300,`PHASE ${N}`,{fontFamily:Q.font,fontSize:"52px",color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5).setDepth(41).setAlpha(0);this.scene.tweens.add({targets:C,alpha:1,scale:1.12,duration:220,yoyo:!0,hold:500,onComplete:()=>C.destroy()}),N===4&&this.setEnrage(!0)}setEnrage(N){this.enrageOn!==N&&(this.enrageOn=N,this.scene.tweens.killTweensOf(this.enrage),N?this.scene.tweens.add({targets:this.enrage,fillAlpha:.07,duration:900,yoyo:!0,repeat:-1}):this.scene.tweens.add({targets:this.enrage,fillAlpha:0,duration:400}))}cleared(N){this.setEnrage(!1),this.scene.add.text(640,290,"BOSS CLEAR!",{fontFamily:Q.font,fontSize:"64px",color:"#ffcf6b",fontStyle:"bold"}).setOrigin(.5).setShadow(3,3,"#0a1119",0).setDepth(41),this.scene.add.text(640,366,`死亡 ${N} 次 · 按 R 再战`,{fontFamily:Q.font,fontSize:"24px",color:Q.color.textMain}).setOrigin(.5).setDepth(41)}}const dr=196,cr=84;class vr{constructor(N){H(this,"box");H(this,"heart");H(this,"deathText");this.scene=N,this.makeIcons(),this.box=N.add.container(14,14).setDepth(30);const C=N.add.graphics();Pt(C,0,0,dr,cr),this.box.add(C);const w=N.add.graphics();Pt(w,10,12,46,46),this.box.add(w);const R=N.add.image(33,35,"boar_idle");R.setScale(34/R.height),this.box.add(R),this.heart=N.add.image(70,22,"icon_heart").setOrigin(0,.5),this.box.add(this.heart),this.box.add(N.add.text(84,22,"x1",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(0,.5)),this.box.add(N.add.image(70,46,"icon_skull").setOrigin(0,.5)),this.deathText=N.add.text(84,46,"x0",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(0,.5),this.box.add(this.deathText),this.box.add(N.add.image(70,68,"icon_jump").setOrigin(0,.5)),this.box.add(N.add.image(92,68,"icon_ki").setOrigin(0,.5)),this.box.add(N.add.text(116,68,"就绪",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(0,.5))}update(N,C){this.heart.setTexture(N?"icon_heart":"icon_heart_empty"),this.deathText.setText(`x${C}`)}setInset(N){this.box.x=14+N}makeIcons(){const N=this.scene;dt(N,"icon_heart",ve([".##.##.","#######","#######",".#####.","..###..","...#..."],3,{"#":"#ff4d5e"})),dt(N,"icon_heart_empty",ve([".##.##.","#..#..#","#.....#",".#...#.","..#.#..","...#..."],3,{"#":"#5c6b7a"})),dt(N,"icon_skull",ve([".####.","######","##.##.","######",".####.",".##.##"],3,{"#":"#e8e0d0"})),dt(N,"icon_jump",ve(["..##..",".####.","#.##.#","..##..","..##..",".####.","#.##.#"],3,{"#":"#7bd66f"})),dt(N,"icon_ki",ve([".####.","##oo##","#oooo#","#oooo#","######",".####."],3,{"#":"#2e8de0",o:"#bfe6ff"}))}}const sn="yyvschili_tut_seen";class pr{constructor(N){H(this,"box");H(this,"items",[]);H(this,"laserShown",!1);this.scene=N}showIntroOnce(){let N=!1;try{N=localStorage.getItem(sn)==="1"}catch{N=!1}if(!N){try{localStorage.setItem(sn,"1")}catch{}this.show([{keys:["A","D"],text:"移动"},{keys:["Space"],text:"跳 / 二段跳(按住跳更高)"},{keys:["J"],text:"气功波"},{keys:["P"],text:"暂停查看操作"}])}}showLaserTipOnce(){this.laserShown||(this.laserShown=!0,this.show([{keys:["!"],text:"红色感叹号 = 激光预警,立刻离开那条线!"}]))}show(N){this.hide();const C=this.scene,w=32;let R=Q.size.pad*2;const b=[];for(const a of N){const n=C.add.text(0,0,a.text,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textMain}),r=a.keys?a.keys.reduce((e,s)=>e+12+s.length*9+4,0):0;b.push({keys:a.keys,text:n,kw:r}),R+=r+n.width+14}R+=14;const c=Math.min(R,1e3),x=(1280-c)/2,t=616;this.box=C.add.container(x,t).setDepth(w);const o=C.add.graphics();Pt(o,0,0,c,40),this.box.add(o);let p=Q.size.pad+6;for(const a of b){if(a.keys)for(const n of a.keys){const r=Bn(C,p,9,n,w);this.box.add([r.g,r.t]),this.items.push(r.g,r.t),p+=r.w+4}a.text.setPosition(p,20).setOrigin(0,.5).setDepth(w),this.box.add(a.text),this.items.push(a.text),p+=a.text.
6360width+14}this.box.setAlpha(0),C.tweens.add({targets:this.box,alpha:1,duration:260}),C.time.delayedCall(5600,()=>this.hide())}hide(){if(!this.box)return;const N=this.box;this.box=void 0,this.scene.tweens.add({targets:N,alpha:0,duration:500,onComplete:()=>N.destroy(!0)})}}const Ci="yyvschili.save.v1",_t={read(){try{const $=localStorage.getItem(Ci);if(!$)return null;const N=JSON.parse($);return(N==null?void 0:N.level)===4?N.level4?N:null:(N==null?void 0:N.level)===3?N.level3?N:null:(N==null?void 0:N.v)===1?N.player&&N.boss?N:null:(N==null?void 0:N.v)===2&&N.level2?N:null}catch{return null}},write($){try{localStorage.setItem(Ci,JSON.stringify($))}catch{}},clear(){try{localStorage.removeItem(Ci)}catch{}}},Qs="yyvschili.plasmid.v1",mr=[3,6,10],ii=3,he={wall:{name:"细胞壁",max:ii,per:1,icon:["..####..",".##..##.",".#.##.#.","#.#..#.#","#.#..#.#",".#.##.#.",".##..##.","..####.."]},cilium:{name:"纤毛",max:ii,per:.08,icon:["..#.....",".#.#....","#...#..#","#....#.#",".#....#.",".#...#..","..#.#...","...#...."]},golgi:{name:"高尔基体",max:ii,per:.06,icon:[".######.","........","..####..","........",".######.","........","..####..","..o..o.."]},mimicry:{name:"拟态",max:ii,per:300,icon:["........","..#..#..",".##..##.",".#o##o#.","..#..#..","#..##..#",".##..##.","........"]}},we=["wall","cilium","golgi","mimicry"];function gr($,N){const C=he[$].per*N;switch($){case"wall":return`初始血量 +${C}`;case"cilium":return`初始移速 +${Math.round(C*100)}%`;case"golgi":return`开火间隔 -${Math.round(C*100)}%`;case"mimicry":return`受击无敌 +${(C/1e3).toFixed(1)}s`}}function nn(){return{frag:0,tree:{},runs:0,bestRooms:0,cleared:!1}}function Ne(){try{const $=localStorage.getItem(Qs);if(!$)return nn();const N=JSON.parse($);return{frag:typeof N.frag=="number"&&Number.isFinite(N.frag)?Math.max(0,Math.floor(N.frag)):0,tree:typeof N.tree=="object"&&N.tree!==null?{...N.tree}:{},runs:typeof N.runs=="number"?Math.max(0,Math.floor(N.runs)):0,bestRooms:typeof N.bestRooms=="number"?Math.max(0,Math.floor(N.bestRooms)):0,cleared:N.cleared===!0}}catch{return nn()}}function In($){try{localStorage.setItem(Qs,JSON.stringify($))}catch{}}function Ae($,N){return Math.min($[N]??0,he[N].max)}function Bi($,N){const C=Ae($,N);return C>=he[N].max?null:mr[C]}function xr($,N){const C=Bi($.tree,N);return C===null||$.frag<C?!1:($.frag-=C,$.tree[N]=Ae($.tree,N)+1,!0)}function Ei($){return{bonusHearts:he.wall.per*Ae($,"wall"),moveMult:1+he.cilium.per*Ae($,"cilium"),fireCdMult:1-he.golgi.per*Ae($,"golgi"),invulnBonusMs:he.mimicry.per*Ae($,"mimicry")}}function yr($){const N=Ne();return N.frag+=Math.max(0,Math.floor($.frags)),N.runs+=1,N.bestRooms=Math.max(N.bestRooms,$.rooms),$.cleared&&(N.cleared=!0),In(N),N}const Ii="yyvschili.cheat.god";function se(){try{return localStorage.getItem(Ii)==="1"}catch{return!1}}function Tr($){const N=document.createElement("div");N.style.cssText=["position:fixed","z-index:9999","background:rgba(10,17,25,0.92)","color:#eef4ec","font:13px monospace","padding:10px 12px","border:2px solid #33506b","display:none","min-width:168px","line-height:1.9","user-select:none","transform-origin:top right"].join(";"),N.innerHTML=`
6361    <div style="color:#ffcf6b;font-weight:bold;margin-bottom:4px">作弊器 [\` 隐藏]</div>
6362    <div style="color:#93a7a0">关卡跳转</div>
6363    <button data-jump="menu" style="width:100%">主菜单</button>
6364    <button data-jump="game" style="width:100%">第一关 · 爆炸辣椒</button>
6365    <button data-jump="game" data-form="winged" style="width:100%">第一关 · 飞翼辣椒(二形态)</button>
6366    <button data-jump="level2" style="width:100%">第二关 · 蟠桃岛</button>
6367    <button data-jump="level3" style="width:100%">第三关 · 管线</button>
6368    <button data-jump="level3" data-toboss="1" style="width:100%">第三关 · 鼠王Boss战</button>
6369    <button data-jump="bodymap" style="width:100%">第四关 · 全人体</button>
6370    <label style="display:block;margin-top:6px;cursor:pointer">
6371      <input type="checkbox" id="cheat-god" /> 无敌(一击不死)
6372    </label>
6373    <button id="cheat-clear" style="width:100%;margin-top:4px">清除存档</button>
6374    <button id="cheat-clear-plasmid" style="width:100%;margin-top:4px">清质粒存档</button>
6375    <div id="cheat-msg" style="color:#7bd66f;height:16px"></div>
6376  `,document.body.appendChild(N);const C=()=>{const x=document.querySelector("canvas");if(!x)return;const t=x.getBoundingClientRect();N.style.right=`${window.innerWidth-t.right+8}px`,N.style.top=`${t.top+8}px`,N.style.transform=`scale(${t.width/1280})`};window.addEventListener("resize",C),$.scale.on("resize",C),C(),setTimeout(C,500);const w=N.querySelector("#cheat-msg"),R=x=>{w.textContent=x,setTimeout(()=>w.textContent="",1500)};window.addEventListener("keydown",x=>{x.code==="Backquote"&&(N.style.display=N.style.display==="none"?"block":"none")});const b=(x,t)=>{for(const o of $.scene.getScenes(!0))$.scene.stop(o.scene.key);$.scene.start(x,t),R(`→ ${x}`)};N.querySelectorAll("button[data-jump]").forEach(x=>{x.addEventListener("click",()=>b(x.dataset.jump,x.dataset.form?{form:x.dataset.form}:x.dataset.toboss?{toBoss:!0}:void 0))});const c=N.querySelector("#cheat-god");c.checked=se(),c.addEventListener("change",()=>{try{c.checked?localStorage.setItem(Ii,"1"):localStorage.removeItem(Ii)}catch{}for(const x of $.scene.getScenes(!0)){const t=x.children.list.find(o=>{var p,a;return(a=(p=o.texture)==null?void 0:p.key)==null?void 0:a.startsWith("boar")});t&&(t.god=c.checked)}R(c.checked?"无敌 开":"无敌 关")}),N.querySelector("#cheat-clear").addEventListener("click",()=>{_t.clear(),R("存档已清除")}),N.querySelector("#cheat-clear-plasmid").addEventListener("click",()=>{try{localStorage.removeItem(Qs)}catch{}R("质粒已清")})}const Gn="yyvschili_difficulty";function Gi(){try{return localStorage.getItem(Gn)==="max"?"max":"high"}catch{return"high"}}function Sr($){try{localStorage.setItem(Gn,$)}catch{}}function js(){return Gi()==="max"}const te=1280,rn=720,si=150,Mi=600,Xe=30,an=1120,on=.9,hn=[[165,352,180],[330,500,260],[620,540,180]];class Cr extends st.Scene{constructor(){super("game");H(this,"player");H(this,"boss");H(this,"lasers");H(this,"enemyPool");H(this,"shotPool");H(this,"arena");H(this,"bg");H(this,"bossBar");H(this,"playerHud");H(this,"toast");H(this,"fx");H(this,"deaths",0);H(this,"cleared",!1);H(this,"paused",!1);H(this,"pauseBox");H(this,"cornerKey");H(this,"cornerText");H(this,"playerShadow");H(this,"laserTipShown",!1);H(this,"snapshot");H(this,"lastSave",0);H(this,"maxMode",!1);H(this,"saveHandler",()=>this.saveNow());H(this,"blurHandler",()=>{var C;
6376return(C=this.input.keyboard)==null?void 0:C.resetKeys()});H(this,"form","pepper");H(this,"plats",[]);H(this,"broken",[]);H(this,"morphing",!1);H(this,"shieldDurability",Xe);H(this,"shieldCollider");H(this,"portalShown",!1);H(this,"entering",!1)}init(C){this.snapshot=C==null?void 0:C.snapshot,this.deaths=0,this.cleared=!1,this.paused=!1,this.laserTipShown=!1,this.lastSave=0,this.form=(C==null?void 0:C.form)??"pepper",this.broken=[],this.morphing=!1,this.shieldDurability=Xe,this.portalShown=!1,this.entering=!1}preload(){const C=(w,R)=>{this.textures.exists(w)||this.load.image(w,new URL(Object.assign({"../assets/sprites/boar/hurt.png":Ws,"../assets/sprites/boar/idle.png":Hs,"../assets/sprites/boar/jump.png":Ks,"../assets/sprites/boar/run.png":Js,"../assets/sprites/boar/spin.png":Zs})[`../assets/sprites/boar/${R}`],import.meta.url).href)};C("boar_idle","idle.png"),C("boar_run","run.png"),C("boar_jump","jump.png"),C("boar_spin","spin.png"),C("boar_hurt","hurt.png")}create(){var b;this.makeTextures(),this.bg=new ur(this),this.buildArena(),this.enemyPool=new ti(this,"bullet_e",500,10,4),this.shotPool=new ti(this,"bullet_p",60,6,6);const C=this.input.keyboard;C.addCapture([st.Input.Keyboard.KeyCodes.SPACE,st.Input.Keyboard.KeyCodes.UP,st.Input.Keyboard.KeyCodes.DOWN]),this.player=new bn(this,si,Mi,{left:C.addKey(st.Input.Keyboard.KeyCodes.A),right:C.addKey(st.Input.Keyboard.KeyCodes.D),jump:C.addKey(st.Input.Keyboard.KeyCodes.SPACE),shoot:C.addKey(st.Input.Keyboard.KeyCodes.J),cursors:C.createCursorKeys()}),this.player.god=se(),this.maxMode=js(),this.lasers=new lr(this,this.player,()=>this.player.hit());const w=((b=this.snapshot)==null?void 0:b.form)??this.form;this.form=w,w==="winged"&&this.player.setSizeMul(on),this.boss=w==="winged"?new yi(this,640,250,"boss_winged",xi,this.player,this.enemyPool,this.lasers):new yi(this,1e3,350,"boss_pepper",Dn,this.player,this.enemyPool,this.lasers),this.bossBar=new gi(this,this.boss.cfg.name),this.playerHud=new vr(this),this.toast=new pr(this),this.fx=new fr(this),this.buildCornerHint();const R=()=>this.layoutHud();this.scale.on("resize",R),this.events.once(st.Scenes.Events.SHUTDOWN,()=>this.scale.off("resize",R)),this.layoutHud(),this.playerShadow=this.add.image(si,Xt-6,"shadow").setDepth(1),this.add.image(1e3,Xt-6,"shadow").setDepth(1).setScale(2.6,1.4).setAlpha(.55),this.physics.add.collider(this.player,this.arena),this.physics.add.overlap(this.enemyPool.group,this.player,c=>c.hit()),this.physics.add.overlap(this.shotPool.group,this.boss,(c,x)=>{const t=x;this.fx.bossHit(t.x,t.y),this.shotPool.recycle(x),this.boss.hit(1)}),this.physics.add.overlap(this.player,this.boss,()=>this.player.hit()),this.shieldCollider=this.physics.add.overlap(this.enemyPool.group,this.plats[2],(c,x)=>this.hitShield(x)),this.player.on("dead",()=>this.onPlayerDead()),this.player.on("land",(c,x)=>this.fx.landDust(c,x)),this.player.on("djump",()=>this.fx.afterimage(this.player.texture.key,this.player.x,this.player.y,this.player.flipX,this.player.scaleX)),this.boss.on("phase",c=>{this.bossBar.phasePulse(),this.fx.phaseChange(c)}),this.boss.on("cleared",()=>this.onBossDefeated()),C.on("keydown-G",()=>{this.paused||(this.player.god=!this.player.god)}),C.on("keydown-N",()=>{this.paused||this.boss.skipAttack()}),C.on("keydown-R",()=>this.scene.restart()),C.on("keydown-P",()=>this.togglePause()),C.on("keydown-M",()=>{this.paused&&this.exitToMenu()}),window.addEventListener("pagehide",this.saveHandler),this.events.once(st.Scenes.Events.SHUTDOWN,()=>window.removeEventListener("pagehide",this.saveHandler)),this.blurHandler=()=>{var c;return(c=this.input.keyboard)==null?void 0:c.resetKeys()},window.addEventListener("blur",this.blurHandler),document.addEventListener("visibilitychange",this.blurHandler),this.events.once(st.Scenes.Events.SHUTDOWN,()=>{window.removeEventListener("blur",this.blurHandler),document.removeEventListener("visibilitychange",this.blurHandler)}),this.snapshot?(this.applySnapshot(this.snapshot),this.snapshot=void 0):(w==="winged"&&(this.shatterPlatform(0,!1),this.shatterPlatform(1,!1)),this.toast.showIntroOnce(),this.boss.startFight())}
6376update(C,w){if(this.paused)return;this.entering||this.player.update(C,this.boss,this.shotPool,this.aimMode()),this.boss.update(C,w),this.lasers.update(C,w),this.enemyPool.sweep(),this.shotPool.sweep(),this.bg.update(w),!this.cleared&&this.player.alive&&C-this.lastSave>250&&(this.lastSave=C,this.saveNow()),this.portalShown&&!this.entering&&this.player.alive&&Math.abs(this.player.x-an)<46&&this.player.y>Xt-90&&this.enterPortal(),!this.laserTipShown&&this.boss.phaseIdx>=2&&(this.laserTipShown=!0,this.toast.showLaserTipOnce());const R=st.Math.Clamp((Xt-8-this.player.y)/260,0,1);this.playerShadow.setPosition(this.player.x,Xt-6).setScale(1-R*.55,1-R*.3).setAlpha(1-R*.55).setVisible(this.player.alive),this.bossBar.update(C,w,this.boss.hp,this.boss.cfg.hp,this.boss.phaseIdx+1,this.boss.cfg.phases.length,this.boss.currentAttack),this.playerHud.update(this.player.alive,this.deaths)}aimMode(){return this.maxMode?this.form==="winged"?"up":"right":"auto"}onPlayerDead(){this.cleared||(this.deaths++,this.fx.playerHurt(),this.enemyPool.clear(),this.lasers.clear(),this.time.delayedCall(800,()=>{this.player.respawn(si,Mi),!this.morphing&&this.boss.state!=="dead"&&this.boss.reset(),this.restorePlatforms()}))}onBossDefeated(){if(this.form==="pepper"){this.startMorph();return}this.cleared=!0,this.lasers.clear(),this.fx.cleared(this.deaths),this.spawnPortal(),this.saveNow()}startMorph(){if(this.morphing)return;this.morphing=!0,this.lasers.clear();const C=this.boss;this.time.delayedCall(500,()=>{const w=new yi(this,640,250,"boss_winged",xi,this.player,this.enemyPool,this.lasers);w.setAlpha(0).setScale(.2),this.tweens.add({targets:w,alpha:1,scaleX:1,scaleY:1,duration:600,ease:"Back.out"}),w.startFight(2900),w.on("phase",R=>{this.bossBar.phasePulse(),this.fx.phaseChange(R)}),w.on("cleared",()=>this.onBossDefeated()),this.physics.add.overlap(this.shotPool.group,w,(R,b)=>{const c=b;this.fx.bossHit(c.x,c.y),this.shotPool.recycle(b),w.hit(1)}),this.physics.add.overlap(this.player,w,()=>this.player.hit()),this.boss=w,this.form="winged",this.bossBar.setName(xi.name),C.dispose(),this.player.shrinkAnim(on,1e3),this.time.delayedCall(700,()=>this.eyeBeamTo(0)),this.time.delayedCall(1700,()=>this.eyeBeamTo(1))})}eyeBeamTo(C){const w=this.plats[C];if(!w||!w.active)return;const R=this.boss,b=w.x,c=w.y,x=[[R.x-12,R.y-62],[R.x+46,R.y-70]],t=(a,n,r)=>x.map(([e,s])=>{const h=st.Math.Distance.Between(e,s,b,c),i=Math.atan2(c-s,b-e)-Math.PI/2;return this.add.tileSprite(e,s,a,h,n).setOrigin(.5,0).setRotation(i).setAlpha(r).setDepth(8)}),o=t(6,"laser_thin",.4),p=this.tweens.add({targets:o,alpha:.1,duration:100,yoyo:!0,repeat:4});this.time.delayedCall(450,()=>{p.stop(),o.forEach(n=>n.destroy());const a=t(14,"laser",1);this.cameras.main.shake(160,.006),this.shatterPlatform(C),this.time.delayedCall(180,()=>a.forEach(n=>n.destroy()))})}shatterPlatform(C,w=!0){var b;const R=this.plats[C];if(!(!R||!R.active)){if(this.arena.remove(R,!1,!1),this.broken.includes(C)||this.broken.push(C),C===2&&((b=this.shieldCollider)==null||b.destroy(),this.shieldCollider=void 0),w)for(let c=0;c<14;c++){const x=this.add.image(R.x+st.Math.Between(-80,80),R.y+st.Math.Between(-12,12),"particle").setDepth(7).setTint(9067051).setScale(1.2);this.tweens.add({targets:x,x:x.x+st.Math.Between(-60,60),y:x.y+st.Math.Between(20,90),alpha:0,duration:500+Math.random()*300,onComplete:()=>x.destroy()})}R.destroy()}}restorePlatforms(){const C=this.form==="winged"?this.broken.filter(w=>w===0||w===1):[];for(const w of this.broken){if(C.includes(w))continue;const[R,b,c]=hn[w],x=this.arena.create(R,b,`plat_${c}`);x.setDisplaySize(c,32).refreshBody(),this.plats[w]=x}this.broken=C,this.shieldDurability=Xe,this.shieldCollider||(this.shieldCollider=this.physics.add.overlap(this.enemyPool.group,this.plats[2],(w,R)=>this.hitShield(R))),this.plats[2].setTint(this.shieldTint())}hitShield(C){if(!C.active||this.shieldDurability<=0)return;const{x:w,y:R}=C;this.enemyPool.recycle(C),this.shieldDurability--;const b=this.add.image(w,R,"particle").setDepth(7).setTint(16768392);this.tweens.add({targets:b,alpha:0,y:R-14,duration:220,onComplete:()=>b.destroy()});const c=this.plats[2];c!=null&&c.active&&(c.setTint(16777215),this.time.delayedCall(50,()=>{c.active&&c.setTint(this.shieldTint())}),this.shieldDurability<=0&&this.shatterPlatform(2))}shieldTint(){const C=st.Math.Clamp(this.shieldDurability/Xe,0,1),w=R=>Math.round(R+(255-R)*C);return w(107)<<16|w(53)<<8|w(32)}spawnPortal(){if(this.portalShown)return;this.portalShown=!0;const C=this.add.container(an,Xt).setDepth(6),w=this.add.image(0,-46,"portal_swirl").setOrigin(.5,.5),R=this.add.image(0,0,"portal_frame").setOrigin(.5,1),b=this.add.graphics();b.fillStyle(1709072,1).fillRect(-37,-116,74,22),b.fillStyle(15260864,1).fillRect(-34,-114,68,18);const c=this.add.text(0,-105,"万事屋",{fontFamily:Q.font,fontSize:"14px",color:"#3a2a1a",fontStyle:"bold"}).setOrigin(.5);C.add([w,R,b,c]),this.tweens.add({targets:w,angle:360,duration:2600,repeat:-1}),this.tweens.add({targets:C,alpha:.8,duration:900,yoyo:!0,repeat:-1})}enterPortal(){this.entering||(this.entering=!0,this.player.body.setVelocity(0,0),this.player.setAcceleration(0),this.tweens.add({targets:this.player,angle:720,scaleX:0,scaleY:0,duration:1100,ease:"Quad.in",onComplete:()=>this.scene.start("level2")}))}saveNow(){!this.player||!this.boss||_t.write({v:1,savedAt:Date.now(),elapsed:this.time.now,deaths:this.deaths,cleared:this.cleared,laserTipShown:this.laserTipShown,form:this.form,broken:[...this.broken],shield:this.shieldDurability,player:this.player.saveState(),boss:this.boss.saveState(),enemyBullets:this.enemyPool.saveState(),playerBullets:this.shotPool.saveState(),lasers:this.lasers.saveState()})}
6376applySnapshot(C){var w;this.deaths=C.deaths,this.cleared=C.cleared,this.laserTipShown=C.laserTipShown,this.broken=[...C.broken??[]],this.player.loadState(C.player),this.enemyPool.loadState(C.enemyBullets),this.shotPool.loadState(C.playerBullets),this.lasers.loadState(C.lasers),this.boss.loadState(C.boss),this.shieldDurability=C.shield??Xe,(w=this.plats[2])!=null&&w.active&&this.plats[2].setTint(this.shieldTint());for(const R of this.broken)this.shatterPlatform(R,!1);C.cleared||this.form==="winged"&&this.boss.state==="dead"?(this.cleared=!0,this.lasers.clear(),this.fx.cleared(this.deaths),this.spawnPortal()):this.form==="pepper"&&this.boss.state==="dead"?this.startMorph():C.player.alive||(this.player.respawn(si,Mi),this.boss.state!=="dead"&&this.boss.reset())}exitToMenu(){this.cleared||this.saveNow(),this.paused=!1,this.physics.resume(),this.tweens.resumeAll(),this.time.paused=!1,this.scene.start("menu")}buildCornerHint(){this.cornerKey=Bn(this,te-58,16,"P",30),this.cornerText=this.add.text(te-44,27,"暂停",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(0,.5).setDepth(30)}layoutHud(){var w;const C=mi(this);this.playerHud.setInset(C),this.cornerKey&&(this.cornerKey.g.clear(),Pt(this.cornerKey.g,te-58-C,16,this.cornerKey.w,22),this.cornerKey.t.setX(te-58-C+this.cornerKey.w/2)),(w=this.cornerText)==null||w.setX(te-44-C)}togglePause(){var C;if(!this.cleared)if(this.paused=!this.paused,this.paused){this.physics.pause(),this.tweens.pauseAll(),this.time.paused=!0,this.pauseBox=this.add.container(0,0).setDepth(50),this.pauseBox.add(this.add.rectangle(0,0,te,rn,659737,.55).setOrigin(0));const w=(te-420)/2,R=(rn-380)/2,b=this.add.graphics();Pt(b,w,R,420,380),this.pauseBox.add(b);const c=[["A / D 或 ← / →","移动"],["Space / ↑","跳 · 空中再按 = 二段跳 · 按住跳更高"],["J","气功波(自动瞄准 Boss)"],["G","无敌开关(练习用)"],["N","跳过当前招式"],["R","重开本关"],["M","保存并返回主菜单"],["P","继续游戏"]];this.pauseBox.add(this.add.text(te/2,R+20,"YY VS CHILI",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5,0)),this.pauseBox.add(this.add.text(te/2,R+50,"— 暂停 —",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5,0)),c.forEach((x,t)=>{this.pauseBox.add(this.add.text(w+28,R+88+t*34,x[0],{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm})),this.pauseBox.add(this.add.text(w+220,R+88+t*34,x[1],{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textMain}))})}else this.physics.resume(),this.tweens.resumeAll(),this.time.paused=!1,(C=this.pauseBox)==null||C.destroy(!0),this.pauseBox=void 0}makeTextures(){let C=new pt(8,8,4);C.circle(3.5,3.5,3.4,"#7a1f00"),C.circle(3.5,3.5,2.6,"#ff7722"),C.circle(3.5,3.5,1.6,"#ffdd88"),C.circle(3,3,.8,"#ffffff"),dt(this,"bullet_e",C.cv),C=new pt(14,7,4),C.ellipse(4,3,4,2,"#4aa8f0"),C.ellipse(4.5,3,3,1.2,"#bfe6ff"),C.circle(10,3,3,"#2e8de0"),C.circle(10,3,2.1,"#8fd0ff"),C.circle(10,3,1.2,"#ffffff"),dt(this,"bullet_p",C.cv),C=new pt(2,2,5),C.rect(0,0,2,2,"#ffffff"),dt(this,"particle",C.cv),C=new pt(10,10,3),C.circle(5,5,4.6,"rgba(255,220,120,0.3)"),C.circle(5,5,3,"rgba(255,236,160,0.55)"),C.circle(5,5,1.6,"rgba(255,255,230,0.95)"),dt(this,"bulb_glow",C.cv),C=new pt(15,4,4),C.ellipse(7,2,7,1.8,"rgba(36,40,52,0.3)"),dt(this,"shadow",C.cv);const w=new pt(320,16,4);w.rect(0,0,320,2,"#6fae4f");for(let R=0;R<60;R++)w.rect(Math.random()*320|0,Math.random()*2|0,1,1,"#5a9440");for(let R=0;R<26;R++)w.rect(Math.random()*320|0,0,1,1,Math.random()<.5?"#e8d24a":"#e05252");w.rect(0,2,320,14,"#8a5a2b");for(let R=0;R<140;R++)w.rect(Math.random()*320|0,2+(Math.random()*14|0),1,1,Math.random()<.5?"#734820":"#9c6c38");dt(this,"ground",w.cv),dt(this,"plat_180",this.platCanvas(45)),dt(this,"plat_260",this.platCanvas(65)),C=new pt(13,4,2);for(let R=0;R<13;R++){const b=R<2||R>10?"#ff2e63":R<4||R>8?"#ff8fab":"#ffffff";C.rect(R,0,1,4,b)}dt(this,"laser",C.cv),C=new pt(3,4,2),C.rect(0,0,1,4,"#ff2e63"),C.rect(1,0,1,4,"#ffffff"),C.rect(2,0,1,4,"#ff2e63"),dt(this,"laser_thin",C.cv),dt(this,"boss_pepper",this.pepperCanvas()),dt(this,"boss_winged",this.wingedCanvas()),dt(this,"portal_frame",this.portalFrameCanvas()),dt(this,"portal_swirl",this.portalSwirlCanvas())}wingedCanvas(){const C="#33241a",w=new pt(90,72,5);for(const[b,c,x,t]of[[24,26,9,9],[16,36,7.5,3.6],[13,44,6,3],[11,51,4.6,2.6]])for(const o of[b,90-b])w.ellipse(o,c,x+1.1,t+1.1,C),w.ellipse(o,c,x,t,"#e4edf4"),w.ellipse(o,c+.8,Math.max(1,x-2.5),Math.max(1,t-1.6),"#a9bfd2");return w.cv.getContext("2d").drawImage(this.pepperCanvas(),30/2*5,0),w.cv}portalFrameCanvas(){const C="#1a1410",w=new pt(15,22,4);return w.rect(0,0,15,2,C),w.rect(1,0,13,1,"#8a5a2b"),w.rect(0,0,2,22,C),w.rect(1,2,1,20,"#6b4a2b"),w.rect(13,0,2,22,C),w.rect(13,2,1,20,"#6b4a2b"),w.cv}portalSwirlCanvas(){const C=new pt(11,18,4);return C.ellipse(5.5,9,5.4,8.8,"#1b3a5c"),C.ellipse(5.5,9,4.2,7,"#2e6da4"),C.ellipse(5.5,9,3,5,"#7fc4f0"),C.ellipse(5.5,9,1.6,2.8,"#eaf8ff"),C.cv}platCanvas(C){const w=new pt(C,8,4);
6376w.rect(0,0,C,8,"#2e2015"),w.rect(1,1,C-2,6,"#5a3a22"),w.rect(1,1,C-2,1,"#7a5230");for(let R=9;R<C-2;R+=9)w.rect(R,2,1,5,"#45301c");for(let R=0;R<C/8;R++)w.rect(2+(Math.random()*(C-4)|0),2+(Math.random()*5|0),1,1,"#ff8a3d");for(const R of[1,2,C-3,C-2])for(let b=2;b<7;b++)w.rect(R,b,1,1,"#4e8a4a");return w.rect(1,3,1,1,"#6db35f"),w.rect(C-2,5,1,1,"#6db35f"),w.rect(2,6,1,1,"#d64545"),w.rect(C-3,3,1,1,"#d64545"),w.cv}pepperCanvas(){const C="#33241a",w=new pt(60,72,5),R=[[32.4,25.6,16],[28.4,38,14],[24.8,49.6,10.4],[22,60.4,6],[20,67.2,2.8]];for(const[b,c,x]of R)w.circle(b,c,x+1.2,C);for(const[b,c,x]of R)w.circle(b+.8,c+1,x,"#8e0f1d");for(const[b,c,x]of R)w.circle(b,c,x,"#dc1f2e");w.ellipse(24,18.4,4.4,2.2,"rgba(255,255,255,0.3)"),w.ellipse(20.4,31.6,3,1.5,"rgba(255,255,255,0.3)");for(const[b,c]of[[27.6,23.6],[39.2,22]])w.circle(b,c,4.8,C),w.circle(b,c,4.2,"#ffffff");w.circle(28.8,24.4,1.6,C),w.circle(38,22.8,1.6,C),w.circle(29.4,23.8,.5,"#ffffff"),w.circle(38.6,22.2,.5,"#ffffff"),w.line(22.4,16.8,31.6,19.6,C,2),w.line(44.4,15.2,36,18.4,C,2),w.ellipse(33.2,33.6,7.4,3.4,C),w.ellipse(33.2,33.6,6.6,2.7,"#3a0510");for(const b of[29.6,33.2,36.8])w.line(b,31.6,b,35.4,"#ffffff",1);return w.line(34.4,13.2,36.4,5.2,C,4),w.line(34.4,13.2,36.4,5.2,"#3f7a1e",2),w.ellipse(42.4,8.8,5.2,2.5,C),w.ellipse(42.4,8.8,4.4,1.9,"#4a8f24"),w.line(36.4,5.2,38,2.4,C,1),w.circle(38,2.4,2.2,C),w.circle(38,2.4,1.6,"#ff8800"),w.circle(38,2.4,.9,"#ffdd00"),w.circle(38,2.4,.4,"#ffffff"),w.cv}buildArena(){this.add.image(0,Xt,"ground").setOrigin(0).setDepth(-1),this.arena=this.physics.add.staticGroup(),this.arena.create(te/2,Xt+16,"plat_180").setDisplaySize(te,32).refreshBody().setAlpha(0),this.plats=[];for(const[w,R,b]of hn){const c=this.arena.create(w,R,`plat_${b}`);c.setDisplaySize(b,32).refreshBody(),this.plats.push(c)}}}const Ee=1280,Ai=720;class Er{constructor(N,C,w=5002){H(this,"c");H(this,"balText");H(this,"sel",0);H(this,"rows",[]);this.scene=N,this.onClose=C,this.depth=w}isOpen(){return!!this.c}open(){const w=(Ee-680)/2,R=(Ai-520)/2;for(const x of we)if(!this.scene.textures.exists(`pl_${x}`)){const t=ve([...he[x].icon],3,{"#":Q.color.textWarm,o:Q.color.success});this.scene.textures.addCanvas(`pl_${x}`,t)}if(!this.scene.textures.exists("l4_frag")){const x=new pt(6,6,2);x.circle(3,3,2.6,"#7bd6d0"),x.circle(3,3,1.2,"#e8fff8"),x.rect(2.8,0,.5,1,"#7bd6d0"),x.rect(2.8,5,.5,1,"#7bd6d0"),this.scene.textures.addCanvas("l4_frag",x.cv)}const b=this.scene.add.container(0,0).setDepth(this.depth).setScrollFactor(0);b.add(this.scene.add.rectangle(0,0,Ee,Ai,659737,.62).setOrigin(0)),b.add(this.scene.add.zone(Ee/2,Ai/2,680,520).setInteractive());const c=this.scene.add.graphics();Pt(c,w,R,680,520),b.add(c),b.add(this.scene.add.text(Ee/2,R+30,"— 质粒树 · 永久进化 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5)),b.add(this.scene.add.text(Ee/2,R+520-30,"←/→ 或 ↑/↓ 选择 · Enter / 点击 升级 · Esc 关闭",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5)),b.add(this.scene.add.image(Ee/2-52,R+66,"l4_frag").setScale(1.4)),this.balText=this.scene.add.text(Ee/2-34,R+66,"",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm}).setOrigin(0,.5),b.add(this.balText),this.rows=we.map((x,t)=>{const o=w+32,p=R+96+t*92,a=616,n=78,r=this.scene.add.graphics();r.lineStyle(3,st.Display.Color.HexStringToColor(Q.color.textWarm).color,1).strokeRect(o-4,p-4,a+8,n+8);const e=this.scene.add.graphics();Pt(e,o,p,a,n);const s=this.scene.add.image(o+34,p+n/2,`pl_${x}`).setScale(1.6),h=this.scene.add.text(o+64,p+14,"",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}),i=this.scene.add.text(o+64,p+44,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}),l=this.scene.add.text(o+a-16,p+n/2,"",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm}).setOrigin(1,.5),u=this.scene.add.text(o+a/2,p+n+12,"碎片不足",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.danger}).setOrigin(.5,0).setAlpha(0);b.add([r,e,s,h,i,l,u]);const d=this.scene.add.zone(o+a/2,p+n/2,a,n).setInteractive({useHandCursor:!0});return d.on("pointerover",()=>{this.sel=t,this.render()}),d.on("pointerdown",()=>{this.sel=t,this.upgrade()}),b.add(d),{hl:r,name:h,desc:i,price:l,warn:u}}),this.c=b,this.sel=0,this.render()}move(N){this.c&&(this.sel=(this.sel+N+we.length)%we.length,this.render())}upgrade(){var w;if(!this.c)return;const N=Ne(),C=we[this.sel];if(xr(N,C))In(N);else if(Bi(N.tree,C)!==null){const R=(w=this.rows[this.sel])==null?void 0:w.warn;R==null||R.setAlpha(1),this.scene.time.delayedCall(700,()=>R==null?void 0:R.setAlpha(0))}this.render()}close(){var N,C;(N=this.c)==null||N.destroy(!0),this.c=void 0,this.rows=[],this.balText=void 0,(C=this.onClose)==null||C.call(this)}render(){var C;if(!this.c)return;const N=Ne();(C=this.balText)==null||C.setText(`碎片余额  ${N.frag}`),this.rows.forEach((w,R)=>{const b=we[R],c=he[b],x=Ae(N.tree,b),t=Bi(N.tree,b);w.hl.setVisible(R===this.sel),w.name.setText(`${c.name}  ${"●".repeat(x)}${"○".repeat(c.max-x)}`),w.desc.setText(t===null?"已满级":`下级:${gr(b,x+1)}`),t===null?w.price.setText("MAX").setColor(Q.color.success):w.price.setText(`${t} 碎片`).setColor(N.frag>
6376=t?Q.color.textWarm:Q.color.danger)})}}const Yt=1280,ni=720,ri=320,Ye=56,ln=[244,318,392,466,540],Mr=452,Fe=656,We=640,Ar=170,un=190;class Pr extends st.Scene{constructor(){super("menu");H(this,"items",[]);H(this,"selected",0);H(this,"boxes",[]);H(this,"texts",[]);H(this,"scroll",0);H(this,"groundTiles",[]);H(this,"decos",[]);H(this,"monsters",[]);H(this,"boar");H(this,"boarJumpT",0);H(this,"boarJumpH",64);H(this,"boarJumpDur",460);H(this,"monsterSpawnAt",1400);H(this,"quitted",!1);H(this,"tree")}preload(){this.textures.exists("boar_run")||this.load.image("boar_run",new URL(""+new URL("run-B70rytj1.png",import.meta.url).href,import.meta.url).href)}create(){this.boxes=[],this.texts=[],this.quitted=!1,this.tree=void 0,this.makeTextures(),this.add.rectangle(0,0,Yt,ni,9753333).setOrigin(0).setDepth(-2),this.initScrollWorld(),this.add.text(Yt/2,140,"YY VS CHILI",{fontFamily:Q.font,fontSize:"64px",color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5),this.add.text(Yt/2,198,"小野猪 vs 爆炸辣椒",{fontFamily:Q.font,fontSize:Q.size.md,color:"#33506b"}).setOrigin(.5);const C=_t.read(),w={label:this.diffLabel(),enabled:!0,action:()=>{Sr(Gi()==="max"?"high":"max"),this.texts[this.items.indexOf(w)].setText(this.diffLabel())}};this.items=[{label:"开始游戏",enabled:!0,action:()=>{_t.clear(),this.scene.start("game")}},w,{label:"读取存档",enabled:!!C,action:()=>{const b=_t.read();b&&this.scene.start(b.level===2?"level2":b.level===3?"level3":b.level===4?"bodymap":"game",{snapshot:b})}},{label:"质粒树",enabled:!0,action:()=>{this.tree=new Er(this),this.tree.open()}},{label:"退出游戏",enabled:!0,action:()=>this.quit()}],this.items.forEach((b,c)=>{const x=ln[c],t=this.add.graphics(),o=this.add.text(Yt/2,x+Ye/2,b.label,{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textMain}).setOrigin(.5),p=this.add.zone(Yt/2,x+Ye/2,ri,Ye).setInteractive({useHandCursor:b.enabled});p.on("pointerover",()=>{b.enabled&&(this.selected=c,this.refresh())}),p.on("pointerdown",()=>{b.enabled&&b.action()}),this.boxes.push(t),this.texts.push(o)}),this.add.text(Yt/2,Mr,C?this.saveSummary(C):"暂无存档",{fontFamily:Q.font,fontSize:Q.size.sm,color:C?Q.color.textDim:"#7a8a84"}).setOrigin(.5,0),this.add.text(Yt/2,614,"HIGH:标准参数 · MAX:子弹定向不追踪 + 沙盒冲刺耗体力",{fontFamily:Q.font,fontSize:Q.size.sm,color:"#7a8a84"}).setOrigin(.5),this.add.text(Yt/2,638,"↑ / ↓ 选择 · Enter 确认(难度项 Enter 切换)",{fontFamily:Q.font,fontSize:Q.size.sm,color:"#33506b"}).setOrigin(.5).setDepth(30);const R=this.input.keyboard;R.on("keydown-UP",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(-1):this.move(-1)}),R.on("keydown-LEFT",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(-1):this.move(-1)}),R.on("keydown-W",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(-1):this.move(-1)}),R.on("keydown-A",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(-1):this.move(-1)}),R.on("keydown-DOWN",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(1):this.move(1)}),R.on("keydown-RIGHT",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(1):this.move(1)}),R.on("keydown-S",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(1):this.move(1)}),R.on("keydown-D",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.move(1):this.move(1)}),R.on("keydown-ENTER",()=>{var b;return(b=this.tree)!=null&&b.isOpen()?this.tree.upgrade():this.confirm()}),R.on("keydown-ESC",()=>{var b;return(b=this.tree)==null?void 0:b.close()}),this.selected=this.items.findIndex(b=>b.enabled),this.refresh()}initScrollWorld(){this.scroll=0,this.groundTiles=[];for(let w=0;w<3;w++)this.groundTiles.push(this.add.image(w*We,Fe,"menu_ground").setOrigin(0).setDepth(-1));this.decos=[];const C=["deco_stone1","deco_stone2","deco_flower1","deco_flower2"];for(let w=0;w<16;w++){const R=C[Math.random()*C.length|0],b=Math.random()*1320;this.decos.push({worldX:b,sprite:this.add.image(b,Fe+4,R).setOrigin(.5,0).setDepth(0)})}this.monsters=[],this.spawnMonster(900),this.boar=this.add.image(un,Fe+4,"boar_run").setOrigin(.5,1).setDepth(2).setScale(.3).setFlipX(!0)}spawnMonster(C){this.monsters.push({worldX:C,speed:45+Math.random()*55,sprite:this.add.image(C,Fe+2,"menu_monster").setOrigin(.5,1).setDepth(1)})}
6376update(C,w){if(this.quitted)return;this.scroll+=Ar*w/1e3;const R=(this.scroll%We+We)%We;this.groundTiles.forEach((b,c)=>b.setX(c*We-R));for(const b of this.decos){if(b.worldX-this.scroll<-40){b.worldX=this.scroll+Yt+40+Math.random()*240;const x=["deco_stone1","deco_stone2","deco_flower1","deco_flower2"][Math.random()*4|0];b.sprite.setTexture(x)}b.sprite.setX(b.worldX-this.scroll)}C>this.monsterSpawnAt&&(this.monsterSpawnAt=C+2200+Math.random()*1600,this.monsters.length<6&&this.spawnMonster(this.scroll+Yt+60));for(const b of this.monsters)if(b.worldX-=(b.speed??0)*w/1e3,b.worldX-this.scroll<-80&&(b.worldX=this.scroll+Yt+80+Math.random()*300,b.speed=45+Math.random()*55),b.sprite.setX(b.worldX-this.scroll),Math.abs(b.worldX-this.scroll-un)<70&&this.boarJumpT<=0){const x=this.monsters.some(t=>t!==b&&t.worldX>b.worldX&&t.worldX-b.worldX<240);this.boarJumpDur=x?720:500,this.boarJumpH=x?110:64,this.boarJumpT=this.boarJumpDur}if(this.boarJumpT=Math.max(0,this.boarJumpT-w),this.boarJumpT>0){const b=1-this.boarJumpT/this.boarJumpDur;this.boar.setY(Fe+4-Math.sin(b*Math.PI)*this.boarJumpH)}else this.boar.setY(Fe+4+Math.sin(C/70)*3)}diffLabel(){return`难度:${Gi()==="max"?"MAX":"HIGH"}`}move(C){const w=this.items.length;for(let R=1;R<=w;R++){const b=((this.selected+C*R)%w+w)%w;if(this.items[b].enabled){this.selected=b,this.refresh();return}}}confirm(){const C=this.items[this.selected];C!=null&&C.enabled&&C.action()}refresh(){this.items.forEach((C,w)=>{const R=(Yt-ri)/2,b=ln[w],c=this.boxes[w];c.clear(),Pt(c,R,b,ri,Ye),w===this.selected&&C.enabled&&c.lineStyle(2,16764779,1).strokeRect(R+6,b+6,ri-12,Ye-12),this.texts[w].setAlpha(C.enabled?w===this.selected?1:.75:.35)})}saveSummary(C){if(C.level===4&&C.level4){const R=C.level4;if(R.genV===2){const b=Object.values(R.organProgress??{}).filter(Boolean).length,c=R.midrun;if(b>=5)return`存档:最终关 · 宿主已被感染(5/5) · ${this.fmtTime(C.savedAt)}`;const x=c?` · 入侵中「${c.organ}」第 ${c.visitedRooms.length} 腔`:"";return`存档:最终关 · 已感染 ${b}/5${x} · ${this.fmtTime(C.savedAt)}`}return`存档:最终关 · 旧档(读取按新开局) · ${this.fmtTime(C.savedAt)}`}if(C.level===3&&C.level3){const R=C.level3,b=R.cleared?"已通关":`检查点 ${R.checkpoint}`,c=[R.badge?"磁铁徽章":"",R.peachMedal?"桃子勋章":""].filter(Boolean).join(" / ");return`存档:第三关 · ${b}${c?` · ${c}`:""} · 桃子 ${R.peaches.length} · 死亡 ${R.deaths} 次 · ${this.fmtTime(C.savedAt)}`}if(C.level===2&&C.level2){const R=C.level2,b=R.queenAlive?`蟠桃蟾王血量 ${Math.ceil(R.queenHp/25*100)}%`:"蟠桃蟾王已击败",c=Object.values(R.elixirs??{}).reduce((x,t)=>x+t,0);return`存档:第二关 · ${b} · 木头 ${R.wood} · 仙丹 ${c}/8 · 死亡 ${R.deaths} 次 · ${this.fmtTime(C.savedAt)}`}return C.cleared?`存档:已通关 · 死亡 ${C.deaths} 次 · ${this.fmtTime(C.savedAt)}`:`存档:Boss 血量 ${Math.max(0,Math.ceil(C.boss.hp/Dn.hp*100))}% · 第 ${C.boss.phaseIdx+1} 阶段 · 死亡 ${C.deaths} 次 · ${this.fmtTime(C.savedAt)}`}fmtTime(C){const w=new Date(C),R=b=>String(b).padStart(2,"0");return`${R(w.getMonth()+1)}-${R(w.getDate())} ${R(w.getHours())}:${R(w.getMinutes())}`}quit(){this.quitted=!0,this.children.removeAll(!0),this.add.rectangle(0,0,Yt,ni,659737).setOrigin(0),this.add.text(Yt/2,ni/2-24,"再见,小野猪",{fontFamily:Q.font,fontSize:Q.size.xl,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5),this.add.text(Yt/2,ni/2+30,"进度已自动保存,直接关闭标签页即可",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5),window.close()}makeTextures(){const C=new pt(160,16,4);C.rect(0,0,160,2,"#6fae4f"),C.rect(0,1,160,1,"#8cc96a");for(let R=0;R<50;R++)C.rect(Math.random()*160|0,Math.random()*2|0,1,1,"#5a9440");C.rect(0,2,160,14,"#8a5a2b"),C.rect(0,2,160,1,"#9c6c38");for(let R=0;R<150;R++)C.rect(Math.random()*160|0,3+(Math.random()*13|0),1,1,Math.random()<.5?"#734820":"#9c6c38");for(let R=0;R<14;R++){const b=Math.random()*160|0,c=4+(Math.random()*11|0);C.rect(b,c,2,1,"#a8a098"),C.rect(b,c+1,2,1,"#7a7068")}dt(this,"menu_ground",C.cv);let w=new pt(5,3,3);w.ellipse(2.5,2,2.4,1.6,"#8a8278"),w.ellipse(2,1.6,1.5,1,"#aaa298"),dt(this,"deco_stone1",w.cv),w=new pt(4,2,3),w.ellipse(2,1.4,1.9,1.2,"#7a7068"),w.ellipse(1.6,1.1,1.1,.7,"#9a9088"),dt(this,"deco_stone2",w.cv),w=new pt(5,6,3),w.rect(2.4,2.5,.6,3.4,"#4e8a4a"),w.circle(2.5,2,1.6,"#e8d24a"),w.circle(2.5,2,.7,"#fff4c0"),dt(this,"deco_flower1",w.cv),w=new pt(5,6,3),w.rect(2.4,2.5,.6,3.4,"#4e8a4a"),w.circle(2.5,2,1.6,"#e05252"),w.circle(2.5,2,.7,"#ffd0d0"),dt(this,"deco_flower2",w.cv),w=new pt(8,9,4),w.ellipse(4,5.4,3.2,3.2,"#33241a"),w.ellipse(4,5.3,2.6,2.7,"#dc1f2e"),w.ellipse(4.8,4.6,1.4,1.8,"#f0505e"),w.line(4,2.6,4.6,.6,"#3f7a1e",1),w.circle(3,4.6,.9,"#ffffff"),w.circle(5.2,4.4,.9,"#ffffff"),w.circle(3.2,4.8,.45,"#33241a"),w.circle(5.4,4.6,.45,"#33241a"),w.line(2.6,3.4,3.8,4.1,"#33241a",1),w.line(5.6,3.4,4.6,4,"#33241a",1),dt(this,"menu_monster",w.cv)}}const Rr=""+new URL("attack_01-Dm3e9zE1.png",import.meta.url).href,wr=""+new URL("attack_02-FyrLv7pI.png",import.meta.url).href,Fr=""+new URL("attack_03-BW8to7m0.png",import.meta.url).href,Lr=""+new URL("attack_04-DCk3vmf7.png",import.meta.url).href,Or=""+new URL("boar_td_master_sheet-Bc_y82yX.png",import.meta.url).href,Dr=""+new URL("dash_01-CRxVQanS.png",import.meta.url).href,br=""+new URL("dead_01-rSpm_1S8.png",import.meta.url).href,Br=""+new URL("dead_02-n2b9NgP6.png",import.meta.url).href,Ir=""+new URL("hop_01-CLXZMmGS.png",import.meta.url).href,Gr=""+new URL("hurt_01-Dr946z5
6376p.png",import.meta.url).href,Nr=""+new URL("hurt_02-BnIJUpAs.png",import.meta.url).href,Ur=""+new URL("idle_01-DOIzeGxq.png",import.meta.url).href,zr=""+new URL("idle_02-ff2vQDvJ.png",import.meta.url).href,Vr=""+new URL("idle_03-2hi6JSZg.png",import.meta.url).href,Xr=""+new URL("idle_04-BcW91DqG.png",import.meta.url).href,Yr=""+new URL("walk_01-Csk8eUiQ.png",import.meta.url).href,Wr=""+new URL("walk_02-DuvOoTzw.png",import.meta.url).href,Hr=""+new URL("walk_03-DL3mXZbN.png",import.meta.url).href,Kr=""+new URL("walk_04-BCzcvOcg.png",import.meta.url).href,Jr=""+new URL("walk_05-DW24liSf.png",import.meta.url).href,Zr=""+new URL("walk_06-BKNUmjls.png",import.meta.url).href,Qr=""+new URL("furnace_sheet-DXW0sNAh.png",import.meta.url).href,jr=""+new URL("peach_bare-CKZ2sV74.png",import.meta.url).href,$r=""+new URL("peach_tree-BcSnOY2A.png",import.meta.url).href,kr=""+new URL("peach_tree_0-CxyX-2GW.png",import.meta.url).href,qr=""+new URL("peach_tree_1-CkXWq4Cb.png",import.meta.url).href,_r=""+new URL("peach_tree_2-BFHmbK0p.png",import.meta.url).href,ta=""+new URL("spider_00-CNSlLuqQ.png",import.meta.url).href,ea=""+new URL("spider_01-C1A1bgMb.png",import.meta.url).href,ia=""+new URL("spider_02-CBTola6Z.png",import.meta.url).href,sa=""+new URL("spider_03-C8o-w7K7.png",import.meta.url).href,na=""+new URL("spider_04-CNvel_eB.png",import.meta.url).href,ra=""+new URL("spider_05-DEzOvxeu.png",import.meta.url).href,aa=""+new URL("spider_06-CAVax57Z.png",import.meta.url).href,oa=""+new URL("spider_07-ClfWw7sT.png",import.meta.url).href,ha=""+new URL("terrain_sheet-Baw4eqXp.png",import.meta.url).href,la=""+new URL("well-CVTsiHIi.png",import.meta.url).href,qt=($,N,C)=>$*Math.sin(C)+N*Math.cos(C),Le={idle:[0,1,0,10],telegraph:[5,6],lunge:[7,8,9],cast:[6,11,10],hurt:[10],dead:[9]},Ni=25,ua=460,fn=1e3,fa=850,da=1600,Ge=($,N)=>($.add(N),N);class dn{constructor(N,C,w,R,b){H(this,"alive",!0);H(this,"sprite");H(this,"shadow");H(this,"vx",0);H(this,"vy",0);H(this,"wanderAt",0);H(this,"flashUntil",-1);H(this,"layer");this.scene=N,this.x=C,this.y=w,this.onIsland=R,this.layer=b,this.shadow=Ge(b,N.add.image(C,w+8,"td_shadow").setDepth(w-1).setScale(.8)),this.sprite=Ge(b,N.add.sprite(C,w,"spider_00").setDepth(w).setOrigin(.5,.85).setScale(.22));const c=N.anims;c.exists("spider_walk")||(c.create({key:"spider_walk",frames:[1,3,4,0].map(x=>({key:`spider_0${x}`})),frameRate:8,repeat:-1}),c.create({key:"spider_dead",frames:[{key:"spider_07"}],frameRate:1,repeat:0})),this.sprite.play("spider_walk")}update(N,C,w,R=0){if(!this.alive)return;const b=w.x-this.x,c=w.y-this.y,x=Math.hypot(b,c);if(x>.001&&x<240)this.vx=b/x*95,this.vy=c/x*95*.55;else if(N>this.wanderAt){this.wanderAt=N+1500;const p=Math.random()*Math.PI*2;this.vx=Math.cos(p)*35,this.vy=Math.sin(p)*35*.55}const t=this.x+this.vx*C/1e3,o=this.y+this.vy*C/1e3;this.onIsland(t,o)?(this.x=t,this.y=o):(this.wanderAt=0,this.vx=-this.vx,this.vy=-this.vy),this.syncView(R),N>this.flashUntil&&this.sprite.clearTint()}syncView(N){if(!this.alive)return;const C=this.vx*Math.cos(N)-this.vy*Math.sin(N);this.sprite.setPosition(this.x,this.y).setDepth(qt(this.x,this.y,N)).setRotation(-N).setFlipX(C>0),this.shadow.setPosition(this.x,this.y+8).setDepth(qt(this.x,this.y,N)-1)}hit(){if(this.alive){this.alive=!1,this.sprite.play("spider_dead",!0);for(let N=0;N<6;N++){const C=Ge(this.layer,this.scene.add.image(this.x+st.Math.Between(-10,10),this.y+st.Math.Between(-10,10),"particle").setDepth(this.y+1).setTint(5913194).setScale(.9));this.scene.tweens.add({targets:C,y:C.y-20-Math.random()*16,alpha:0,duration:280,onComplete:()=>C.destroy()})}this.scene.tweens.add({targets:[this.sprite,this.shadow],alpha:0,y:"-=14",duration:240,onComplete:()=>{this.sprite.destroy(),this.shadow.destroy()}})}}}class ca{constructor(N,C,w,R,b,c,x,t){H(this,"hp",Ni);H(this,"alive",!0);H(this,"sprite");H(this,"shadow");H(this,"state","idle");H(this,"stateAt",-1);H(this,"chargeX",0);H(this,"chargeY",0);H(this,"chargeLeft",0);H(this,"flashUntil",-1);H(this,"MOVES",["charge","spit","summon"]);H(this,"moveIdx",0);H(this,"layer");this.scene=N,this.x=C,this.y=w,this.onIsland=R,this.spawnWeb=b,this.spawnCrawler=c,this.crawlerCount=x,this.layer=t,this.shadow=Ge(t,N.add.image(C,w+16,"td_shadow").setDepth(w-1).setScale(2.2,1.2)),this.sprite=Ge(t,N.add.sprite(C,w,"spider_queen",0).setDepth(w).setOrigin(.5,.72)),this.ensureAnims(),this.sprite.play("toad_idle")}ensureAnims(){const N=this.scene.anims,C=(w,R,b,c)=>{N.exists(w)||N.create({key:w,frames:N.generateFrameNumbers("spider_queen",{frames:[...R]}),frameRate:b,repeat:c})};C("toad_idle",Le.idle,5,-1),C("toad_telegraph",Le.telegraph,6,-1),C("toad_lunge",Le.lunge,12,0),C("toad_cast",Le.cast,12,0),C("toad_hurt",Le.hurt,10,0),C("toad_dead",Le.dead,6,0)}playOnce(N){this.state!=="dead"&&(this.sprite.play(N,!0),this.sprite.once(st.Animations.Events.ANIMATION_COMPLETE,()=>{this.state!=="dead"&&this.sprite.play("toad_idle")}))}killSilently(){this.state="dead",this.alive=!1,this.hp=0,this.sprite.setVisible(!1),this.shadow.setVisible(!1)}update(N,C,w,R=0){if(this.state==="dead")return;this.stateAt<0&&(this.stateAt=N-fn+da);const b=N-this.stateAt;if(N>this.flashUntil&&this.state!=="telegraph"&&this.sprite.clearTint(),this.state==="idle")b>=fn&&this.beginTelegraph(N);else if(this.state==="telegraph")b>=fa&&this.execMove(N,w);else if(this.state==="charge"){const c=ua*C/1e3,x=this.x+this.charge
6376X*c,t=this.y+this.chargeY*c*.55;this.onIsland(x,t)&&(this.x=x,this.y=t),this.chargeLeft-=c,this.chargeLeft<=0&&this.toIdle(N)}this.syncView(w,R)}syncView(N,C){if(this.state==="dead")return;this.sprite.setPosition(this.x,this.y).setDepth(qt(this.x,this.y,C)).setRotation(-C);const w=(N.x-this.x)*Math.cos(C)-(N.y-this.y)*Math.sin(C);this.sprite.setFlipX(w<0),this.shadow.setPosition(this.x,this.y+16).setDepth(qt(this.x,this.y,C)-1)}beginTelegraph(N){this.state="telegraph",this.stateAt=N,this.sprite.play("toad_telegraph")}execMove(N,C){this.sprite.clearTint();const w=this.MOVES[this.moveIdx%this.MOVES.length];if(this.moveIdx++,w==="charge"&&Math.hypot(C.x-this.x,C.y-this.y)<150){this.toIdle(N);return}if(this.state=w,this.stateAt=N,w==="charge"){this.playOnce("toad_lunge");const R=C.x-this.x,b=C.y-this.y,c=Math.hypot(R,b)||1;this.chargeX=R/c,this.chargeY=b/c,this.chargeLeft=360}else if(w==="spit"){const R=Math.atan2(C.y-this.y,C.x-this.x);for(let b=-1;b<=1;b++){const c=R+b*.22;this.spawnWeb(this.x,this.y-10,Math.cos(c)*230,Math.sin(c)*230)}this.toIdle(N)}else if(w==="summon"){for(const R of[-50,50])this.crawlerCount()<4&&this.spawnCrawler(this.x+R,this.y+20);this.toIdle(N)}(w==="spit"||w==="summon")&&this.playOnce("toad_cast")}reset(N,C){this.hp=Ni,this.x=N,this.y=C,this.state="idle",this.stateAt=-1,this.moveIdx=0,this.chargeLeft=0,this.flashUntil=-1,this.sprite.clearTint(),this.sprite.play("toad_idle",!0)}toIdle(N){this.state="idle",this.stateAt=N}hit(N){if(this.state!=="dead")if(this.hp-=N,this.sprite.setTintFill(16777215),this.flashUntil=this.scene.time.now+60,this.hp<=0){this.state="dead",this.alive=!1,this.sprite.clearTint(),this.sprite.play("toad_dead",!0),this.scene.cameras.main.shake(260,.007);for(let C=0;C<16;C++){const w=C/16*Math.PI*2,R=Ge(this.layer,this.scene.add.image(this.x,this.y,"particle").setDepth(this.y+1).setTint(8014490));this.scene.tweens.add({targets:R,x:this.x+Math.cos(w)*(50+Math.random()*40),y:this.y+Math.sin(w)*(50+Math.random()*40),alpha:0,duration:500,onComplete:()=>R.destroy()})}this.scene.tweens.add({targets:[this.sprite,this.shadow],alpha:0,scaleX:.2,scaleY:.2,duration:600,ease:"Back.in",onComplete:()=>{this.sprite.destroy(),this.shadow.destroy()}})}else this.playOnce("toad_hurt")}}const ai=1280,cn=720;class va{constructor(N,C,w,R=5002){H(this,"c");H(this,"pageIdx",0);H(this,"titleText");H(this,"body");H(this,"pageText");this.scene=N,this.pages=C,this.onClose=w,this.depth=R}open(){const w=(ai-660)/2,R=(cn-440)/2,b=this.scene.add.container(0,0).setDepth(this.depth).setScrollFactor(0);b.add(this.scene.add.rectangle(0,0,ai,cn,659737,.6).setOrigin(0));const c=this.scene.add.graphics();Pt(c,w,R,660,440),b.add(c),this.titleText=this.scene.add.text(ai/2,R+32,"",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5),b.add(this.titleText),this.body=this.scene.add.text(w+44,R+76,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textMain,lineSpacing:11}).setOrigin(0,0),b.add(this.body),this.pageText=this.scene.add.text(ai/2,R+440-24,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5),b.add(this.pageText),this.c=b,this.render()}turn(N){this.pageIdx=(this.pageIdx+N+this.pages.length)%this.pages.length,this.render()}close(){var N;(N=this.c)==null||N.destroy(!0),this.c=void 0,this.onClose()}render(){var C,w,R;const N=this.pages[this.pageIdx];(C=this.titleText)==null||C.setText(`— ${N.title} —`),(w=this.body)==null||w.setText(N.lines.join(`
6377`)),(R=this.pageText)==null||R.setText(`← → 翻页 · Esc 合上      ${this.pageIdx+1} / ${this.pages.length}`)}}const At=1280,zt=720,de=7168,ce=4096,Ht=512,Vt=128,He={grass:[0,1,2,21],water:[4,5],shore:{N:8,E:9,S:10,W:11,NE:13,SE:15,SW:14,NW:12}},oi=2,ie=8,Ke=720,Je=2048,Pi=560,Ri=2180,Ui=[1,1.2,1.45],zi=[900,600,350],Vi=[140,200,280],Xi=[115,130,150],vn={body:{name:"体魄丹",desc:["最大生命 +1(3→4)","最大生命 +1(4→5)"]},move:{name:"身法丹",desc:["移动速度 +20%(240→288)","移动速度 +45%(→348)"]},dash:{name:"御气丹",desc:["冲刺 CD 900→600ms","冲刺 CD →350ms"]},atk:{name:"锋芒丹",desc:["锁定 140→200 · 挥击 115→130","锁定 →280 · 挥击 →150"]}},hi=["body","move","dash","atk"],pa=($,N,C)=>{switch($){case"body":return`最大生命 ${yt.player.maxHearts+N}→${yt.player.maxHearts+C}`;case"move":return`移速 ${Math.round(yt.player.moveSpeed*Ui[N])}→${Math.round(yt.player.moveSpeed*Ui[C])}`;case"dash":return`冲刺 CD ${zi[N]}→${zi[C]}ms`;case"atk":return`锁定 ${Vi[N]}→${Vi[C]} · 挥击 ${Xi[N]}→${Xi[C]}`}},li=[{wood:4,peach:1,hearts:1},{wood:8,peach:2,hearts:2}],ma=[{title:"基本操作",lines:["WASD / 方向键 ····· 移动(跟随视角方向)","Space ·········· 跳动(短暂无敌,可躲攻击)","Shift ·········· 冲刺(按住自动连发;MAX 难度耗体力)","Q / E ·········· 旋转视角(地图跟随)","F ············ 采集 / 拾取 / 开炼丹炉","J ············ 近战挥击(自动锁定最近的怪)","B ············ 建造(1 木桥 · 2 营火)","M ············ 缩略地图
6377(物产 / BOSS / 炉子标记)","Esc ··········· 菜单(暂停 / 重开 / 说明书 / 回主菜单)"]},{title:"世界玩法",lines:["桃树:F 砍 3 下 → 2 木头 + 掉一颗桃(F 拾取,回 1 心)","桃丛:F → 1 蟠桃(受伤时直接回 1 心)","枯树:砍光后 30 秒重新长满,可反复采集","木桥:3 木头,铺在水面上抄近路","营火:2 木头,站在旁边每 2 秒回 1 心","生存:3 颗心,受击扣 1 心(1 秒无敌);","      心尽从入口重生(满血,进度保留)"]},{title:"仙丹系统",lines:["炼丹炉在出生点斜后方,靠近按 F 开炉","材料:木头 + 蟠桃,或扣心(至少留 1 心)","  L1 = 4木+1桃 或 1心 · L2 = 8木+2桃 或 2心","体魄丹:最大生命 +1(升级时回 1 心)","身法丹:移动速度 +20% / +45%","御气丹:冲刺 CD 900 → 600 → 350ms","锋芒丹:锁定 140→200→280,挥击 115→130→150","每条线 2 级,升级永久保存(含读档)"]},{title:"目标与敌人",lines:["盘丝小蛛:闲逛,靠近后追击,接触扣 1 心","蟠桃蟾王(关底 BOSS,岛东侧):","  扑咬冲锋 / 吐丝三连弹 / 召唤小蛛 三招循环","  前摇蓄力时闪红——看清招式再躲","  贴脸时不会冲锋,大胆近身输出","击败蟾王后开启传送门,走进去过关","提示:打不过就先回炉炼几颗丹"]}],ne=6400,ee=2048,ga=new URL(""+new URL("toad_king_sheet-Cjd31TKq.png",import.meta.url).href,import.meta.url).href,It=5e3,xa=.55,Ze=200,ya=20,Ta=$=>20+$*10,Sa=st.Math.DegToRad(15),Ca=90,Nn=-Math.hypot(de,ce)-100,pn=Nn+1,mn={td_idle:.89,td_walk:.82,td_attack:.83,td_hurt:.8,td_dead:.61,td_hop:.95,td_dash:.6},yt={player:{moveSpeed:240,dashSpeed:520,dashMs:180,hopMs:340,hopHeight:30,kbSpeed:240,kbMs:180,invulnMs:1e3,respawnInvulnMs:1500,maxHearts:3},combat:{attackCdMs:320,hitDot:.2,swipeMs:140,crawlerHitRange:34,queenHitRange:44,webTtlMs:3e3,webHitRange:26},ai:{crawlerActive:1100},harvest:{range:84,treeHits:3,treeWood:2},portal:{enterRange:44}},Oe={bridge:3,campfire:2},ue=64,Ea=90,Ma=2e3,Aa=3e4,wi=[[1350,1740],[1700,2360],[2250,1200],[2700,2820],[3250,1700],[3720,1120],[4200,3e3],[4680,1850],[5200,2680],[5700,1500]];class Pa extends st.Scene{constructor(){super("level2");H(this,"player");H(this,"playerShadow");H(this,"camAnchor");H(this,"animLocked",!1);H(this,"currentAnimKey","");H(this,"keys");H(this,"cursors");H(this,"px",Ke);H(this,"py",Je);H(this,"facing",{x:1,y:0});H(this,"hopT",0);H(this,"dashT",0);H(this,"dashCdAt",0);H(this,"maxMode",!1);H(this,"stamina",Ze);H(this,"dashTier",0);H(this,"staminaFill");H(this,"staminaLabel");H(this,"staminaBg");H(this,"staminaFlashT",0);H(this,"hudPanel");H(this,"invulnT",0);H(this,"kb",{x:0,y:0,t:0});H(this,"attackAt",0);H(this,"hearts",yt.player.maxHearts);H(this,"deaths",0);H(this,"wood",0);H(this,"peach",0);H(this,"god",!1);H(this,"cleared",!1);H(this,"entering",!1);H(this,"exitOpen",!1);H(this,"resources",[]);H(this,"crawlers",[]);H(this,"queen");H(this,"webs",[]);H(this,"bossBar");H(this,"hudText");H(this,"portal");H(this,"terrainChunks",new Map);H(this,"activeChunkKeys",new Set);H(this,"objectiveText");H(this,"buildOpen",!1);H(this,"bridges",[]);H(this,"campfires",[]);H(this,"buildHint");H(this,"peachDrops",[]);H(this,"mapOpen",!1);H(this,"mapContainer");H(this,"mapCard");H(this,"mapPlayerMark");H(this,"mapFurnaceIcon");H(this,"mapScale",{s:0,ox:0,oy:0});H(this,"worldLayer");H(this,"viewYaw",0);H(this,"worldRot",0);H(this,"turnCdAt",0);H(this,"portalHolder",{});H(this,"furnace");H(this,"furnaceShadow");H(this,"furnaceHolder",{});H(this,"brewing",!1);H(this,"furnaceHint");H(this,"elixirLevels",{});H(this,"elixirMenuOpen",!1);H(this,"elixirSel",0);H(this,"elixirMenu");H(this,"elixirMenuWarn");H(this,"guideOpen",!1);H(this,"guide");H(this,"pauseOpen",!1);H(this,"pauseContainer");H(this,"saveFlash");H(this,"pendingSnapshot");H(this,"lastSave",0);H(this,"saveHandler",()=>this.saveNow());H(this,"blurHandler",()=>{var C;return(C=this.input.keyboard)==null?void 0:C.resetKeys()})}
6377elixirLevel(C){return this.elixirLevels[C]??0}get maxHeartsEff(){return yt.player.maxHearts+this.elixirLevel("body")}get moveSpeedEff(){return yt.player.moveSpeed*Ui[this.elixirLevel("move")]}get dashCdEff(){return zi[this.elixirLevel("dash")]}get lockRangeEff(){return Vi[this.elixirLevel("atk")]}get hitRangeEff(){return Xi[this.elixirLevel("atk")]}init(C){var w;this.pendingSnapshot=((w=C==null?void 0:C.snapshot)==null?void 0:w.level)===2?C==null?void 0:C.snapshot:void 0,this.px=Ke,this.py=Je,this.facing={x:1,y:0},this.hopT=0,this.dashT=0,this.dashCdAt=0,this.stamina=Ze,this.dashTier=0,this.staminaFill=void 0,this.staminaLabel=void 0,this.staminaBg=void 0,this.hudPanel=void 0,this.staminaFlashT=0,this.invulnT=0,this.kb={x:0,y:0,t:0},this.attackAt=0,this.hearts=yt.player.maxHearts,this.deaths=0,this.wood=0,this.peach=0,this.cleared=!1,this.entering=!1,this.exitOpen=!1,this.resources=[],this.crawlers=[],this.webs=[],this.portal=void 0,this.terrainChunks=new Map,this.activeChunkKeys=new Set,this.buildOpen=!1,this.bridges=[],this.campfires=[],this.peachDrops=[],this.lastSave=0,this.animLocked=!1,this.currentAnimKey="",this.mapOpen=!1,this.mapContainer=void 0,this.mapCard=void 0,this.mapPlayerMark=void 0,this.mapFurnaceIcon=void 0,this.viewYaw=0,this.worldRot=0,this.turnCdAt=0,this.portalHolder={},this.furnaceHolder={},this.brewing=!1,this.furnaceHint=void 0,this.elixirLevels={},this.elixirMenuOpen=!1,this.elixirSel=0,this.elixirMenu=void 0,this.elixirMenuWarn=void 0,this.guideOpen=!1,this.guide=void 0,this.pauseOpen=!1,this.pauseContainer=void 0}preload(){const C=(b,c)=>{this.textures.exists(b)||this.load.image(b,new URL(Object.assign({"../assets/sprites/boar/hurt.png":Ws,"../assets/sprites/boar/idle.png":Hs,"../assets/sprites/boar/jump.png":Ks,"../assets/sprites/boar/run.png":Js,"../assets/sprites/boar/spin.png":Zs})[`../assets/sprites/boar/${c}`],import.meta.url).href)};C("boar_idle","idle.png"),C("boar_run","run.png"),C("boar_jump","jump.png"),C("boar_hurt","hurt.png");const w={idle:4,walk:6,attack:4,hurt:2,dead:2,hop:1,dash:1};for(const[b,c]of Object.entries(w))for(let x=1;x<=c;x++){const t=`td_${b}_${String(x).padStart(2,"0")}`;this.textures.exists(t)||this.load.image(t,new URL(Object.assign({"../assets/sprites/boar_td/attack_01.png":Rr,"../assets/sprites/boar_td/attack_02.png":wr,"../assets/sprites/boar_td/attack_03.png":Fr,"../assets/sprites/boar_td/attack_04.png":Lr,"../assets/sprites/boar_td/boar_td_master_sheet.png":Or,"../assets/sprites/boar_td/dash_01.png":Dr,"../assets/sprites/boar_td/dead_01.png":br,"../assets/sprites/boar_td/dead_02.png":Br,"../assets/sprites/boar_td/hop_01.png":Ir,"../assets/sprites/boar_td/hurt_01.png":Gr,"../assets/sprites/boar_td/hurt_02.png":Nr,"../assets/sprites/boar_td/idle_01.png":Ur,"../assets/sprites/boar_td/idle_02.png":zr,"../assets/sprites/boar_td/idle_03.png":Vr,"../assets/sprites/boar_td/idle_04.png":Xr,"../assets/sprites/boar_td/walk_01.png":Yr,"../assets/sprites/boar_td/walk_02.png":Wr,"../assets/sprites/boar_td/walk_03.png":Hr,"../assets/sprites/boar_td/walk_04.png":Kr,"../assets/sprites/boar_td/walk_05.png":Jr,"../assets/sprites/boar_td/walk_06.png":Zr})[`../assets/sprites/boar_td/${b}_${String(x).padStart(2,"0")}.png`],import.meta.url).href)}this.textures.exists("spider_queen")||this.load.spritesheet("spider_queen",ga,{frameWidth:384,frameHeight:341,endFrame:11}),this.textures.exists("terrain_sheet")||this.load.spritesheet("terrain_sheet",new URL(""+new URL("terrain_sheet-Baw4eqXp.png",import.meta.url).href,import.meta.url).href,{frameWidth:248,frameHeight:248}),this.textures.exists("furnace_sheet")||this.load.spritesheet("furnace_sheet",new URL(""+new URL("furnace_sheet-DXW0sNAh.png",import.meta.url).href,import.meta.url).href,{frameWidth:320,frameHeight:400});const R=(b,c)=>{this.textures.exists(b)||this.load.image(b,new URL(Object.assign({"../assets/level2/furnace_sheet.png":Qr,"../assets/level2/peach_bare.png":jr,"../assets/level2/peach_tree.png":$r,"../assets/level2/peach_tree_0.png":kr,"../assets/level2/peach_tree_1.png":qr,"../assets/level2/peach_tree_2.png":_r,"../assets/level2/spider_00.png":ta,"../assets/level2/spider_01.png":ea,"../assets/level2/spider_02.png":ia,"../assets/level2/spider_03.png":sa,"../assets/level2/spider_04.png":na,"../assets/level2/spider_05.png":ra,"../assets/level2/spider_06.png":aa,"../assets/level2/spider_07.png":oa,"../assets/level2/terrain_sheet.png":ha,"../assets/level2/well.png":la})[`../assets/level2/${c}`],import.meta.url).href)};for(let b=0;b<8;b++)R(`spider_${String(b).padStart(2,"0")}`,`spider_${String(b).padStart(2,"0")}.png`);for(let b=0;b<3;b++)R(`peach_tree_${b}`,`peach_tree_${b}.png`);R("peach_bare","peach_bare.png")}create(){this.god=se(),this.makeTextures(),this.buildWorld(),this.worldLayer=this.add.container(0,0);
6377const C=this.input.keyboard;C.addCapture([st.Input.Keyboard.KeyCodes.SPACE,st.Input.Keyboard.KeyCodes.UP,st.Input.Keyboard.KeyCodes.DOWN,st.Input.Keyboard.KeyCodes.SHIFT]),this.cursors=C.createCursorKeys(),this.keys={w:C.addKey(st.Input.Keyboard.KeyCodes.W),a:C.addKey(st.Input.Keyboard.KeyCodes.A),s:C.addKey(st.Input.Keyboard.KeyCodes.S),d:C.addKey(st.Input.Keyboard.KeyCodes.D),f:C.addKey(st.Input.Keyboard.KeyCodes.F),j:C.addKey(st.Input.Keyboard.KeyCodes.J),q:C.addKey(st.Input.Keyboard.KeyCodes.Q),e:C.addKey(st.Input.Keyboard.KeyCodes.E),space:C.addKey(st.Input.Keyboard.KeyCodes.SPACE),shift:C.addKey(st.Input.Keyboard.KeyCodes.SHIFT)},C.on("keydown-M",()=>{if(this.cleared){this.saveNow(),this.scene.start("menu");return}this.toggleMap()}),C.on("keydown-ESC",()=>{this.guideOpen?this.closeGuide():this.elixirMenuOpen?this.closeElixirMenu():this.mapOpen?this.toggleMap():this.togglePause()}),C.on("keydown-LEFT",()=>{var t;this.guideOpen&&((t=this.guide)==null||t.turn(-1))}),C.on("keydown-RIGHT",()=>{var t;this.guideOpen&&((t=this.guide)==null||t.turn(1))}),C.on("keydown-UP",()=>{this.elixirMenuOpen&&this.moveElixirSel(-1)}),C.on("keydown-DOWN",()=>{this.elixirMenuOpen&&this.moveElixirSel(1)}),C.on("keydown-ENTER",()=>{this.elixirMenuOpen&&this.tryBrew(!1)}),C.on("keydown-H",()=>{this.elixirMenuOpen&&this.tryBrew(!0)}),C.on("keydown-R",()=>{this.pauseOpen&&this.scene.restart()}),C.on("keydown-Q",()=>{this.pauseOpen&&(this.saveNow(),this.scene.start("menu"))}),C.on("keydown-S",()=>{this.pauseOpen&&this.manualSave()}),C.on("keydown-G",()=>{this.pauseOpen&&(this.togglePause(),this.openGuide())}),C.on("keydown-B",()=>{!this.pauseOpen&&!this.mapOpen&&!this.cleared&&this.toggleBuild()}),C.on("keydown-ONE",()=>{!this.pauseOpen&&!this.mapOpen&&!this.cleared&&this.placeBridge()}),C.on("keydown-TWO",()=>{!this.pauseOpen&&!this.mapOpen&&!this.cleared&&this.placeCampfire()}),this.playerShadow=this.addToWorld(this.add.image(this.px,this.py+4,"td_shadow").setDepth(this.py-1)),this.player=this.addToWorld(this.add.sprite(this.px,this.py,"td_idle_01").setOrigin(.5,mn.td_idle).setDepth(this.py).setScale(xa)),this.ensureBoarAnims(),this.playAnim("td_idle");const w=this.onIsland(Pi,Ri)?Pi:Ke-160,R=this.onIsland(Pi,Ri)?Ri:Je;this.furnaceShadow=this.addToWorld(this.add.image(w,R+10,"td_shadow").setDepth(R-1).setScale(1.6,1)),this.furnace=this.addToWorld(this.add.sprite(w,R,"furnace_sheet",0).setOrigin(.5,.92).setDepth(R).setScale(.3)),this.ensureFurnaceAnims(),this.furnace.play("furnace_idle"),this.seedResources();for(const[t,o]of wi)this.crawlers.push(new dn(this,t,o,(p,a)=>this.onLandVisible(p,a),this.worldLayer));this.queen=new ca(this,ne,ee,(t,o)=>this.onLandVisible(t,o),(t,o,p,a)=>this.spawnWeb(t,o,p,a),(t,o)=>this.spawnQueenCrawler(t,o),()=>this.crawlers.filter(t=>t.alive&&Math.hypot(t.x-ne,t.y-ee)<900).length,this.worldLayer),this.queen.sprite.setScale(.54),this.queen.shadow.setScale(4.2,2),this.bossBar=new gi(this,"蟠桃蟾王"),this.setBossBarScrollFactor(0),this.bossBar.setVisible(!1),this.hudPanel=this.add.graphics().setDepth(It).setScrollFactor(0),Pt(this.hudPanel,16,16,500,40),this.hudText=this.add.text(32,26,"",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setDepth(It).setScrollFactor(0),this.updateHud(),this.maxMode=js(),this.maxMode&&(this.staminaLabel=this.add.text(32,64,"体力",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setDepth(It).setScrollFactor(0),this.staminaBg=this.add.rectangle(76,74,164,12,659737,.75).setOrigin(0,.5).setDepth(It).setScrollFactor(0),this.staminaFill=this.add.rectangle(78,74,160,8,7327595).setOrigin(0,.5).setDepth(It).setScrollFactor(0)),this.objectiveText=this.add.text(At-24,28,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(1,0).setDepth(It).setScrollFactor(0);const b=()=>this.layoutHud();this.scale.on("resize",b),this.events.once(st.Scenes.Events.SHUTDOWN,()=>this.scale.off("resize",b)),this.layoutHud(),this.buildHint=this.add.text(At/2,zt-40,"",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm}).setOrigin(.5).setDepth(It).setScrollFactor(0).setVisible(!1),this.furnaceHint=this.add.text(At/2,zt-40,"F 炼丹",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm}).setOrigin(.5).setDepth(It).setScrollFactor(0).setVisible(!1);const c=this.add.text(At/2,124,"WASD 移动 · Space 跳动 · Shift 冲刺 · Q/E 转视角 · F 采集 · J 近战挥击(自动锁定最近的怪)· 穿越大陆击败蟠桃蟾王",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5).setDepth(It).setScrollFactor(0);this.tweens.add({targets:c,alpha:0,delay:8e3,duration:800,onComplete:()=>c.destroy()});const x=this.cameras.main;x.setRotation(0),this.camAnchor=this.add.zone(this.px,this.py,2,2),x.setBounds(0,0,de,ce).startFollow(this.camAnchor,!1,.12,.12),x.centerOn(this.px,this.py),this.updateTerrainChunks(!0),window.addEventListener("pagehide",this.saveHandler),this.events.once(st.Scenes.Events.SHUTDOWN,(
6377)=>window.removeEventListener("pagehide",this.saveHandler)),this.blurHandler=()=>{var t;return(t=this.input.keyboard)==null?void 0:t.resetKeys()},window.addEventListener("blur",this.blurHandler),document.addEventListener("visibilitychange",this.blurHandler),this.events.once(st.Scenes.Events.SHUTDOWN,()=>{window.removeEventListener("blur",this.blurHandler),document.removeEventListener("visibilitychange",this.blurHandler)}),this.pendingSnapshot?(this.applyLevel2Save(this.pendingSnapshot),this.pendingSnapshot=void 0):localStorage.getItem("yyvschili.guide2seen")||(localStorage.setItem("yyvschili.guide2seen","1"),this.openGuide())}update(C,w){var p,a;if(this.cleared||this.entering||this.pauseOpen)return;if(this.mapOpen){if(st.Input.Keyboard.JustDown(this.keys.q)&&this.rotateView(-1),st.Input.Keyboard.JustDown(this.keys.e)&&this.rotateView(1),(p=this.mapCard)==null||p.setRotation(this.worldRot),(a=this.mapFurnaceIcon)==null||a.setRotation(-this.worldRot),this.mapPlayerMark){const{s:n,ox:r,oy:e}=this.mapScale,s=r+this.px*n-At/2,h=e+this.py*n-zt/2,i=this.mapPlayerMark;i.clear(),i.lineStyle(2,16777215,1).strokeCircle(s,h,8);const l=Math.atan2(this.facing.y,this.facing.x);i.fillStyle(16764779,1).fillTriangle(s+Math.cos(l)*10,h+Math.sin(l)*10,s+Math.cos(l+2.4)*6,h+Math.sin(l+2.4)*6,s+Math.cos(l-2.4)*6,h+Math.sin(l-2.4)*6)}return}if(this.hopT=Math.max(0,this.hopT-w),this.dashT=Math.max(0,this.dashT-w),this.invulnT=Math.max(0,this.invulnT-w),this.kb.t=Math.max(0,this.kb.t-w),this.updateStamina(w),this.elixirMenuOpen||this.guideOpen)return;C-this.lastSave>2e3&&(this.lastSave=C,this.saveNow()),this.updateMovement(C,w),this.updateTerrainChunks(),this.updateCombat(C),this.updateHarvest(),this.updateFurnaceHint(),this.updateCampfires(C),this.updateRegrow(C);for(const n of this.crawlers)Math.hypot(n.x-this.px,n.y-this.py)<yt.ai.crawlerActive&&n.update(C,w,this.playerPoint(),this.worldRot);const R=Math.hypot(this.queen.x-this.px,this.queen.y-this.py),b=this.queen.x-this.px,c=this.queen.y-this.py,x=b*Math.cos(this.worldRot)-c*Math.sin(this.worldRot),t=b*Math.sin(this.worldRot)+c*Math.cos(this.worldRot),o=Math.abs(x)<At/2+120&&Math.abs(t)<zt/2+120;if(this.bossBar.setVisible(o&&this.queen.alive),o&&this.queen.update(C,w,this.playerPoint(),this.worldRot),this.animateQueen(C),this.updateWebs(w),this.updateCollisions(),this.applyViewTransform(),this.bossBar.update(C,w,Math.max(0,this.queen.hp),Ni,1,1,this.queen.alive?"—":"已击败"),this.objectiveText.setText(this.queen.alive?`蟠桃蟾王  → ${Math.ceil(R/100)}m`:"传送门已开启"),this.queen.alive===!1&&!this.exitOpen&&this.openExit(),this.exitOpen&&this.portal){const n=this.px-ne,r=this.py-ee;Math.hypot(n,r)<yt.portal.enterRange&&this.enterPortal()}}playerPoint(){return{x:this.px,y:this.py}}walkable(C,w){return this.onLandVisible(C,w)||this.onBridge(C,w)}onLandVisible(C,w){const R=Vt,b=Math.floor(C/R),c=Math.floor(w/R),x=b*R,t=c*R;if(!this.onIsland(x+R/2,t+R/2))return!1;const o=!this.onIsland(x+R/2,t-R/2),p=!this.onIsland(x+R*1.5,t+R/2),a=!this.onIsland(x+R/2,t+R*1.5),n=!this.onIsland(x-R/2,t+R/2),r=C-x,e=w-t;return!(o&&e<R/2||a&&e>R/2||n&&r<R/2||p&&r>R/2)}onBridge(C,w){return this.bridges.some(R=>Math.abs(C-R.x)<ue/2&&Math.abs(w-R.y)<ue/2)}toggleBuild(){this.buildOpen=!this.buildOpen,this.refreshBuildHint()}refreshBuildHint(C){if(!this.buildOpen){this.buildHint.setVisible(!1);return}this.buildHint.setText(C??`[1] 木桥 ${Oe.bridge} 木头   [2] 营火 ${Oe.campfire} 木头   [B] 关闭   (当前 ${this.wood} 木头)`).setVisible(!0)}placeBridge(){if(!this.buildOpen)return;if(this.wood<Oe.bridge)return this.refreshBuildHint("木头不足(木桥需要 3)");const C=Math.floor(this.px/ue)*ue+ue/2,w=Math.floor(this.py/ue)*ue+ue/2;if(this.onIsland(C,w))return this.refreshBuildHint("木桥只能铺在水面");if(this.onBridge(C,w))return this.refreshBuildHint("这里已经有桥了");this.wood-=Oe.bridge,this.updateHud();const R=this.addToWorld(this.add.image(C,w,"plank").setDepth(pn));this.bridges.push({x:C,y:w,sprite:R}),this.refreshBuildHint("木桥铺设完成")}placeCampfire(){if(!this.buildOpen)return;if(this.wood<Oe.campfire)return this.refreshBuildHint("木头不足(营火需要 2)");if(!this.onIsland(this.px,this.py))return this.refreshBuildHint("营火只能放在陆地上");this.wood-=Oe.campfire,this.updateHud();const C=this.addToWorld(this.add.image(this.px,this.py,"campfire").setDepth(this.py-1).setOrigin(.5,.8));this.tweens.add({targets:C,alpha:.75,duration:260,yoyo:!0,repeat:-1}),this.campfires.push({x:this.px,y:this.py,sprite:C,healAt:0}),this.refreshBuildHint("营火已点燃:站在旁边可回血")}updateRegrow(C){for(const w of this.resources)w.regrowAt===void 0||C<w.regrowAt||(w.hits=yt.harvest.treeHits,w.regrowAt=void 0,w.sprite&&(w.sprite.setTexture(`peach_tree_${w.variant??0}`).setAlpha(1),w.sprite.setScale(.08),this.tweens.add({targets:w.sprite,scaleX:.42,scaleY:.42,duration:900,ease:"Back.out"})))}updateCampfires(C){for(const w of this.campfires){if(this.hearts>=this.maxHeartsEff)return;C<w.healAt||Math.hypot(w.x-this.px,w.y-this.py)<Ea&&(this.hearts++,this.updateHud(),w.healAt=C+Ma)}}togglePause(){var o;if(this.pauseOpen=!this.pauseOpen,!this.pauseOpen){(o=this.pauseContainer)==null||o.destroy(!0),this.pauseContainer=void 0,this.saveFlash=void 0;return}const C=420,w=424,R=(At-C)/2,b=(zt-w)/2,c=this.add.container(0,0).setDepth(It+1).setScrollFactor(0);c.add(this.add.rectangle(0,0,At,zt,659737,.55).setOrigin(0));const x=this.add.graphics();Pt(x,R,b,C,w),c.add(x),c.add(this.add.text(At/2,b+24,"— 暂停 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5).setScrollFactor(0)),[["继续游戏","Esc",()=>this.togglePause()],["保存进度","S",()=>this.manualSave()],["重开本关","R",()=>this.scene.restart()],["说明书","G",()=>{this.togglePause(),this.openGuide()}],["返回主菜单","Q",()=>{this.saveNow(),this.scene.start("menu")}
6377]].forEach(([p,a,n],r)=>{const e=b+80+r*64,s=R+40,h=C-80,i=this.add.graphics();Pt(i,s,e,h,48),c.add(i),c.add(this.add.text(s+24,e+24,p,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(0,.5).setScrollFactor(0)),c.add(this.add.text(s+h-24,e+24,`[${a}]`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(1,.5).setScrollFactor(0));const l=this.add.zone(s+h/2,e+24,h,48).setInteractive({useHandCursor:!0}).setScrollFactor(0);l.on("pointerdown",n),c.add(l)}),this.saveFlash=this.add.text(At/2,b+w-26,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5).setScrollFactor(0),c.add(this.saveFlash),this.pauseContainer=c}manualSave(){this.saveNow(),this.saveFlash&&(this.saveFlash.setText("已保存 ✓"),this.time.delayedCall(1200,()=>{var C;return(C=this.saveFlash)==null?void 0:C.setText("")}))}toggleMap(){var e;if(this.mapOpen=!this.mapOpen,!this.mapOpen){(e=this.mapContainer)==null||e.destroy(!0),this.mapContainer=void 0,this.mapCard=void 0,this.mapPlayerMark=void 0,this.mapFurnaceIcon=void 0;return}const w=Math.min(460/de,270/ce),R=(At-de*w)/2,b=(zt-ce*w)/2;this.mapScale={s:w,ox:R,oy:b};const c=this.add.container(0,0).setDepth(It).setScrollFactor(0);c.add(this.add.rectangle(0,0,At,zt,659737,.55).setOrigin(0));const x=this.add.container(At/2,zt/2).setRotation(this.worldRot),t=-At/2,o=-zt/2,p=this.add.graphics();Pt(p,R-10+t,b-10+o,de*w+20,ce*w+20),x.add(p);const a=this.add.graphics(),n=96;for(let s=0;s<ce;s+=n)for(let h=0;h<de;h+=n)a.fillStyle(this.onIsland(h+n/2,s+n/2)?4886328:2382474,1),a.fillRect(R+h*w+t,b+s*w+o,n*w+1,n*w+1);x.add(a);const r=this.add.graphics();for(const s of this.resources)s.hits<=0||(r.fillStyle(s.kind==="tree"?14196816:16752324,1),r.fillCircle(R+s.x*w+t,b+s.y*w+o,s.kind==="tree"?3:2.5));if(x.add(r),this.queen.alive){const s=this.add.graphics();s.fillStyle(16724821,1).fillCircle(R+this.queen.x*w+t,b+this.queen.y*w+o,5),s.lineStyle(2,16777215,.8).strokeCircle(R+this.queen.x*w+t,b+this.queen.y*w+o,8),x.add(s)}this.mapFurnaceIcon=this.add.image(R+this.furnace.x*w+t,b+this.furnace.y*w+o,"furnace_sheet",0).setScale(.05).setRotation(-this.worldRot),x.add(this.mapFurnaceIcon),this.mapPlayerMark=this.add.graphics(),x.add(this.mapPlayerMark),this.mapCard=x,c.add(x),c.add(this.add.text(R,b-34,"地图 [M 关闭] · Q/E 旋转 · 橙=桃树 粉=桃丛 红=蟠桃蟾王 炉=炼丹炉 黄箭头=你的位置与朝向",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textMain}).setScrollFactor(0)),this.mapContainer=c}animateQueen(C){if(!this.queen.sprite.active)return;if(!this.queen.alive){this.queen.sprite.setFrame(7);return}const w=this.queen.state;let R=[0,1,2,1],b=360;w==="telegraph"?(R=[6,10,11,10],b=120):w==="charge"&&(R=[5,8,9,8],b=90),this.queen.sprite.setFrame(R[Math.floor(C/b)%R.length])}onIsland(C,w){if(C<180||C>de-180)return!1;const R=390+Math.sin(C/430)*105+Math.sin(C/170)*38,b=ce-390+Math.sin(C/510+1.4)*115+Math.sin(C/220)*42;return w<R||w>b?!1:![[2250,1900,260,430],[3920,2520,390,250],[5150,1250,320,230]].some(([x,t,o,p])=>((C-x)/o)**2+((w-t)/p)**2<1)}ensureFurnaceAnims(){const C=this.anims,w=(R,b,c,x)=>{C.exists(R)||C.create({key:R,frames:C.generateFrameNumbers("furnace_sheet",{frames:b}),frameRate:c,repeat:x})};w("furnace_idle",[0],1,0),w("furnace_pour",[3,4],4,0),w("furnace_brew",[8,9],4,-1),w("furnace_done",[10,11,2],4,0)}ensureBoarAnims(){const C=this.anims,w=(R,b,c,x,t)=>{C.exists(R)||C.create({key:R,frames:Array.from({length:c},(o,p)=>({key:`td_${b}_${String(p+1).padStart(2,"0")}`})),frameRate:x,repeat:t})};w("td_idle","idle",4,5,-1),w("td_walk","walk",6,10,-1),w("td_attack","attack",4,12,0),w("td_hurt","hurt",2,8,0),w("td_dead","dead",2,6,0),w("td_hop","hop",1,1,0),w("td_dash","dash",1,1,0)}playAnim(C,w=!1,R=!1){R&&(this.animLocked=!1),!this.animLocked&&this.currentAnimKey!==C&&(this.currentAnimKey=C,this.player.setOrigin(.5,mn[C]??.85),this.player.play(C,!0),w&&(this.animLocked=!0,this.player.once(st.Animations.Events.ANIMATION_COMPLETE,()=>{this.animLocked=!1,this.currentAnimKey=""})))}updateStamina(C){this.maxMode&&(this.stamina=Math.min(Ze,this.stamina+ya*C/1e3),this.stamina>=Ze&&(this.dashTier=0),this.staminaFlashT=Math.max(0,this.staminaFlashT-C),this.staminaFill&&(this.staminaFill.scaleX=this.stamina/Ze,this.staminaFill.fillColor=this.staminaFlashT>0?14701138:7327595))}
6377trySpendStamina(){if(!this.maxMode)return!0;const C=Ta(this.dashTier);return this.stamina>=C?(this.stamina-=C,this.dashTier++,!0):(this.staminaFlashT=450,!1)}updateMovement(C,w){const R=this.keys;st.Input.Keyboard.JustDown(R.q)&&this.rotateView(-1),st.Input.Keyboard.JustDown(R.e)&&this.rotateView(1);let b=(R.d.isDown||this.cursors.right.isDown?1:0)-(R.a.isDown||this.cursors.left.isDown?1:0),c=(R.s.isDown||this.cursors.down.isDown?1:0)-(R.w.isDown||this.cursors.up.isDown?1:0);if(b||c){const h=-this.worldRot,i=b*Math.cos(h)-c*Math.sin(h),l=b*Math.sin(h)+c*Math.cos(h);b=i,c=l}R.shift.isDown&&C>this.dashCdAt&&this.dashT<=0&&this.trySpendStamina()&&(this.dashT=yt.player.dashMs,this.dashCdAt=C+this.dashCdEff),st.Input.Keyboard.JustDown(R.space)&&this.hopT<=0&&(this.hopT=yt.player.hopMs);let x=0,t=0;if(this.kb.t>0)x=this.kb.x*yt.player.kbSpeed,t=this.kb.y*yt.player.kbSpeed;else if(b||c){const h=Math.hypot(b,c);b/=h,c/=h,this.facing={x:b,y:c};const i=this.dashT>0?yt.player.dashSpeed:this.moveSpeedEff;x=b*i,t=c*i*.55}else this.dashT>0&&(x=this.facing.x*yt.player.dashSpeed,t=this.facing.y*yt.player.dashSpeed*.55);const o=this.px+x*w/1e3,p=this.py+t*w/1e3;this.walkable(o,p)?(this.px=o,this.py=p):(this.walkable(o,this.py)&&(this.px=o),this.walkable(this.px,p)&&(this.py=p));let a=0;this.hopT>0&&(a=Math.sin((yt.player.hopMs-this.hopT)/yt.player.hopMs*Math.PI)*yt.player.hopHeight);const n=this.worldRot,r=Math.cos(n),e=Math.sin(n);this.player.setPosition(this.px-a*e,this.py-a*r).setDepth(qt(this.px,this.py,n)),this.player.setRotation(-n),this.player.setFlipX(this.facing.x*r-this.facing.y*e>0);const s=this.hopT>0?"td_hop":this.dashT>0?"td_dash":x||t?"td_walk":"td_idle";this.playAnim(s),this.player.setAlpha(this.invulnT>0&&Math.floor(C/90)%2?.4:1),this.playerShadow.setPosition(this.px,this.py+4).setDepth(qt(this.px,this.py,n)-1),this.playerShadow.setScale(1-a/90),this.camAnchor.setPosition(this.px,this.py)}rotateView(C){this.time.now<this.turnCdAt||(this.turnCdAt=this.time.now+Ca,this.viewYaw+=C*Sa,this.worldRot=this.viewYaw,this.applyWorldRotation())}updateCombat(C){if(!this.keys.j.isDown||C<this.attackAt)return;this.attackAt=C+yt.combat.attackCdMs;const w=[...this.crawlers,...this.queen.alive?[this.queen]:[]];let R=null,b=this.lockRangeEff*this.lockRangeEff;for(const x of w){if(!x.alive)continue;const t=(x.x-this.px)**2+(x.y-this.py)**2;t<b&&(b=t,R=x)}if(R){const x=R.x-this.px,t=R.y-this.py,o=Math.hypot(x,t)||1;this.facing={x:x/o,y:t/o}}const c=this.addToWorld(this.add.image(this.px+this.facing.x*56,this.py-20+this.facing.y*26,"swipe").setDepth(this.py+1).setRotation(Math.atan2(this.facing.y,this.facing.x)));this.tweens.add({targets:c,alpha:0,scaleX:2.2,scaleY:2.2,duration:yt.combat.swipeMs,onComplete:()=>c.destroy()}),this.playAnim("td_attack",!0);for(const x of w){if(!x.alive)continue;const t=x.x-this.px,o=x.y-this.py,p=Math.hypot(t,o);if(p>this.hitRangeEff)continue;t/(p||1)*this.facing.x+o/(p||1)*this.facing.y>yt.combat.hitDot&&x.hit(1)}}updateHarvest(){var c,x,t,o;if(!st.Input.Keyboard.JustDown(this.keys.f))return;if(this.furnace&&Math.hypot(this.furnace.x-this.px,this.furnace.y-this.py)<80){this.openElixirMenu();return}let C=null,w=yt.harvest.range*yt.harvest.range;for(const p of this.peachDrops){const a=(p.x-this.px)**2+(p.y-this.py)**2;a<w&&(w=a,C=p)}if(C){this.peach++,this.hearts<this.maxHeartsEff&&this.hearts++;const p=this.addToWorld(this.add.image(C.x,C.y,"particle").setDepth(C.y+1).setTint(16752324).setScale(1.4));this.tweens.add({targets:p,alpha:0,y:p.y-24,duration:300,onComplete:()=>p.destroy()}),C.sprite.destroy(),this.peachDrops=this.peachDrops.filter(a=>a!==C),this.updateHud();return}let R=null,b=yt.harvest.range*yt.harvest.range;for(const p of this.resources){if(p.hits<=0)continue;const a=(p.x-this.px)**2+(p.y-this.py)**2;a<b&&(b=a,R=p)}if(R){R.hits--,R.sprite&&this.tweens.add({targets:R.sprite,x:R.x+4,duration:40,yoyo:!0,repeat:2});for(let p=0;p<3;p++){const a=this.addToWorld(this.add.image(R.x+st.Math.Between(-14,14),R.y-st.Math.Between(20,50),"particle").setDepth(R.y+1).setTint(14196816).setScale(1.8));this.tweens.add({targets:a,x:a.x+st.Math.Between(-24,24),y:a.y+st.Math.Between(10,30),alpha:0,duration:380,onComplete:()=>a.destroy()})}if(R.kind==="tree"&&R.hits>0){const p=this.addToWorld(this.add.text(R.x,R.y-100,`再砍 ${R.hits} 下`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5).setDepth(R.y+1).setRotation(-this.worldRot));this.tweens.add({targets:p,alpha:0,y:R.y-130,duration:650,onComplete:()=>p.destroy()})}R.kind==="tree"?R.hits<=0&&(this.wood+=yt.harvest.treeWood,(c=R.sprite)==null||c.setTexture("peach_bare"),(x=R.sprite)==null||x.setAlpha(.8),R.regrowAt=this.time.now+Aa,this.spawnPeachDrop(R.x,R.y-8),this.updateHud()):(this.peach++,this.hearts<this.maxHeartsEff&&this.hearts++,R.hits=0,(t=R.sprite)==null||t.destroy(),(o=R.shadow)==null||o.destroy(),R.sprite=void 0,R.shadow=void 0,this.updateHud())}}updateFurnaceHint(){if(!this.furnaceHint||!this.furnace)return;const C=Math.hypot(this.furnace.x-this.px,this.furnace.y-this.py)<80;this.furnaceHint.setVisible(C&&!this.buildOpen&&!this.brewing)}
6377openElixirMenu(){if(this.elixirMenuOpen||this.brewing)return;this.elixirMenuOpen=!0,this.elixirSel=0;const C=620,w=380,R=(At-C)/2,b=(zt-w)/2,c=this.add.container(0,0).setDepth(It+1).setScrollFactor(0);c.add(this.add.rectangle(0,0,At,zt,659737,.55).setOrigin(0));const x=this.add.graphics();Pt(x,R,b,C,w),c.add(x),c.add(this.add.text(At/2,b+26,"— 炼丹炉 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5)),c.add(this.add.text(At/2,b+w-24,"↑↓ 选择 · Enter 材料炼制 · H 扣心炼制 · Esc 关闭",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5)),this.elixirMenuWarn=this.add.text(At/2,b+w-48,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.danger}).setOrigin(.5),c.add(this.elixirMenuWarn),this.elixirMenu=c,this.refreshElixirMenu()}closeElixirMenu(){var C;this.elixirMenuOpen=!1,(C=this.elixirMenu)==null||C.destroy(!0),this.elixirMenu=void 0,this.elixirMenuWarn=void 0}refreshElixirMenu(){const C=this.elixirMenu;if(!C)return;for(;C.length>5;)C.remove(C.getAt(5),!0);const w=620,R=380,b=(At-w)/2,c=(zt-R)/2;hi.forEach((x,t)=>{const o=vn[x],p=this.elixirLevel(x),a=p>=2,n=c+64+t*64,r=this.add.graphics();Pt(r,b+30,n,w-60,52),t===this.elixirSel&&!a&&r.lineStyle(2,16764779,1).strokeRect(b+36,n+6,w-72,40),C.add(r);const e=a?Q.color.textDim:Q.color.textMain;C.add(this.add.text(b+48,n+26,`${o.name}  ${"◆".repeat(p)}${"◇".repeat(2-p)}`,{fontFamily:Q.font,fontSize:Q.size.md,color:e}).setOrigin(0,.5)),C.add(this.add.text(b+250,n+26,a?"已满级":o.desc[p],{fontFamily:Q.font,fontSize:Q.size.sm,color:a?Q.color.textDim:Q.color.textWarm}).setOrigin(0,.5));const s=a?"":`${li[p].wood}木+${li[p].peach}桃 / ${li[p].hearts}心`;C.add(this.add.text(b+w-48,n+26,s,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(1,.5))})}moveElixirSel(C){this.elixirSel=(this.elixirSel+C+hi.length)%hi.length,this.refreshElixirMenu()}tryBrew(C){const w=hi[this.elixirSel],R=this.elixirLevel(w);if(R>=2)return;const b=li[R];if(C){if(this.hearts-b.hearts<1)return this.warnElixir("心数不足(至少留 1 心)");this.hearts-=b.hearts}else{if(this.wood<b.wood||this.peach<b.peach)return this.warnElixir("材料不足");this.wood-=b.wood,this.peach-=b.peach}this.elixirLevels[w]=R+1,w==="body"&&this.hearts++,this.updateHud(),this.saveNow(),this.closeElixirMenu(),this.startBrew(w,R+1)}warnElixir(C){this.elixirMenuWarn&&(this.elixirMenuWarn.setText(C).setAlpha(1),this.tweens.add({targets:this.elixirMenuWarn,alpha:0,delay:900,duration:400}))}startBrew(C,w){this.brewing=!0,this.furnace.play("furnace_pour"),this.time.delayedCall(500,()=>this.furnace.play("furnace_brew")),this.time.delayedCall(1400,()=>this.furnace.play("furnace_done")),this.time.delayedCall(2200,()=>{this.furnace.play("furnace_idle"),this.brewing=!1,this.player.setTint(16764779),this.time.delayedCall(700,()=>this.player.clearTint());const R=this.addToWorld(this.add.container(this.px,this.py-16).setDepth(this.py+2)),b=this.add.graphics();b.lineStyle(3,16764779,1).strokeCircle(0,0,16),R.add(b),this.tweens.add({targets:R,scaleX:4.4,scaleY:4.4,alpha:0,duration:700,ease:"Quad.out",onComplete:()=>R.destroy()});for(let x=0;x<16;x++){const t=x/16*Math.PI*2,o=x%2===0,p=this.addToWorld(this.add.image(this.px,this.py-20,"particle").setTint(16764779).setScale(o?2.6:1.8).setDepth(this.py+1));this.tweens.add({targets:p,x:this.px+Math.cos(t)*(o?74:52),y:this.py-20+Math.sin(t)*(o?42:30),alpha:0,delay:o?0:120,duration:800,ease:"Sine.out",onComplete:()=>p.destroy()})}const c=this.add.text(At/2,130,`${vn[C].name}出炉!${pa(C,w-1,w)} · 永久生效`,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm}).setOrigin(.5).setDepth(It).setScrollFactor(0);this.tweens.add({targets:c,alpha:0,delay:2600,duration:600,onComplete:()=>c.destroy()})})}openGuide(){this.guideOpen||(this.guideOpen=!0,this.guide=new va(this,ma,()=>{this.guideOpen=!1,this.guide=void 0}),this.guide.open())}closeGuide(){var C;(C=this.guide)==null||C.close()}spawnPeachDrop(C,w,R=!1){const b=Math.random()<.5?-1:1,c=R?C:C+b*st.Math.Between(55,78),x=R?w:w+st.Math.Between(-6,14),t=this.addToWorld(this.add.image(C,w-30,"peach").setDepth(w).setScale(1.4));this.tweens.add({targets:t,x:c,duration:320,ease:"Quad.out"}),this.tweens.add({targets:t,y:x,duration:320,ease:"Bounce.out",onComplete:()=>this.tweens.add({targets:t,y:x-6,duration:700,yoyo:!0,repeat:-1,ease:"Sine.inOut"})}),this.peachDrops.push({x:c,y:x,sprite:t})}updateCollisions(){for(const C of this.crawlers)C.alive&&Math.hypot(C.x-this.px,C.y-this.py)<yt.combat.crawlerHitRange&&this.hitPlayer(C.x,C.y);this.queen.alive&&Math.hypot(this.queen.x-this.px,this.queen.y-this.py)<yt.combat.queenHitRange&&this.hitPlayer(this.queen.x,this.queen.y)}
6377hitPlayer(C,w){if(this.invulnT>0||this.hopT>0||this.god||this.cleared||this.hearts<=0)return;this.hearts--,this.updateHud(),this.invulnT=yt.player.invulnMs;const R=this.px-C,b=this.py-w,c=Math.hypot(R,b)||1;this.kb={x:R/c,y:b/c,t:yt.player.kbMs},this.cameras.main.shake(120,.004),this.hearts<=0?this.onDead():this.playAnim("td_hurt",!0)}onDead(){this.deaths++,this.playAnim("td_dead",!0),this.cameras.main.flash(300,255,60,60);for(let R=0;R<this.peach;R++)this.spawnPeachDrop(this.px,this.py);this.peach=0;const C=this.queen.alive&&Math.hypot(this.queen.x-this.px,this.queen.y-this.py)<900;if(this.queen.alive){this.queen.reset(ne,ee);for(const R of this.crawlers.splice(wi.length))R.sprite.destroy(),R.shadow.destroy();for(const R of this.webs)R.sprite.destroy();this.webs=[]}const w=()=>{if(this.pauseOpen){this.time.delayedCall(200,w);return}if(C){const R=ne-420;this.px=this.onIsland(R,ee)?R:Ke,this.py=this.onIsland(R,ee)?ee:Je}else this.px=Ke,this.py=Je;this.hearts=this.maxHeartsEff,this.invulnT=yt.player.respawnInvulnMs,this.playAnim("td_idle",!1,!0),this.updateHud()};this.time.delayedCall(500,w)}applyViewTransform(){var w;const C=this.worldRot;this.applyWorldRotation();for(const R of this.resources)R.sprite&&(R.sprite.setRotation(-C),this.setDepthHysteresis(R,R.sprite,R.shadow,qt(R.x,R.y,C)));for(const R of this.crawlers)R.syncView(C);this.queen.syncView(this.playerPoint(),C);for(const R of this.campfires)R.sprite.setRotation(-C),this.setDepthHysteresis(R,R.sprite,void 0,qt(R.x,R.y,C));(w=this.furnace)==null||w.setRotation(-C),this.furnace&&this.setDepthHysteresis(this.furnaceHolder,this.furnace,this.furnaceShadow,qt(this.furnace.x,this.furnace.y,C));for(const R of this.peachDrops)R.sprite.setRotation(-C).setDepth(qt(R.x,R.y,C));this.portal&&(this.portal.setRotation(-C),this.setDepthHysteresis(this.portalHolder,this.portal,void 0,qt(ne,ee,C))),this.worldLayer.sort("depth")}setDepthHysteresis(C,w,R,b){(C.lastDepth===void 0||Math.abs(b-C.lastDepth)>=8)&&(C.lastDepth=b,w.setDepth(b),R==null||R.setDepth(b-1))}applyWorldRotation(){const C=Math.cos(this.worldRot),w=Math.sin(this.worldRot);this.worldLayer.setPosition(this.px-(this.px*C-this.py*w),this.py-(this.px*w+this.py*C)).setRotation(this.worldRot),this.cameras.main.setRotation(0)}addToWorld(C){return this.worldLayer.add(C),C}spawnWeb(C,w,R,b){const c=this.addToWorld(this.add.image(C,w,"web").setDepth(w));this.webs.push({x:C,y:w,vx:R,vy:b,ttl:yt.combat.webTtlMs,sprite:c})}spawnQueenCrawler(C,w){this.crawlers.filter(b=>b.alive&&Math.hypot(b.x-ne,b.y-ee)<900).length<4&&this.crawlers.push(new dn(this,C,w,(b,c)=>this.onLandVisible(b,c),this.worldLayer))}updateWebs(C){for(let w=this.webs.length-1;w>=0;w--){const R=this.webs[w];R.x+=R.vx*C/1e3,R.y+=R.vy*C/1e3,R.ttl-=C,R.sprite.setPosition(R.x,R.y).setDepth(qt(R.x,R.y,this.worldRot)).setRotation(-this.worldRot);const b=Math.hypot(R.x-this.px,R.y-this.py)<yt.combat.webHitRange;if(b&&(this.hitPlayer(R.x,R.y),this.hearts<=0))return;(b||R.ttl<=0||!this.onIsland(R.x,R.y))&&(R.sprite.destroy(),this.webs.splice(w,1))}}saveNow(){this.queen&&_t.write({v:2,savedAt:Date.now(),elapsed:this.time.now,deaths:this.deaths,cleared:this.cleared,laserTipShown:!1,level:2,level2:{px:Math.round(this.px),py:Math.round(this.py),hearts:this.hearts,deaths:this.deaths,wood:this.wood,peach:this.peach,queenHp:this.queen.hp,queenX:Math.round(this.queen.x),queenY:Math.round(this.queen.y),queenAlive:this.queen.alive,cleared:this.cleared,elixirs:{...this.elixirLevels},resourceHits:Object.fromEntries(this.resources.map(C=>[C.id,C.hits])),resourceRegrow:Object.fromEntries(this.resources.filter(C=>C.regrowAt!==void 0).map(C=>[C.id,Math.max(0,Math.round(C.regrowAt-this.time.now))])),crawlerAlive:this.crawlers.slice(0,wi.length).map(C=>C.alive),bridges:this.bridges.map(C=>({x:C.x,y:C.y})),campfires:this.campfires.map(C=>({x:C.x,y:C.y})),drops:this.peachDrops.map(C=>({x:Math.round(C.x),y:Math.round(C.y)}))}})}applyLevel2Save(C){var R;const w=C.level2;if(w){this.px=w.px,this.py=w.py,this.elixirLevels={...w.elixirs??{}},this.hearts=w.hearts>0?w.hearts:this.maxHeartsEff,this.deaths=w.deaths,this.wood=w.wood,this.peach=w.peach;for(const b of this.resources){const c=w.resourceHits[b.id];c!==void 0&&(b.hits=c);const x=(R=w.resourceRegrow)==null?void 0:R[b.id];x!==void 0&&(b.regrowAt=this.time.now+x)}
6377this.syncResourceSprites(),this.crawlers.forEach((b,c)=>{c<w.crawlerAlive.length&&!w.crawlerAlive[c]&&(b.alive=!1,b.sprite.setVisible(!1),b.shadow.setVisible(!1))}),this.queen.x=w.queenX,this.queen.y=w.queenY,w.queenAlive?this.queen.hp=w.queenHp:this.queen.killSilently();for(const b of w.bridges){const c=this.addToWorld(this.add.image(b.x,b.y,"plank").setDepth(pn));this.bridges.push({x:b.x,y:b.y,sprite:c})}for(const b of w.campfires){const c=this.addToWorld(this.add.image(b.x,b.y,"campfire").setDepth(b.y-1).setOrigin(.5,.8));this.tweens.add({targets:c,alpha:.75,duration:260,yoyo:!0,repeat:-1}),this.campfires.push({x:b.x,y:b.y,sprite:c,healAt:0})}for(const b of w.drops??[])this.spawnPeachDrop(b.x,b.y,!0);w.cleared&&this.showClear(),this.updateHud()}}openExit(){this.exitOpen=!0,this.bossBar.setVisible(!1),this.portal=this.addToWorld(this.add.container(ne,ee).setDepth(ee));const C=this.add.image(0,-46,"portal_swirl").setOrigin(.5,.5),w=this.add.image(0,0,"portal_frame").setOrigin(.5,1);this.portal.add([C,w]),this.tweens.add({targets:C,angle:360,duration:2600,repeat:-1}),this.add.text(At/2,130,"蟠桃蟾王已击败!走进传送门",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.success}).setOrigin(.5).setDepth(It).setScrollFactor(0)}enterPortal(){this.entering||(this.entering=!0,this.tweens.add({targets:this.player,angle:720,scaleX:0,scaleY:0,duration:1100,ease:"Quad.in",onComplete:()=>{this.cleared=!0,this.saveNow(),this.scene.start("level3")}}))}showClear(){this.cleared=!0,this.cameras.main.stopFollow(),this.add.rectangle(0,0,At,zt,659737,.6).setOrigin(0).setDepth(It).setScrollFactor(0),this.add.text(At/2,zt/2-30,"LEVEL 2 CLEAR!",{fontFamily:Q.font,fontSize:Q.size.xl,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5).setDepth(It+1).setScrollFactor(0),this.add.text(At/2,zt/2+24,`木头 ${this.wood} · 蟠桃 ${this.peach} · 死亡 ${this.deaths} 次 · [M] 返回主菜单`,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textDim}).setOrigin(.5).setDepth(It+1).setScrollFactor(0)}updateHud(){var w;const C="♥".repeat(Math.max(0,this.hearts))+"·".repeat(Math.max(0,this.maxHeartsEff-this.hearts));(w=this.hudText)==null||w.setText(`${C}  木头 ${this.wood}  蟠桃 ${this.peach}  死亡 ${this.deaths}  [M] 地图 [Esc] 暂停`)}layoutHud(){var w,R,b,c,x;const C=mi(this);this.hudPanel&&(this.hudPanel.clear(),Pt(this.hudPanel,16+C,16,500,40)),(w=this.hudText)==null||w.setX(32+C),(R=this.staminaLabel)==null||R.setX(32+C),(b=this.staminaBg)==null||b.setX(76+C),(c=this.staminaFill)==null||c.setX(78+C),(x=this.objectiveText)==null||x.setX(At-24-C)}buildWorld(){this.cameras.main.setBackgroundColor(2382474)}updateTerrainChunks(C=!1){const w=this.cameras.main.worldView,R=2,b=Math.ceil(de/Ht)-1,c=Math.ceil(ce/Ht)-1,x=Math.max(Math.floor(w.left/Ht)-oi,-R),t=Math.min(Math.floor(w.right/Ht)+oi,b+R),o=Math.max(Math.floor(w.top/Ht)-oi,-R),p=Math.min(Math.floor(w.bottom/Ht)+oi,c+R),a=new Set;for(let n=o;n<=p;n++)for(let r=x;r<=t;r++){const e=`${r},${n}`;a.add(e),this.terrainChunks.has(e)||this.terrainChunks.set(e,this.renderTerrainChunk(r,n))}if(!(!C&&this.sameKeys(a,this.activeChunkKeys))){for(const[n,r]of this.terrainChunks)a.has(n)||(r.destroy(),this.terrainChunks.delete(n));this.activeChunkKeys=a,this.syncResourceSprites()}}renderTerrainChunk(C,w){const R=C*Ht,b=w*Ht,c=this.addToWorld(this.add.renderTexture(R-ie,b-ie,Ht+ie*2,Ht+ie*2).setOrigin(0).setDepth(Nn)),x=8,t=this.add.image(0,0,"terrain_sheet",0).setOrigin(.5).setDisplaySize(Vt+x,Vt+x).setVisible(!1),o=Math.floor((R-ie)/Vt),p=Math.floor((b-ie)/Vt),a=Math.ceil((R+Ht+ie)/Vt),n=Math.ceil((b+Ht+ie)/Vt);for(let r=p;r<n;r++)for(let e=o;e<a;e++){const s=this.pickTerrainFrame(e*Vt,r*Vt);t.setFrame(s).setPosition(e*Vt+Vt/2-(R-ie),r*Vt+Vt/2-(b-ie)),c.draw(t)}return t.destroy(),c}pickTerrainFrame(C,w){const R=this.hash2(Math.floor(C/Vt),Math.floor(w/Vt)),b=Vt;if(!this.onIsland(C+b/2,w+b/2))return He.water[R%He.water.length];const x=!this.onIsland(C+b/2,w-b/2),t=!this.onIsland(C+b*1.5,w+b/2),o=!this.onIsland(C+b/2,w+b*1.5),p=!this.onIsland(C-b/2,w+b/2),a=+x+ +t+ +o+ +p;if(a===0)return He.grass[R%He.grass.length];const n=He.shore;return a===1?x?n.N:t?n.E:o?n.S:n.W:x&&t?n.NE:t&&o?n.SE:o&&p?n.SW:p&&x?n.NW:x&&o?n.N:t&&p?n.E:x&&t?n.NE:t&&o?n.SE:o&&p?n.SW:n.NW}seedResources(){let C=0;for(let w=980;w<ne-300;w+=340)for(let R=0;R<2;R++){let b=720+this.hash2(Math.floor(w),R*97)%2600;for(let x=0;x<24&&!this.onIsland(w,b);x++)b=600+(b+173)%2900;if(!this.onIsland(w,b))continue;const c=(C+R)%3===0?"bush":"tree";this.resources.push({id:`resource-${C++}`,x:w,y:b,kind:c,hits:c==="tree"?yt.harvest.treeHits:1,variant:this.hash2(Math.floor(w),R)%3})}}syncResourceSprites(){var C;for(const w of this.resources){const R=`${Math.floor(w.x/Ht)},${Math.floor(w.y/Ht)}`,b=this.activeChunkKeys.has(R)&&(w.kind==="tree"||w.hits>0);if(b&&!w.sprite){w.shadow=this.addToWorld(this.add.image(w.x,w.y+8,"td_shadow").setDepth(w.y-1).setScale(w.kind==="tree"?1.4:.7));const c=w.kind==="tree";w.sprite=this.addToWorld(this.add.image(w.x,w.y,c&&w.hits<=0?"peach_bare":c?`peach_tree_${w.variant??0}`:"peach_bush").setOrigin(.5,.9).setDepth(w.y).setScale(c?.42:1).setAlpha(w.hits<=0?.8:1))}else!b&&w.sprite&&(w.sprite.destroy(),(C=w.shadow)==null||C.destroy(),w.sprite=void 0,w.shadow=void 0)}}sameKeys(C,w){if(C.size!==w.size)return!1;for(const R of C)if(!w.has(R))return!1;return!0}hash2(C,w){let R=Math.imul(C|0,374761393)^Math.imul(w|0,668265263);return R=Math.imul(R^R>>>13,1274126177),(R^R>>>16)>>>0}setBossBarScrollFactor(C){const w=this.bossBar;w.box.setScrollFactor(C),w.box.setDepth(It)}makeTextures(){let C=new pt(10,5,4);C.ellipse(5,2.5,5,2.4,"rgba(10,20,30,0.45)"),dt(this,"td_shadow",C.cv),C=new pt(2,2,5),C.rect(0,0,2,2,"#ffffff"),dt(this,"particle",C.cv),C=new pt(12,4,4),C.rect(1,1,10,2,"rgba(255,255,255,0.9)"),C.rect(3,0,8,1,"rgba(190,230,255,0.8)"),dt(this,"swipe",C.cv),C=new pt(8,7,4);for(const[b,c,x,t]of[[1,2,0,0],[1,4,0,6],[6,2,7,0],[6,4,7,6]])C.line(b,c,x,t,"#2a1a3a",1);C.ellipse(4,3.6,3,2.6,"#2a1a3a"),C.ellipse(4,3.5,2.4,2,"#5a3a6a"),C.circle(3,3,.6,"#ff3355"),C.circle(5,3,.6,"#ff3355"),dt(this,"crawler",C.cv),C=new pt(12,16,4),C.rect(5.4,8,1.2,8,"#5a3a22"),C.circle(6,6,4.6,"#2e5a24"),C.circle(6,6,4,"#4a8f38");for(const[b,c]of[[4,4],[7.5,5],[6,8],[3.5,7],[8,3.2]])C.circle(b,c,.9,"#ff9ec4");dt(this,"peach_tree",C.cv),C=new pt(6,4,4),C.ellipse(3,2,2.8,1.8,"#3a2a1a"),C.ellipse(3,1.6,2.2,1.3,"#7a5a3a"),C.ellipse(3,1.6,1.1,.6,"#5a3a22"),dt(this,"stump",C.cv),C=new pt(7,6,4),C.circle(3.5,3.4,3,"#2e5a24"),C.circle(3.5,3.3,2.5,"#4a8f38");for(const[b,c]of[[2.4,2.6],[4.6,2.8],[3.5,4.2]])C.circle(b,c,1,"#5c2030"),C.circle(b,c,.8,"#ff8fa8");dt(this,"peach_bush",C.cv),C=new pt(7,7,4),C.circle(3.5,4,3.2,"#5c2030"),C.circle(3.5,4,2.7,"#ff8fa8"),C.circle(3,3.6,2,"#ffb3c6"),C.ellipse(4.6,1.2,1.8,.9,"#3f7a1e"),C.ellipse(4.8,1.1,1.3,.6,"#6db35f"),dt(this,"peach",C.cv),C=new pt(4,4,4),C.circle(2,2,1.8,"rgba(255,255,255,0.5)"),C.circle(2,2,1.2,"#e8eef4"),dt(this,"web",C.cv),C=new pt(16,16,4),C.rect(0,0,16,16,"#3a2a1a");for(let b=1;b<16;b+=4)C.rect(1,b,14,3,"#7a5230"),C.rect(1,b,14,1,"#8a6a40");dt(this,"plank",C.cv),C=new pt(8,10,4),C.ellipse(4,8.5,3.4,1.4,"#6a6a72"),C.ellipse(4,8.3,2.6,1,"#8a8a92"),C.ellipse(4,5.5,2.2,3.4,"#cc4400"),C.ellipse(4,5.3,1.5,2.6,"#ff8822"),C.ellipse(4,5,.8,1.6,"#ffdd66"),dt(this,"campfire",C.cv),C=new pt(16,16,4),C.circle(8,8,7.6,"#d8c88a"),C.circle(8,8,7,"#f8ecc0"),C.circle(6,6,1.2,"#e8d8a0"),C.circle(10,9,.9,"#e8d8a0"),dt(this,"moon",C.cv);const w=new pt(280,140,4);w.ellipse(140,76,136,62,"#5a3a22"),w.ellipse(140,70,136,62,"#2e5a24"),w.ellipse(140,69,134,60,"#4a8f38"),w.ellipse(140,68,130,56,"#5aa848");for(let b=0;b<120;b++){const c=Math.random()*Math.PI*2,x=Math.sqrt(Math.random())*.92,t=140+Math.cos(c)*x*128,o=68+Math.sin(c)*x*54;w.rect(t,o,1,1,Math.random()<.4?"#ff9ec4":"#6db35f")}dt(this,"island",w.cv);const R="#1a1410";C=new pt(15,22,4),C.rect(0,0,15,2,R),C.rect(1,0,13,1,"#8a5a2b"),C.rect(0,0,2,22,R),C.rect(1,2,1,20,"#6b4a2b"),C.rect(13,0,2,22,R),C.rect(13,2,1,20,"#6b4a2b"),dt(this,"portal_frame",C.cv),C=new pt(11,18,4),C.ellipse(5.5,9,5.4,8.8,"#1b3a5c"),C.ellipse(5.5,9,4.2,7,"#2e6da4"),C.ellipse(5.5,9,3,5,"#7fc4f0"),C.ellipse(5.5,9,1.6,2.8,"#eaf8ff"),dt(this,"portal_swirl",C.cv)}}const Et={left:3700,right:4200,floorY:1100},$t=class $t{constructor(N,C,w,R,b){H(this,"x");H(this,"y");H(this,"dir");H(this,"warnMs");H(this,"enabled",!0);H(this,"state","cool");H(this,"stateT",0);H(this,"base");H(this,"jet");H(this,"warn");H(this,"scene");this.scene=N,this.x=C,this.y=w,this.dir=R,this.warnMs=b;const c=R==="up"?-1:1;this.base=N.add.image(C,w,"l3_vent").setDepth(3),R==="down"&&this.base.setFlipY(!0),this.jet=N.add.tileSprite(C,w+c*6,$t.JET_W,1,"l3_steam_hi").setOrigin(.5,R==="up"?1:0).setDepth(2).setVisible(!1),this.warn=N.add.image(C,w+c*40,"l3_steam_hi").setDepth(2).setScale(.6,.2).setAlpha(0).setVisible(!1)}jetRect(){const N=this.dir==="up"?-1:1;return{x0:this.x-$t.JET_W/2,x1:this.x+$t.JET_W/2,y0:N<0?this.y-$t.JET_LEN:this.y,y1:N<0?this.y:this.y+$t.JET_LEN}}isFiring(){return this.state==="fire"}isCool(){return this.state==="cool"}setEnabled(N){this.enabled=N,this.base.setAlpha(N?1:.3),N||(this.state="cool",this.stateT=0,this.jet.setVisible(!1),this.warn.setVisible(!1))}trigger(){!this.enabled||this.state!=="cool"||(this.state="warn",this.stateT=0,this.warn.setVisible(!0).setPosition(this.x,this.y+(this.dir==="up"?-1:1)*40))}update(N){if(!this.enabled)return;this.stateT+=N;const C=this.dir==="up"?-1:1;if(this.state==="warn"){const w=Math.min(1,this.stateT/this.warnMs);this.warn.setPosition(this.x,this.y+C*40).setScale(.6+w*.4,.2+w*.8).setAlpha(.3+w*.5),this.stateT>=this.warnMs&&(this.state="fire",this.stateT=0,this.warn.setVisible(!1),this.jet.setVisible(!0).setPosition(this.x,this.y+C*6))}else this.state==="fire"&&(this.jet.setPosition(this.x,this.y+C*6),this.jet.height=$t.JET_LEN*Math.min(1,this.stateT/80),this.jet.tilePositionY+=N*.4,this.stateT>=$t.ACTIVE_MS&&(this.state="cool",this.stateT=0,this.jet.setVisible(!1)))}destroy(){this.base.destroy(),this.jet.destroy(),this.warn.destroy()}};H($t,"ACTIVE_MS",380),H($t,"JET_LEN",170),H($t,"JET_W",60);let Yi=$t;
6377const Wt=class Wt{constructor(N,C,w,R=3){H(this,"scene");H(this,"x");H(this,"y");H(this,"sprite");H(this,"maxHp",3);H(this,"hp",3);H(this,"phase",0);H(this,"dead",!1);H(this,"state","idle");H(this,"leapV",{x:0,y:0});H(this,"blinkTargetX",0);H(this,"burrowTargetX",0);H(this,"burrowStartX",0);H(this,"stateT",0);H(this,"targetX",0);H(this,"invulnT",0);H(this,"bulletInvulnT",0);H(this,"summonCd",0);this.scene=N,this.x=C,this.y=w,this.maxHp=R,this.hp=R,this.sprite=N.add.image(C,w,"l3_boss").setDepth(4).setScale(Wt.BASE_SCALE),this.targetX=C}get idleMs(){return this.phase===0?450:this.phase===1?320:220}get chargeSpeed(){return this.phase===0?480:this.phase===1?620:760}bodyRect(){return{x0:this.x-Wt.WIDTH/2,x1:this.x+Wt.WIDTH/2,y0:this.y-Wt.HEIGHT/2,y1:this.y+Wt.HEIGHT/2}}hitsPlayer(N,C){const w=this.bodyRect();return N+12>w.x0&&N-12<w.x1&&C+12>w.y0&&C-12<w.y1}onHitBySteam(){var N,C;this.dead||this.invulnT>0||(this.hp--,this.invulnT=1200,this.scene.cameras.main.shake(160,.006),this.scene.cameras.main.flash(200,255,220,120),this.sprite.setTint(16755370),this.scene.time.delayedCall(200,()=>this.sprite.clearTint()),this.hp<=0?this.die():(this.syncPhase(),this.enterState("stun"),(C=(N=this.scene).onBossDamaged)==null||C.call(N,this.hp)))}takeBulletDamage(){this.dead||this.bulletInvulnT>0||(this.bulletInvulnT=150,this.hp--,this.sprite.setTint(16768477),this.scene.time.delayedCall(120,()=>this.sprite.clearTint()),this.syncPhase(),this.hp<=0&&this.die())}syncPhase(){this.phase=this.hp>this.maxHp*2/3?0:this.hp>this.maxHp/3?1:2}get stateLabel(){switch(this.state){case"idle":return"潜行";case"charge":return"冲锋!";case"waterbomb":return"吐水雷";case"summon":return"召唤小蟑螂";case"leap":return"跳扑!";case"blink":return"闪现突袭!";case"burrow":return"钻地突袭!";default:return"虚弱"}}setHp(N){this.hp=Math.max(0,Math.min(this.maxHp,N)),this.syncPhase(),this.hp<=0&&this.die()}reset(){this.dead=!1,this.hp=this.maxHp,this.phase=0,this.invulnT=0,this.summonCd=0,this.x=this.sprite.x,this.enterState("idle"),this.sprite.setScale(Wt.BASE_SCALE,Wt.BASE_SCALE).setAlpha(1).clearTint().setPosition(this.x,this.y)}die(){var N,C;this.dead=!0,this.enterState("idle"),this.scene.tweens.add({targets:this.sprite,alpha:0,y:this.y+40,duration:700}),(C=(N=this.scene).onBossDead)==null||C.call(N)}enterState(N){var C,w;if(this.state=N,this.stateT=0,N==="idle")this.targetX=this.x;else if(N==="charge"){const R=Math.max(Et.left+80,Math.min(Et.right-80,this.scene.player.x));this.targetX=R,this.sprite.setFlipX(this.targetX>this.x)}else if(N!=="waterbomb")if(N==="summon")(w=(C=this.scene).spawnRoach)==null||w.call(C,this.x<(Et.left+Et.right)/2?Et.right-120:Et.left+120);else if(N==="stun")this.targetX=this.x;else if(N==="leap"){const b=Math.max(Et.left+60,Math.min(Et.right-60,this.scene.player.x))-this.x;this.leapV={x:Math.max(-430,Math.min(430,b/.85)),y:-560},this.sprite.setFlipX(b>0),this.scene.tweens.add({targets:this.sprite,scaleY:Wt.BASE_SCALE*.7,duration:240})}else if(N==="blink"){const R=Math.random()<.5?-1:1,b=60+Math.random()*100;this.blinkTargetX=Math.max(Et.left+60,Math.min(Et.right-60,this.scene.player.x+R*b))}else N==="burrow"&&(this.burrowTargetX=Math.max(Et.left+60,Math.min(Et.right-60,this.scene.player.x)),this.burrowStartX=this.x)}poof(N,C,w=9071178,R=1){const b=this.scene.add.image(N,C,"l3_debris").setTint(w).setAlpha(.8).setScale(.7*R).setDepth(3);this.scene.tweens.add({targets:b,y:C-26*R,alpha:0,scale:1.1*R,duration:420,onComplete:()=>b.destroy()})}shockRing(N,C,w,R){const b=this.scene.add.graphics().setDepth(3),c={r:8};this.scene.tweens.add({targets:c,r:w,duration:320,onUpdate:()=>b.clear().lineStyle(4,R,.8).strokeEllipse(N,C,c.r*2,c.r*.9),onComplete:()=>b.destroy()})}update(N){var C,w;if(!this.dead){if(this.invulnT=Math.max(0,this.invulnT-N),this.bulletInvulnT=Math.max(0,this.bulletInvulnT-N),this.summonCd=Math.max(0,this.summonCd-N),this.stateT+=N,this.sprite.y=this.y+Math.sin(this.scene.time.now/260)*3,this.state==="idle")this.stateT>=this.idleMs&&(this.phase>=2&&this.summonCd<=0?(this.summonCd=6500,this.enterState("summon")):this.enterState(this.pickAttack()));else if(this.state==="charge"){const R=this.targetX-this.x,b=this.chargeSpeed*N/1e3;Math.abs(R)<=b?(this.x=this.targetX,this.enterState("idle")):this.x+=Math.sign(R)*b,this.sprite.setPosition(this.x,this.sprite.y),this.hitsPlayer(this.scene.player.x,this.scene.player.y)&&this.scene.die()}else if(this.state==="waterbomb"){const R=this.phase>=2?4:this.phase===1?3:2;for(let b=0;b<R;b++)this.scene.time.delayedCall(b*220,()=>{var c,x;this.dead||(x=(c=this.scene).spawnWaterBomb)==null||x.call(c,this.x,this.y-30)});this.enterState("idle")}else if(this.state==="summon")this.stateT>=600&&this.enterState("idle");else if(this.state==="stun")this.sprite.setTint(11184895),this.stateT>=1400&&(this.sprite.clearTint(),this.enterState("idle"));else if(this.state==="leap"){if(this.stateT<250)return;this.stateT<250+N&&this.sprite.setScale(Wt.BASE_SCALE,Wt.BASE_SCALE);const R=((w=(C=this.scene).surfaceYAtX)==null?void 0:w.call(C,this.x))??Et.floorY;if(this.x+=this.leapV.x*N/1e3,this.leapV.y+=1700*N/1e3,this.y+=this.leapV.y*N/1e3,this.y>=R-45&&this.leapV.y>0){this.y=R-45,this.shockRing(this.x,R-8,130,16768392),this.scene.cameras.main.shake(120,.004),Math.abs(this.scene.player.x-this.x)<120&&Math.abs(this.scene.player.y-this.y)<70&&this.scene.die(),Math.random()<.4?this.enterState("blink"):this.enterState("idle");return}}else if(this.state==="blink")this.stateT<250?(this.sprite.setAlpha(1-this.stateT/250),Math.floor(this.stateT/50)%2===0&&this.poof(this.x+(Math.random()-.5)*40,this.y,10135807,.6)):this.stateT<300?(this.x=this.blinkTargetX,this.sprite.setAlpha(1).setFlipX(this.scene.player.x>
6377this.x),this.shockRing(this.x,Et.floorY-20,46,10135807)):this.stateT<460?this.hitsPlayer(this.scene.player.x,this.scene.player.y)&&this.scene.die():this.stateT>=750&&(Math.random()<.4?this.enterState("waterbomb"):this.enterState("idle"));else if(this.state==="burrow")if(this.stateT<400)this.y+=90*N/1e3,this.sprite.setAlpha(1-this.stateT/500),Math.floor(this.stateT/90)%2===0&&this.poof(this.x,Et.floorY,9071178,.9);else if(this.stateT<1100){this.sprite.setAlpha(.12);const R=this.burrowTargetX>this.x?1:-1;this.x+=R*300*N/1e3,Math.floor(this.stateT/70)%2===0&&this.poof(this.x,Et.floorY,9071178,.7)}else this.stateT<1100+N?(this.y=Et.floorY-45,this.sprite.setAlpha(1).setFlipX(this.scene.player.x>this.x),this.shockRing(this.x,Et.floorY-14,90,9097471),this.scene.cameras.main.shake(120,.005),Math.abs(this.scene.player.x-this.x)<74&&Math.abs(this.scene.player.y-this.y)<80&&this.scene.die()):this.stateT>=1500&&this.enterState("idle")}}pickAttack(){const N=Math.random();return this.phase===0?N<.4?"charge":N<.75?"waterbomb":"leap":this.phase===1?N<.3?"charge":N<.5?"waterbomb":N<.8?"leap":"blink":N<.3?"blink":N<.55?"leap":N<.8?"burrow":"waterbomb"}destroy(){this.sprite.destroy()}};H(Wt,"WIDTH",120),H(Wt,"HEIGHT",74),H(Wt,"BASE_SCALE",1.8);let Wi=Wt;class Ra{constructor(N,C,w){H(this,"scene");H(this,"sprite");H(this,"active",!0);this.scene=N,this.sprite=N.physics.add.image(C,w,"l3_bomb");const R=this.sprite.body;R.setAllowGravity(!0),R.setGravityY(900),R.setBounce(.45,.25),R.setCollideWorldBounds(!1);const b=N.player.x,c=N.player.y,x=b-C,t=Math.max(.7,Math.min(1.5,Math.abs(x)/380)),o=x/t,p=(c-(w-this.sprite.height/2)-.5*900*t*t)/t;this.sprite.setVelocity(o,p)}update(){if(!this.active)return;const N=this.sprite.x,C=this.sprite.y;if(C>Et.floorY+60||N<Et.left-40||N>Et.right+40){this.destroy();return}Math.hypot(this.scene.player.x-N,this.scene.player.y-C)<26&&(this.destroy(),this.scene.die())}destroy(){this.active=!1,this.sprite.destroy()}}class wa{constructor(N,C,w){H(this,"scene");H(this,"x");H(this,"y");H(this,"sprite");H(this,"dir",1);H(this,"speed",95);this.scene=N,this.x=C,this.y=w,this.sprite=N.add.image(C,w,"l3_roach").setDepth(3)}update(N){this.x+=this.dir*(this.speed*N)/1e3,this.x>Et.right-80?(this.x=Et.right-80,this.dir=-1):this.x<Et.left+80&&(this.x=Et.left+80,this.dir=1),this.sprite.setPosition(this.x,this.y).setFlipX(this.dir<0),Math.abs(this.scene.player.x-this.x)<24&&Math.abs(this.scene.player.y-this.y)<26&&this.scene.die()}destroy(){this.sprite.destroy()}}class Fa{constructor(N,C){H(this,"state","idle");H(this,"stateT",0);H(this,"x");H(this,"y");H(this,"sprite");this.scene=N,this.def=C,this.x=C.x,this.y=C.y,this.sprite=N.add.image(C.x,C.y,"l3_spike").setDepth(3).setAlpha(.5),C.dir==="right"&&this.sprite.setFlipX(!0)}update(N){if(this.stateT+=N,this.state==="idle")Math.abs(this.scene.player.x-this.x)<(this.def.triggerW??90)&&Math.abs(this.scene.player.y-this.y)<(this.def.dir==="up"?160:80)&&(this.state="flying",this.stateT=0,this.sprite.setAlpha(1));else if(this.state==="flying"){const C=this.def.speed*N/1e3;this.def.dir==="up"?this.y-=C:this.x+=(this.def.dir==="right"?1:-1)*C,this.sprite.setPosition(this.x,this.y),this.def.dir!=="up"&&(this.sprite.rotation+=(this.def.dir==="right"?1:-1)*N*.02),this.stateT>this.def.span/this.def.speed*1e3&&(this.state="cd",this.stateT=0,this.sprite.setAlpha(.3))}else this.state==="cd"&&this.stateT>2200&&this.reset()}hitsPlayer(N,C){return this.state==="flying"&&Math.abs(N-this.x)<22&&Math.abs(C-this.y)<22}reset(){this.state="idle",this.stateT=0,this.x=this.def.x,this.y=this.def.y,this.sprite.setPosition(this.x,this.y).setAlpha(.5).setRotation(0)}}class La{constructor(N,C){H(this,"state","idle");H(this,"stateT",0);H(this,"x");H(this,"sprite");this.scene=N,this.def=C,this.x=C.x0,this.sprite=N.add.image(C.x0,C.y,"l3_debris").setDepth(2).setAlpha(.35)}update(N){this.stateT+=N;const C=this.scene.player.x;if(this.state==="idle")Math.abs(C-this.x)<(this.def.triggerDist??220)&&Math.abs(this.scene.player.y-this.def.y)<120&&(this.state="rush",this.stateT=0,this.sprite.setAlpha(1));else if(this.state==="rush"){const w=this.def.x1>this.def.x0?1:-1;this.x+=w*this.def.rushPx*N/1e3,(w>0?this.x>=this.def.x1:this.x<=this.def.x1)&&(this.x=this.def.x1,this.state="hold",this.stateT=0),this.sprite.setPosition(this.x,this.def.y)}else if(this.state==="hold")this.stateT>500&&(this.state="back",this.stateT=0);else if(this.state==="back"){const w=this.def.x1>this.def.x0?-1:1;this.x+=w*60*N/1e3,(w>0?this.x>=this.def.x0:this.x<=this.def.x0)&&(this.x=this.def.x0,this.state="cd",this.stateT=0,this.sprite.setAlpha(.35)),this.sprite.setPosition(this.x,this.def.y)}else this.state==="cd"&&this.stateT>1500&&(this.state="idle",this.stateT=0)}hitsPlayer(N,C){return this.state==="rush"&&Math.abs(N-this.x)<30&&Math.abs(C-this.def.y)<30}reset(){this.state="idle",this.stateT=0,this.x=this.def.x0,this.sprite.setPosition(this.x,this.def.y).setAlpha(.35)}}class Oa{constructor(N,C){H(this,"state","idle");H(this,"stateT",0);H(this,"h",0);H(this,"sprite");this.scene=N,this.def=C,this.sprite=N.add.image(C.x,C.floorY+16,"l3_spike").setDepth(3).setAlpha(.4)}place(){this.sprite.setPosition(this.def.x,this.def.floorY-this.h+16).setCrop(0,34-this.h,32,this.h)}update(N){this.stateT+=N,this.state==="idle"?Math.abs(this.scene.player.x-this.def.x)<(this.def.triggerDist??130)&&(this.state="warn",this.stateT=0,this.sprite.setAlpha(1)):this.state==="warn"?(this.sprite.x=this.def.x+(Math.floor(this.stateT/40)%2?1.5:-1.5),this.stateT>180&&(this.state="extend",this.stateT=0,this.sprite.x=this.def.x)):this.state==="extend"?(this.h=Math.min(34,this.h+N/90*34),this.place(),this.h>=34&&(this.state="hold",this.stateT=0)):this.state==="hold"?this.stateT>500&&(this.state="retract",this.stateT=0):this.state==="retract"?(this.h=Math.max(0,this.h-N/120*34),this.place(),this.h<=0&&(this.state="cd",this.stateT=0)):this.state==="cd"&&this.stateT>1200&&(this.state="idle",this.stateT=0)}hitsPlayer(N,C){return this.state!=="extend"&&this.state!=="hold"?!1:Math.abs(N-this.def.x)<16&&C>this.def.floorY-this.h-8&&C<this.def.floorY+16}reset(){this.state="idle",this.stateT=0,this.h=0,this.place(),this.sprite.setAlpha(.4)}}class Da{constructor(N,C){H(this,"angle",0);H(this,"ball");H(this,"chain");H(this,"bx",0);H(this,"by",0);this.scene=N,this.def=C,this.chain=N.add.graphics().setDepth(2),this.ball=N.add.image(C.x,C.y+C.len,"l3_spikeball").setDepth(3)}update(N){this.angle+=this.def.speed*N/1e3;const C=Math.sin(this.angle)*this.def.arc;this.bx=this.def.x+Math.sin(C)*this.def.len,this.by=this.def.y+Math.cos(C)*this.def.len,this.ball.setPosition(this.bx,this.by),this.chain.clear().lineStyle(3,6978186,1
6377).lineBetween(this.def.x,this.def.y,this.bx,this.by)}hitsPlayer(N,C){return Math.hypot(N-this.bx,C-this.by)<26}reset(){}}class ba{constructor(N,C){H(this,"state","idle");H(this,"stateT",0);H(this,"y");H(this,"vy",0);H(this,"sprite");this.scene=N,this.def=C,this.y=C.hangY,this.sprite=N.add.image(C.x,C.hangY,"l3_debris").setDepth(2).setAlpha(.55)}update(N){this.stateT+=N,this.state==="idle"?Math.abs(this.scene.player.x-this.def.x)<(this.def.triggerW??70)&&this.scene.player.y>this.def.hangY&&this.scene.player.y<this.def.floorY+40&&(this.state="warn",this.stateT=0,this.sprite.setAlpha(1)):this.state==="warn"?(this.sprite.x=this.def.x+(Math.floor(this.stateT/40)%2?1.5:-1.5),this.stateT>220&&(this.state="fall",this.vy=300)):this.state==="fall"?(this.vy=Math.min(1500,this.vy+2600*N/1e3),this.y+=this.vy*N/1e3,this.sprite.setPosition(this.def.x,this.y),this.y>=this.def.floorY-10&&(this.state="gone",this.stateT=0,this.scene.cameras.main.shake(80,.004),this.sprite.setVisible(!1))):this.state==="gone"&&this.stateT>6e3&&this.reset()}hitsPlayer(N,C){return this.state==="fall"&&Math.abs(N-this.def.x)<26&&Math.abs(C-this.y)<26}reset(){this.state="idle",this.stateT=0,this.y=this.def.hangY,this.vy=0,this.sprite.setPosition(this.def.x,this.y).setAlpha(.55).setVisible(!0)}}const Ba=1280,Ia=720,re=2560,Qe=1440,Ga=1340,je=["g1","g2","g3","g4","g5"],gn=2400,Na=320,Ua=2e3,xn=-660,za=-620,yn=-150,Va=1e3,Ot={plats:[{x:60,y:1240,w:340},{x:500,y:1240,w:800},{x:1400,y:1240,w:1060},{x:2290,y:1165,w:90,kind:"ledge"},{x:2160,y:1095,w:90,kind:"ledge"},{x:2290,y:1025,w:90,kind:"ledge"},{x:100,y:960,w:2360},{x:190,y:885,w:90,kind:"ledge"},{x:320,y:815,w:90,kind:"ledge"},{x:190,y:745,w:90,kind:"ledge"},{x:100,y:680,w:1100},{x:1200,y:680,w:140,kind:"collapse"},{x:1340,y:680,w:1120},{x:1700,y:560,w:180,kind:"ledge"},{x:2080,y:560,w:180,kind:"ledge"},{x:2290,y:605,w:90,kind:"ledge"},{x:2160,y:535,w:90,kind:"ledge"},{x:2290,y:465,w:90,kind:"ledge"},{x:60,y:400,w:2400}],pits:[{x:400,w:100},{x:1300,w:100}],vents:[{x:700,y:1240,dir:"up",kind:"lo",warn:1200,cool:700},{x:1e3,y:1240,dir:"up",kind:"lo",warn:1200,cool:900},{x:1150,y:1240,dir:"up",kind:"lo",warn:1e3,cool:800},{x:1900,y:960,dir:"up",kind:"hi",warn:800},{id:"v1",x:1400,y:960,dir:"up",kind:"hi",warn:800,cool:600},{x:900,y:680,dir:"up",kind:"hi",warn:600},{id:"v2up",x:1970,y:560,dir:"up",kind:"hi",warn:600,cool:600},{id:"v2main",x:2e3,y:680,dir:"up",kind:"hi",warn:600,cool:600,disabled:!0},{x:1900,y:400,dir:"up",kind:"hi",warn:400},{x:1600,y:400,dir:"up",kind:"hi",warn:400},{x:1300,y:400,dir:"up",kind:"hi",warn:400}],checkpoints:[{id:"start",x:120,y:1240},{id:"A",x:2100,y:1240},{id:"B",x:400,y:960},{id:"bonus",x:180,y:820},{id:"C",x:2250,y:680}],bats:[{x:2380,y0:1e3,y1:1200,speed:130},{x:2380,y0:440,y1:640,speed:110}],peaches:[{id:"p1",x:1700,y:900},{id:"p2",x:1270,y:620},{id:"p3",x:1970,y:500}],spikes:{grow:[{x:850,floorY:1240},{x:1120,floorY:1240}],fly:[{x:1700,y:930,dir:"right",span:600,speed:520,triggerW:90},{x:2100,y:650,dir:"left",span:600,speed:560,triggerW:90},{x:2220,y:960,dir:"up",span:300,speed:520,triggerW:70},{x:1550,y:680,dir:"up",span:320,speed:560,triggerW:70}],slide:[{x0:1150,x1:1380,y:930,rushPx:520,triggerDist:220}],swing:[{x:1450,y:470,len:200,arc:1.1,speed:2.4},{x:1750,y:170,len:230,arc:1.15,speed:2.6}],debris:[{x:820,hangY:1020,floorY:1240},{x:1250,hangY:1020,floorY:1240}]}},kt=class kt{constructor(N,C,w){H(this,"x");H(this,"y");H(this,"dir");H(this,"kind");H(this,"warnMs");H(this,"move");H(this,"disabled");H(this,"state","cool");H(this,"stateT",0);H(this,"coolMs");H(this,"base");H(this,"jet");H(this,"warn");H(this,"scene");this.scene=N,this.x=C.x,this.y=C.y,this.dir=C.dir,this.kind=C.kind,this.warnMs=C.warn,this.move=C.move,this.coolMs=C.cool??w,this.disabled=C.disabled??!1,this.stateT=Math.floor(Math.random()*this.coolMs*.9);const R=C.kind==="lo"?"l3_steam_lo":"l3_steam_hi",b=C.dir==="up"?-1:1;this.base=N.add.image(C.x,C.y,"l3_vent").setDepth(3).setAlpha(this.disabled?.3:1),C.dir==="down"&&this.base.setFlipY(!0),this.jet=N.add.tileSprite(C.x,C.y+b*6,kt.JET_W,1,R).setOrigin(.5,C.dir==="up"?1:0).setDepth(2).setVisible(!1),this.warn=N.add.image(C.x,C.y+b*40,R).setDepth(2).setScale(.6,.2).setAlpha(0).setVisible(!1)}setDisabled(N){this.disabled=N,this.base.setAlpha(N?.3:1),N&&(this.state="cool",this.stateT=0,this.jet.setVisible(!1),this.warn.setVisible(!1))}jetRect(){const N=this.dir==="up"?-1:1;return{x0:this.x-kt.JET_W/2,x1:this.x+kt.JET_W/2,y0:N<0?this.y-kt.JET_LEN:this.y,y1:N<0?this.y:this.y+kt.JET_LEN}}isFiring(){return!this.disabled&&this.state==="fire"}update(N){if(this.disabled)return;if(this.move){const w=this.move.to-this.move.from,R=this.scene.time.now/1e3*(this.move.speed/w),b=this.move.from+w*(.5-.5*Math.cos(R*Math.PI*2));this.move.axis==="x"?this.x=b:this.y=b,this.base.setPosition(this.x,this.y)}this.stateT+=N;const C=this.dir==="up"?-1:1;if(this.state==="cool"&&this.stateT>=this.coolMs)this.state="warn",this.stateT=0,this.warn.setVisible(!0).setPosition(this.x,this.y+C*40);else if(this.state==="warn"){const w=Math.min(1,this.stateT/this.warnMs);this.warn.setPosition(this.x,this.y+C*40).setScale(.6+w*.4,.2+w*.8).setAlpha(.3+w*.5),this.stateT>=this.warnMs&&(this.state="fire",this.stateT=0,this.warn.setVisible(!1),this.jet.setVisible(!0).setPosition(this.x,this.y+C*6))}else this.state==="fire"&&(this.jet.setPosition(this.x,this.y+C*6),this.jet.height=kt.JET_LEN*Math.min(1,this.stateT/80),this.jet.tilePositionY+=N*.4,this.stateT>=kt.ACTIVE_MS&&(this.state="cool",this.stateT=0,this.jet.setVisible(!1)))}};H(kt,"ACTIVE_MS",350),H(kt,"JET_LEN",240),H(kt,"JET_W",56);let Hi=kt;class Xa{constructor(N,C){H(this,"x");H(this,"y",0);H(this,"sprite");H(this,"y0");H(this,"y1");H(this,"speed");H(this,"dir",1);this.x=C.x,this.y0=C.y0,this.y1=C.y1,this.speed=C.speed,this.y=C.y0,this.sprite=N.add.image(C.x,C.y0,"l3_bat").setDepth(4)}update(N){this.y+=this.dir*(this.speed*N)/1e3,this.y>this.y1?(this.y=this.y1,this.dir=-1):this.y<this.y0&&(this.y=this.y0,this.dir=1),this.sprite.setPosition(this.x,this.y).setFlipY(this.dir<0)}hits(N,C){return Math.abs(N-this.x)<32&&Math.abs(C-this.y)<22}}class Tn{constructor(N,C,w,R,b){H(this,"used",!1);H(this,"zone");H(this,"light");H(this,"cd",0);H(this,"wasOverlap",!1);this.scene=N,this.mode=R,this.onStep=b,this.zone=N.add.zone(C,w-12,60,36),N.physics.add.existing(this.zone,!0),this.light=N.add.image(C,w-24,"l3_valve").setDepth(3).setScale(.9)}update(N){this.cd=Math.max(0,this.cd-N);const C=st.Geom.Rectangle.Overlaps(new st.Geom.Rectangle(this.scene.player.x-12,this.scene.player.y-12,24,24),this.zone.getBounds());C&&!this.wasOverlap&&this.cd<=0&&(this.mode==="toggle"||!this.used)&&(this.used=!0,this.cd=800,this.light.setAlpha(this.mode==="once"?.35:.65),this.onStep()),this.wasOverlap=C}destroy(){this.zone.destroy(),this.light.destroy()}}class Ya extends st.Scene{constructor(){super("level3");H(this,"player");H(this,"plats");H(this,"vents",[]);H(this,"ventById",new Map);H(this,"routeValves",[]);H(this,"spikes",[]);H(this,"bats",[]);H(this,"peaches",[]);H(this,"collapsePlats",[]);H(this,"exitZone");H(this,"bossDead",!1);H(this,"exitOpen",!1);H(this,"bossDoorZone");H(this,"enteringBoss",!1);H(this,"crackZone");H(this,"crackHint");H(this,"nearCrack",!1);H(this,"inBonus",!1);H(this,"badge",!1);H(this,"peachMedal",!1);H(this,"facing",1);H(this,"jumpsLeft",2);H(this,"wasJumpDown",!1);H(this,"wasGrounded",!0);H(this,"lastGroundedAt",0);H(this,"jumpBufferedAt",-1);H(this,"dead",!1);H(this,"invulnT",0);H(this,"cleared",!1);H(this,"freeRoam",!1);H(this,"clearedAt",0);H(this,"autoTransitioned",!1);H(this,"deaths",0);H(this,"checkpoint",Ot.checkpoints[0]);H(this,"collected",new Set);H(this,"god",!1);H(this,"pendingSnapshot");H(this,"lastSave",0);H(this,"cursors");H(this,"keyA");H(this,"keyD");H(this,"toBoss",!1);H(this,"pauseOpen",!1);H(this,"saveHandler",()=>this.saveNow())}init(C){var w;this.pendingSnapshot=((w=C==null?void 0:C.snapshot)==null?void 0:w.level)===3?C.snapshot:void 0,this.toBoss=(C==null?void 0:C.toBoss)??!1,this.vents=[],this.ventById=new Map,this.routeValves=[],this.spikes=[],this.bats=[],this.peaches=[],this.collapsePlats=[],this.bossDead=!1,this.exitOpen=!1,this.enteringBoss=!1,this.pauseOpen=!1,this.inBonus=!1,this.badge=!1,this.peachMedal=!1,this.facing=1,this.jumpsLeft=2,this.wasJumpDown=!1,this.dead=!1,this.invulnT=0,this.cleared=!1,this.freeRoam=!1,this.autoTransitioned=!1,this.deaths=0,this.checkpoint=Ot.checkpoints[0],this.collected=new Set,this.lastSave=0}create(){this.god=se(),this.makeTextures(),this.buildWorld();const C=this.spawnPoint();this.player=this.physics.add.sprite(C.x,C.y,"boar_idle");const w=this.player.height;this.player.setScale(56/w);const R=this.player.body;R.setSize(24*w/56,24*w/56),R.setMaxVelocity(Na,1400),R.setDragX(Ua),R.setCollideWorldBounds(!1),this.physics.add.collider(this.player,this.plats),this.physics.world.setFPS(60);const b=Math.min(Ba/re,Ia/Qe);this.cameras.main.setBounds(0,0,re,Qe).setZoom(b).setScroll(0,0),this.physics.world.setBounds(0,0,re,Qe+400),this.scene.launch("level3ui",{parent:this});
6377const c=this.input.keyboard;this.cursors=c.createCursorKeys(),this.keyA=c.addKey(st.Input.Keyboard.KeyCodes.A),this.keyD=c.addKey(st.Input.Keyboard.KeyCodes.D),c.on("keydown-ESC",()=>this.togglePause()),c.on("keydown-M",()=>{this.cleared&&(this.saveNow(!0),this.scene.start("menu"))}),c.on("keydown-ENTER",()=>{this.cleared&&(this.saveNow(!0),this.scene.start("bodymap"))}),c.on("keydown-SPACE",()=>{this.cleared&&!this.freeRoam&&(this.freeRoam=!0)}),c.on("keydown-R",()=>{this.pauseOpen&&this.scene.restart()}),c.on("keydown-Q",()=>{this.pauseOpen&&(this.saveNow(),this.scene.start("menu"))}),window.addEventListener("pagehide",this.saveHandler),this.events.once(st.Scenes.Events.SHUTDOWN,()=>{window.removeEventListener("pagehide",this.saveHandler),this.scene.stop("level3ui")}),this.pendingSnapshot&&(this.applyLevel3Save(this.pendingSnapshot),this.pendingSnapshot=void 0),this.toBoss&&(this.toBoss=!1,this.time.delayedCall(50,()=>this.enterBossScene()))}makeTextures(){if(this.textures.exists("l3_pipe"))return;const C=(c,x,t,o,p,a)=>{for(let n=t;n<=o;n++){const r=(n-t)/Math.max(1,o-t)*p;c.rect(x-r,n,r*2,1,a)}},w=(c,x,t,o,p)=>{for(let a=t-o;a<=t+o;a++){const n=o-Math.abs(a-t);c.rect(x-n,a,n*2,1,p)}},R=(c,x,t,o,p,a)=>{for(let n=Math.floor(t-o);n<=t+o;n++)for(let r=Math.floor(x-o);r<=x+o;r++){const e=Math.hypot(r+.5-x,n+.5-t);e<=o&&e>p&&c.rect(r,n,1,1,a)}},b=(c,x,t,o)=>{const p=new pt(x,t,2);o(p),dt(this,c,p.cv)};b("l3_pipe",32,16,c=>{c.rect(0,0,32,16,"#3d566b"),c.rect(0,0,32,3,"#52708a");for(let x=4;x<32;x+=8)c.circle(x,11,1.6,"#2a3f50")}),b("l3_brick",64,32,c=>{c.rect(0,0,64,32,"#16222e");const x=["#2c3e50","#314658","#354a5e","#2a3a4a"];for(let t=0;t<4;t++){const o=t%2?8:0;for(let p=-1;p<5;p++){const a=p*16+o,n=t*8,r=(t*31+p*17+7)%4;c.rect(a,n,15,7,x[r]),c.rect(a,n,15,1,"#4a5e72"),c.rect(a+14,n,1,7,"#22303e"),(t+p+3)%5===0&&c.rect(a+4,n+3,2,1,"#22303e")}}}),b("l3_ledge",32,8,c=>{c.rect(0,0,32,8,"#52708a"),c.rect(0,0,32,2,"#6a8aaa")}),b("l3_vent",16,16,c=>{C(c,8,2,12,6,"#8a9aab"),c.rect(2,12,12,3,"#6a7a8a")}),b("l3_steam_lo",16,16,c=>{c.circle(8,8,7,"#dfe8f0"),c.circle(8,8,3.5,"#ffffff")}),b("l3_steam_hi",16,16,c=>{c.circle(8,8,7,"#e8934a"),c.circle(8,8,3.5,"#ffd9a0")}),b("l3_flag",12,32,c=>{c.rect(2,2,2,30,"#caa050");for(let x=3;x<=13;x++)c.rect(4,x,8-(x-3),1,"#ffcf6b")}),b("l3_bat",24,12,c=>{w(c,6,6,5,"#6a4a8a"),w(c,18,6,5,"#6a4a8a"),c.ellipse(12,6,3.5,3,"#5a3a7a"),c.circle(10.5,5,1,"#ffdd66"),c.circle(13.5,5,1,"#ffdd66")}),b("l3_peach",16,16,c=>{c.circle(7,9,6,"#f5a0c0"),c.circle(5,7,2,"#ffd0e0"),c.rect(10,1,1.5,5,"#6a8a3a")}),b("l3_valve",16,16,c=>{w(c,8,8,7,"#9be07f"),c.circle(8,8,2.5,"#6aaa5f")}),b("l3_exit",24,24,c=>{R(c,12,12,11,7,"#ffcf6b"),R(c,12,12,6,3,"#caa050")}),b("l3_collapse",16,16,c=>{c.rect(0,0,16,16,"#6a7f93"),c.line(3,2,10,14,"#1d2a38",2),c.line(10,2,5,14,"#1d2a38",2)}),b("l3_boss",32,24,c=>{const x="#565b78",t="#7c82a6",o="#2e3248",p="#e8a0b8",a="#ffcf6b";c.line(24,16,27,13,o,3),c.line(27,13,30,11,x,2),c.line(30,11,31,9,o,1.5),c.ellipse(15,16,11.5,8,o),c.ellipse(15,16,10.5,7.2,x),c.ellipse(14,18,7.5,4.6,t),c.ellipse(10,21.5,2.6,1.8,o),c.ellipse(18,21.5,2.6,1.8,o),c.circle(7,10.5,6,o),c.circle(7,10.5,5.2,x),c.ellipse(3,11.5,2.8,2.1,o),c.ellipse(3,11.5,2.2,1.6,x),c.circle(1.5,10.8,1.1,"#f58aa5"),c.circle(6.4,9.7,1.5,"#ffd94a"),c.circle(6.4,9.7,.7,"#1a1420"),c.rect(4.8,7.4,3.4,.8,o),c.circle(5.5,5.2,2.4,o),c.circle(5.5,5.2,1.3,p),c.circle(10.5,4.8,2.2,o),c.circle(10.5,4.8,1.2,p),c.line(2.5,11.5,0,10,"#c8ccd8",.5),c.line(2.5,12.1,0,12.3,"#c8ccd8",.5),c.line(2.5,12.7,0,14.5,"#c8ccd8",.5),c.rect(3.6,2.6,6,1.6,"#caa050"),c.rect(4,2.8,5.2,1.1,a),c.rect(4.1,.8,1,2,a),c.rect(6.2,0,1,2.8,a),c.rect(8.3,.8,1,2,a),c.circle(6.7,.3,.5,"#ffeb99")}),b("l3_bomb",12,12,c=>{c.circle(6,6,5,"#6a9ad0"),c.circle(6,6,2,"#d0e8ff"),c.rect(9,1,3,4,"#4a7aa8")}),b("l3_roach",16,10,c=>{c.ellipse(8,6,7,4,"#6a5a3a"),c.circle(3,5,2,"#4a3a2a"),c.line(11,5,15,2,"#5a4a32",1),c.line(11,5,15,8,"#5a4a32",1)}),b("l3_spike",16,17,c=>{for(let x=0;x<3;x++){const t=3+x*5;for(let o=0;o<17;o++){const p=o/16*2.4;c.rect(t-p,o,p*2,1,o<4?"#ff6a5e":"#9aabbb")}}}),b("l3_spikeball",16,16,c=>{c.circle(8,8,5,"#6a7a8a"),c.circle(8,8,2.5,"#3d4a5a");for(let x=0;x<8;x++){const t=x*Math.PI/4;c.line(8+Math.cos(t)*4,8+Math.sin(t)*4,8+Math.cos(t)*8,8+Math.sin(t)*8,"#9aabbb",1.5)}}),b("l3_debris",16,16,c=>{c.rect(0,0,16,16,"#6a7f93"),c.rect(0,0,16,3,"#8a9fb3"),c.line(2,4,9,15,"#1d2a38",1.5),c.line(9,4,5,15,"#1d2a38",1.5),c.circle(12,12,1.5,"#4a5a6a")}),b("l3_crack",16,16,c=>{c.line(2,2,8,8,"#1d2a38",2),c.line(8,8,4,14,"#1d2a38",2),c.line(8,4,14,10,"#1d2a38",1)})}buildWorld(){this.add.tileSprite(re/2,Qe/2,re,Qe,"l3_brick").setDepth(-3),this.add.tileSprite(re/2,400,re,40,"l3_pipe").setDepth(-2).setAlpha(.85),this.add.tileSprite(re/2,1180,re,40,"l3_pipe").setDepth(-2).setAlpha(.85),this.add.rectangle(600,540,800,120,1055270).setDepth(-1),this.add.rectangle(600,480,800,10,4019819).setDepth(-1),this.add.rectangle(600,596,800,6,4019819).setDepth(-1),this.add.text(220,500,"隔壁管道(安全):蒸汽定时喷射,先看规律",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setDepth(-1);const C=this.add.tileSprite(600,600,40,1,"l3_steam_hi").setOrigin(.5,0).setDepth(-1);this.tweens.addCounter({from:0,to:1e3,duration:2400,repeat:-1,onUpdate:w=>{const R=(w.getValue()??0)/1e3;if(R>=.65||R<=.01){C.setVisible(!1);return}C.setVisible(!0),C.height=R<.5?Math.max(1,80*(R/.5)):80}}),this.plats=this.physics.add.staticGroup();for(const w of Ot.plats){const R=w.kind==="ledge"||w.kind==="collapse",b=w.kind==="collapse"?"l3_collapse":R?"l3_ledge":"l3_pipe",c=this.plats.create(w.x+w.w/2,w.y+(R?8:30),b);c.setDisplaySize(w.w,R?16:60).refreshBody();const x=c.body;x.checkCollision.down=!1,x.checkCollision.left=!1,x.checkCollision.right=!1,w.kind==="collapse"&&this.collapsePlats.push({sprite:c,def:w,falling:!1})}for(const w of Ot.pits)this.add.rectangle(w.x+w.w/2,1210,w.w,100,659222).setDepth(-1);for(const w of Ot.vents){const R=new Hi(this,w,1100);this.vents.push(R),w.id&&this.ventById.set(w.id,R)}
6377this.add.text(1560,906,"V1 转阀",{fontFamily:Q.font,fontSize:"22px",color:"#9be07f"}).setOrigin(.5).setDepth(3),this.routeValves.push(new Tn(this,1560,960,"once",()=>{var w;(w=this.ventById.get("v1"))==null||w.setDisabled(!0),this.showWorldMsg(1400,880,"蒸汽已改道排空,通路安全")})),this.add.text(1700,626,"V2 三通",{fontFamily:Q.font,fontSize:"22px",color:"#9be07f"}).setOrigin(.5).setDepth(3),this.routeValves.push(new Tn(this,1700,680,"toggle",()=>{const w=this.ventById.get("v2up"),R=this.ventById.get("v2main");w.setDisabled(!w.disabled),R.setDisabled(!R.disabled)}));for(const w of Ot.spikes.grow)this.spikes.push(new Oa(this,w));for(const w of Ot.spikes.fly)this.spikes.push(new Fa(this,w));for(const w of Ot.spikes.slide)this.spikes.push(new La(this,w));for(const w of Ot.spikes.swing)this.spikes.push(new Da(this,w));for(const w of Ot.spikes.debris)this.spikes.push(new ba(this,w));for(const w of Ot.bats)this.bats.push(new Xa(this,w));for(const w of Ot.checkpoints)w.id==="start"||w.id==="bonus"||this.add.image(w.x,w.y-40,"l3_flag").setDepth(3);for(const w of Ot.peaches){const R=this.add.image(w.x,w.y,"l3_peach").setDepth(3).setScale(.8);this.tweens.add({targets:R,y:w.y-8,duration:900,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.peaches.push({id:w.id,sprite:R})}this.add.image(140,820,"l3_crack").setDepth(2).setScale(1.2),this.crackZone=this.add.zone(140,850,170,240),this.physics.add.existing(this.crackZone,!0),this.crackHint=this.add.text(140,770,"Space 进入彩蛋",{fontFamily:Q.font,fontSize:"22px",color:Q.color.textWarm}).setOrigin(.5).setDepth(3).setVisible(!1),this.add.tileSprite(310,240,500,40,"l3_pipe").setDepth(2),this.add.tileSprite(60,320,40,160,"l3_pipe").setDepth(2),this.add.tileSprite(560,285,40,90,"l3_pipe").setDepth(2),this.add.text(505,350,"Boss 蒸汽室 ←",{fontFamily:Q.font,fontSize:"22px",color:"#ff4d5e"}).setOrigin(1,.5).setDepth(3),this.bossDoorZone=this.add.zone(560,365,34,70),this.physics.add.existing(this.bossDoorZone,!0),this.add.image(95,335,"l3_exit").setDepth(3).setAlpha(.4),this.add.text(95,278,`出口
6378(击败 Boss 后开启)`,{fontFamily:Q.font,fontSize:"22px",color:Q.color.textDim,align:"center"}).setOrigin(.5).setDepth(3),this.exitZone=this.add.zone(95,335,70,110),this.physics.add.existing(this.exitZone,!0)}update(C,w){var x;if(this.inBonus||this.pauseOpen)return;this.invulnT=Math.max(0,this.invulnT-w),this.player.setAlpha(this.invulnT>0&&Math.floor(this.time.now/90)%2?.4:1);const R=this.cursors.space.isDown;if(this.nearCrack=st.Geom.Rectangle.Overlaps(new st.Geom.Rectangle(this.player.x-12,this.player.y-12,24,24),this.crackZone.getBounds()),(x=this.crackHint)==null||x.setVisible(Math.hypot(this.player.x-140,this.player.y-810)<190).setPosition(this.player.x,this.player.y-70),this.nearCrack&&R&&!this.wasJumpDown){this.enterGravityRoom(),this.wasJumpDown=!0;return}this.dead||this.handleMove();const b=this.player.body;b.setGravityY(b.velocity.y>0&&!b.blocked.down?Va:0),this.sweepLanding(b);const c=b.blocked.down||b.touching.down;c&&!this.wasGrounded&&(this.jumpsLeft=2,this.jumpBufferedAt>0&&this.time.now-this.jumpBufferedAt<100&&(b.setVelocityY(xn),this.jumpsLeft=1),this.jumpBufferedAt=-1),this.wasGrounded=c;for(const t of this.vents)t.update(w);for(const t of this.routeValves)t.update(w);for(const t of this.bats)t.update(w);for(const t of this.spikes)t.update(w);if(!this.dead){if(this.player.y>Ga)return se()?this.respawn():this.die();for(const t of this.bats)if(t.hits(this.player.x,this.player.y))return this.die();for(const t of this.spikes)if(t.hitsPlayer(this.player.x,this.player.y))return this.die();for(const t of this.vents){if(!t.isFiring())continue;const o=t.jetRect();if(this.player.x>o.x0-12&&this.player.x<o.x1+12&&this.player.y>o.y0&&this.player.y<o.y1){if(t.kind==="hi")return this.die();this.steamPush(t)}}for(const t of this.peaches)this.collected.has(t.id)||!t.sprite.visible||Math.hypot(this.player.x-t.sprite.x,this.player.y-t.sprite.y)<40&&(this.collected.add(t.id),t.sprite.setVisible(!1),this.checkPeachMedal(),this.saveNow());for(const t of Ot.checkpoints)t.id==="start"||t.id==="bonus"||t.id===this.checkpoint.id||Math.abs(this.player.x-t.x)<48&&Math.abs(this.player.y-(t.y-40))<90&&this.hitCheckpoint(t);for(const t of this.collapsePlats)t.falling||Math.abs(this.player.x-t.sprite.x)<t.def.w/2+12&&Math.abs(this.player.y-t.sprite.y)<40&&(t.falling=!0,this.time.delayedCall(250,()=>{this.tweens.add({targets:t.sprite,y:t.sprite.y+400,alpha:0,duration:400}),t.sprite.body.enable=!1}));if(!this.bossDead&&st.Geom.Rectangle.Overlaps(new st.Geom.Rectangle(this.player.x-12,this.player.y-12,24,24),this.bossDoorZone.getBounds())){this.enterBossScene();return}this.exitOpen&&st.Geom.Rectangle.Overlaps(new st.Geom.Rectangle(this.player.x-12,this.player.y-12,24,24),this.exitZone.getBounds())&&this.showClear()}this.time.now-this.lastSave>3e3&&this.saveNow(),this.cleared&&!this.freeRoam&&!this.autoTransitioned&&this.time.now-this.clearedAt>3500&&(this.autoTransitioned=!0,this.saveNow(!0),this.scene.start("bodymap"))}handleMove(){const C=this.player.body,w=this.keyA.isDown||this.cursors.left.isDown,R=this.keyD.isDown||this.cursors.right.isDown,b=this.cursors.space.isDown;w&&!R?(C.setAccelerationX(-gn),this.facing=-1):R&&!w?(C.setAccelerationX(gn),this.facing=1):C.setAccelerationX(0),this.player.setFlipX(this.facing>0);const c=C.blocked.down||C.touching.down;c&&(this.lastGroundedAt=this.time.now);const x=!c&&this.time.now-this.lastGroundedAt>90;if(c&&Math.abs(C.velocity.x)>30?this.setBoarTexture("boar_run"):x?this.setBoarTexture("boar_jump"):c&&this.setBoarTexture("boar_idle"),b&&!this.wasJumpDown){const t=this.time.now,o=t-this.lastGroundedAt<=90;c||o&&this.jumpsLeft===2?(C.setVelocityY(xn),this.jumpsLeft=1):this.jumpsLeft>0?(C.setVelocityY(za),this.jumpsLeft--):this.jumpBufferedAt=t}!b&&this.wasJumpDown&&C.velocity.y<yn&&C.setVelocityY(yn),this.wasJumpDown=b}sweepLanding(C){if(C.velocity.y<=0)return;const w=C.position.y+C.height,R=C.position.x,b=R+C.width;for(const c of this.plats.getChildren()){const x=c.body;if(x.enable===!1||b<=x.left||R>=x.right)continue;const t=x.top;if(w>=t&&w<=t+28){C.position.y=t-C.height,C.velocity.y=0,C.blocked.down=!0;return}}}setBoarTexture(C){if(this.player.texture.key===C)return;const w=this.player.body,R=w.center.x,b=w.position.y+w.height;this.player.setTexture(C),this.player.setPosition(R-w.width/2-this.player.scaleX*(w.offset.x-this.player.dis
6378playOriginX),b-w.height-this.player.scaleY*(w.offset.y-this.player.displayOriginY))}showWorldMsg(C,w,R){const b=this.add.text(C,w,R,{fontFamily:Q.font,fontSize:"24px",color:Q.color.success}).setOrigin(.5).setDepth(5);this.tweens.add({targets:b,alpha:0,delay:3600,duration:600,onComplete:()=>b.destroy()})}steamPush(C){if(this.invulnT>0)return;const w=this.player.body,R=this.player.x<C.x?-1:1;w.setVelocity(R*260,-420),this.invulnT=500,this.cameras.main.shake(100,.003)}enterBossScene(){this.enteringBoss||(this.enteringBoss=!0,this.cameras.main.fadeOut(400,10,15,26),this.time.delayedCall(430,()=>{this.saveNow(),this.scene.launch("level3boss",{parent:this}),this.scene.sleep("level3ui"),this.scene.sleep("level3")}))}onBossDamaged(C){}completeBossFight(C){this.scene.wake("level3"),this.scene.wake("level3ui"),this.cameras.main.fadeIn(400,10,15,26),this.deaths+=C,this.bossDead=!0,this.exitOpen=!0,this.invulnT=1500,this.add.image(95,335,"l3_exit").setDepth(3).setAlpha(1),this.showWorldMsg(320,300,"水老鼠王已被讨伐!快钻管口撤离"),this.saveNow()}
6378enterGravityRoom(){if(this.inBonus)return;this.inBonus=!0;const C=Ot.checkpoints.find(w=>w.id==="bonus");this.checkpoint=C,this.saveNow(),this.scene.launch("level3gravity",{parent:this}),this.scene.sleep("level3")}completeGravity(C){if(this.scene.wake("level3"),this.scene.stop("level3gravity"),this.cameras.main.fadeIn(300,10,15,26),this.inBonus=!1,this.dead=!1,this.invulnT=1200,this.jumpsLeft=2,this.setBoarTexture("boar_idle"),this.player.setAlpha(1),this.player.body.setVelocity(0,0).setAcceleration(0,0),C){this.badge=!0;for(const R of je)this.collected.add(R);const w=Ot.checkpoints.find(R=>R.id==="C");this.checkpoint=w,this.player.setPosition(w.x,w.y-40),this.showWorldMsg(w.x,w.y-120,"获得磁铁徽章 + 仙桃×5"),this.checkPeachMedal()}else{const w=Ot.checkpoints.find(R=>R.id==="bonus");this.player.setPosition(w.x,w.y-40)}this.saveNow()}die(){this.dead||se()||this.invulnT>0||(this.dead=!0,this.deaths++,this.setBoarTexture("boar_hurt"),this.player.body.setVelocity(0,0).setAcceleration(0,0),this.cameras.main.flash(250,180,40,40),this.time.delayedCall(700,()=>this.respawn()))}respawn(){this.setBoarTexture("boar_idle");const C=this.spawnPoint();this.player.setPosition(C.x,C.y).setAlpha(1),this.player.body.setVelocity(0,0).setAcceleration(0,0),this.dead=!1,this.invulnT=1200,this.jumpsLeft=2;for(const R of this.collapsePlats)R.falling=!1,R.sprite.setPosition(R.def.x+R.def.w/2,R.def.y+8).setAlpha(1),R.sprite.body.enable=!0,R.sprite.refreshBody();for(const R of this.spikes)R.reset()}spawnPoint(){return{x:this.checkpoint.x,y:this.checkpoint.y-40}}hitCheckpoint(C){this.checkpoint.id!==C.id&&(this.checkpoint=C,this.cameras.main.flash(150,255,220,120),this.saveNow())}checkPeachMedal(){this.peachMedal||this.collected.size<Ot.peaches.length+je.length||(this.peachMedal=!0,this.cameras.main.flash(300,255,220,120),this.showWorldMsg(this.player.x,this.player.y-120,"里程碑:桃子全收集!获得【桃子勋章】"))}hudString(){const C=this.bossDead?" · 出口已开启":"",w=[this.badge?"磁铁徽章":"",this.peachMedal?"桃子勋章":""].filter(Boolean).join(" / "),R=w?` · ${w}`:"";return`第三关 · 管线   检查点 ${this.checkpoint.id}${C}${R}   桃子 ${this.collected.size}/${Ot.peaches.length+je.length}   死亡 ${this.deaths}`}clearStats(){return`桃子 ${this.collected.size}/${Ot.peaches.length+je.length} · 死亡 ${this.deaths} 次 · [Space] 停留探索 · [Enter] 立即最终关 → · 3 秒后自动进入最终关 · [M] 返回主菜单`}togglePause(){if(!this.cleared){if(this.pauseOpen=!this.pauseOpen,!this.pauseOpen){this.physics.resume(),this.tweens.resumeAll();return}this.physics.pause(),this.tweens.pauseAll()}}showClear(){this.cleared||(this.cleared=!0,this.clearedAt=this.time.now,this.saveNow(!0))}saveNow(C=!1){this.lastSave=this.time.now;const w=[...Ot.peaches.map(R=>R.id),...je].filter(R=>this.collected.has(R));_t.write({v:2,savedAt:Date.now(),elapsed:this.time.now,deaths:this.deaths,cleared:this.cleared||C,laserTipShown:!1,level:3,level3:{checkpoint:this.checkpoint.id,peaches:w,badge:this.badge,deaths:this.deaths,cleared:this.cleared||C,bossHp:this.bossDead?0:3,peachMedal:this.peachMedal}})}applyLevel3Save(C){const w=C.level3;if(!w)return;const R=Ot.checkpoints.find(b=>b.id===w.checkpoint);R&&(this.checkpoint=R,this.player.setPosition(R.x,R.y-40)),this.collected=new Set(w.peaches??[]);for(const b of this.peaches)this.collected.has(b.id)&&b.sprite.setVisible(!1);this.deaths=w.deaths??0,this.badge=w.badge??!1,this.peachMedal=w.peachMedal??!1,typeof w.bossHp=="number"&&w.bossHp<=0&&!this.bossDead&&(this.bossDead=!0,this.exitOpen=!0,this.add.image(95,335,"l3_exit").setDepth(3).setAlpha(1)),w.cleared&&this.showClear()}}const fe=640,Me=480,Wa=520,Sn=2400,Ha=320,Ka=2e3,Ja=-660,Za=-620,Cn=-150,Qa=1e3,ja=[{x:40,y:180,w:160,h:16,normal:{x:0,y:-1}},{x:220,y:300,w:160,h:16,normal:{x:0,y:-1}},{x:100,y:420,w:180,h:16,normal:{x:0,y:-1}}],ui={x:100,y:130},Kt={x:190,y:390,w:120};class $a extends st.Scene{constructor(){super("level3gravity");H(this,"parent");H(this,"player");H(this,"plats");H(this,"magnets",[]);H(this,"magnetDefs",[]);H(this,"exitZone");H(this,"hintText");H(this,"facing",1);H(this,"jumpsLeft",2);H(this,"wasJumpDown",!1);H(this,"wasGrounded",!0);H(this,"dead",!1);H(this,"stuckTo");H(this,"cleared",!1);H(this,"rotateDone",!1);H(this,"cursors");H(this,"keyA");H(this,"keyD")}init(C){this.parent=C.parent,this.dead=!1,this.cleared=!1,this.rotateDone=!1,this.stuckTo=void 0,this.facing=1,this.jumpsLeft=2,this.wasJumpDown=!1,this.wasGrounded=!0,this.magnets=[],this.magnetDefs=[]}create(){this.makeTextures(),this.add.rectangle(fe/2,Me/2,fe,Me,1183514).setDepth(-3),this.add.rectangle(fe/2,Me+20,fe,80,657936).setDepth(-2);for(let b=0;b<18;b++){const c=24+b*36;this.add.image(c,Me-6,"l3_gear").setDepth(-1).setScale(.6+Math.random()*.4)}this.plats=this.physics.add.staticGroup();
6378for(const b of ja){this.plats.create(b.x+b.w/2,b.y+b.h/2,"l3_magnet").setDisplaySize(b.w,b.h).refreshBody();const c=this.add.rectangle(b.x+b.w/2,b.y+b.h/2,b.w,b.h,7317759,.35).setDepth(1);this.magnets.push(c),this.magnetDefs.push(b)}this.plats.create(Kt.x+Kt.w/2,Kt.y+8,"l3_pipe").setDisplaySize(Kt.w,16).refreshBody(),this.player=this.physics.add.sprite(ui.x,ui.y,"boar_idle");const C=this.player.height;this.player.setScale(56/C);const w=this.player.body;w.setSize(24*C/56,24*C/56),w.setMaxVelocity(Ha,1400),w.setDragX(Ka),w.setCollideWorldBounds(!1),this.physics.add.collider(this.player,this.plats),this.exitZone=this.add.zone(Kt.x+Kt.w/2,Kt.y-10,Kt.w,40),this.physics.add.existing(this.exitZone,!0),this.add.image(Kt.x+Kt.w/2,Kt.y-26,"l3_exit").setDepth(2),this.add.text(Kt.x+Kt.w/2,Kt.y-46,"出口平台",{fontFamily:Q.font,fontSize:"16px",color:"#ffcf6b"}).setOrigin(.5).setDepth(2),this.cameras.main.setBounds(-2e3,-2e3,fe+4e3,Me+4e3).setBackgroundColor(1183514).setRoundPixels(!0).setZoom(1.5).centerOn(fe/2,Me/2),this.physics.world.setBounds(0,0,fe,Me+100),this.cameras.main.fadeIn(400,10,15,26),this.hintText=this.add.text(fe/2,40,`相机在旋转,但重力没有变。
6379Space 跳跃,A/D 移动,粘住蓝色面即可保命。`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim,align:"center"}).setOrigin(.5).setDepth(10);const R=this.input.keyboard;this.cursors=R.createCursorKeys(),this.keyA=R.addKey(st.Input.Keyboard.KeyCodes.A),this.keyD=R.addKey(st.Input.Keyboard.KeyCodes.D),this.time.delayedCall(700,()=>{this.tweens.add({targets:this.cameras.main,rotation:Math.PI/2,duration:900,ease:"Sine.inOut",onComplete:()=>
6379{this.rotateDone=!0,this.hintText.setText("粘住蓝色磁力面,跳到出口平台!")}})})}makeTextures(){const C=(w,R,b,c)=>{const x=new pt(R,b,2);c(x),dt(this,w,x.cv)};C("l3_magnet",32,4,w=>{w.rect(0,0,32,4,"#4a8aff"),w.rect(0,0,32,1,"#8fc4ff");for(let R=2;R<32;R+=6)w.rect(R,1,2,2,"#dfefff")}),C("l3_gear",12,12,w=>{w.circle(6,6,4,"#6a6a7a"),w.circle(6,6,1.5,"#3a3a4a");for(let R=0;R<6;R++){const b=R*Math.PI/3;w.rect(6+Math.cos(b)*3-.5,6+Math.sin(b)*3-.5,2,2,"#8a8a9a")}})}update(C,w){if(this.cleared||this.dead)return;const R=this.player.body,b=this.keyA.isDown||this.cursors.left.isDown,c=this.keyD.isDown||this.cursors.right.isDown,x=this.cursors.space.isDown,t=new st.Geom.Rectangle(this.player.x-12,this.player.y-12,24,24);let o=!1;for(let p=0;p<this.magnets.length;p++){const a=this.magnets[p].getBounds(),n=this.magnetDefs[p];if((n.normal.x>0&&this.player.x>a.centerX||n.normal.x<0&&this.player.x<a.centerX||n.normal.y>0&&this.player.y>a.centerY||n.normal.y<0&&this.player.y<a.centerY)&&st.Geom.Rectangle.Overlaps(t,a)){if(o=!0,this.stuckTo=n,n.normal.x!==0){const e=n.normal.x>0?a.right+12:a.left-12;this.player.x=e,R.setVelocityX(0)}if(n.normal.y!==0){const e=n.normal.y>0?a.bottom+12:a.top-12;this.player.y=e,R.setVelocityY(0)}this.jumpsLeft=2,this.player.setTexture("boar_idle");break}}
6379if(o||(this.stuckTo=void 0),this.stuckTo){if(R.setAccelerationX(0),R.setGravityY(0),x&&!this.wasJumpDown){const p=this.stuckTo.normal,a=p.x*420,n=p.y*420;R.setVelocity(a,n),this.jumpsLeft=1}}else{b&&!c?(R.setAccelerationX(-Sn),this.facing=-1):c&&!b?(R.setAccelerationX(Sn),this.facing=1):R.setAccelerationX(0),this.player.setFlipX(this.facing>0),R.setGravityY(R.velocity.y>0?Qa:0);const p=R.blocked.down||R.touching.down;p&&!this.wasGrounded&&(this.jumpsLeft=2),this.wasGrounded=p,x&&!this.wasJumpDown&&this.jumpsLeft>0&&(R.setVelocityY(this.jumpsLeft===2?Ja:Za),this.jumpsLeft--),!x&&this.wasJumpDown&&R.velocity.y<Cn&&R.setVelocityY(Cn)}if(this.wasJumpDown=x,R.velocity.y>0){const p=R.position.y+R.height;for(const a of this.plats.getChildren()){const n=a.body,r=R.position.x;if(!(r+R.width<=n.left||r>=n.right)&&p>=n.top&&p<=n.top+28){R.position.y=n.top-R.height,R.velocity.y=0,R.blocked.down=!0;break}}}if(this.player.y>Wa){if(se()){this.player.setPosition(ui.x,ui.y),R.setVelocity(0,0).setAcceleration(0,0);return}return this.die()}st.Geom.Rectangle.Overlaps(t,this.exitZone.getBounds())&&this.complete()}die(){this.dead||(this.dead=!0,this.player.setTexture("boar_hurt"),this.cameras.main.shake(120,.005),this.time.delayedCall(700,()=>{var C;(C=this.parent)==null||C.completeGravity(!1)}))}complete(){this.cleared||(this.cleared=!0,this.cameras.main.flash(200,120,255,120),this.time.delayedCall(400,()=>{var C;(C=this.parent)==null||C.completeGravity(!0)}))}}class ka extends st.Scene{constructor(){super("level3ui");H(this,"parent");H(this,"hud");H(this,"pauseBox");H(this,"clearBox")}init(C){this.parent=C.parent}create(){this.hud=this.add.text(24,20,"",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain});const C=this.add.text(640,684,"A/D/←→ 移动 · Space 跳跃(长按更高,可二段跳)· 橙汽/小刺/深坑即死 · 踩绿阀改蒸汽",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5);this.tweens.add({targets:C,alpha:0,delay:9e3,duration:800})}update(){this.hud.setText(this.parent.hudString()),this.parent.pauseOpen&&!this.pauseBox?this.showPause():!this.parent.pauseOpen&&this.pauseBox&&(this.pauseBox.destroy(!0),this.pauseBox=void 0);const C=this.parent;C.cleared&&!C.freeRoam&&!this.clearBox&&this.showClear(),C.freeRoam&&this.clearBox&&(this.clearBox.destroy(!0),this.clearBox=void 0)}showPause(){const C=this.add.container(0,0);C.add(this.add.rectangle(0,0,1280,720,659737,.6).setOrigin(0));const w=this.add.graphics();Pt(w,430,250,420,220),C.add(w),C.add(this.add.text(640,300,`— 暂停 —
6380[Esc] 继续   [R] 重开本关   [Q] 存档回菜单`,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain,align:"center"}).setOrigin(.5)),this.pauseBox=C}showClear(){const C=this.add.container(0,0);C.add(this.add.rectangle(0,0,1280,720,659737,.6).setOrigin(0)),C.add(this.add.text(640,330,"LEVEL 3 CLEAR!",{fontFamily:Q.font,fontSize:Q.size.xl,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5)),C.add(this.add.text(640,384,this.parent.clearStats(),{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textDim}).setOrigin(.5)),this.clearBox=C}}const De=1280,Fi=720,be=620;class qa extends st.Scene{constructor(){super("level3boss");H(this,"parent");H(this,"player");H(this,"boss");H(this,"bossBar");H(this,"shotPool");H(this,"plats");H(this,"bossVents",[]);H(this,"bombs",[]);H(this,"roaches",[]);H(this,"invulnT",0);H(this,"fightDeaths",0);H(this,"over",!1);H(this,"nextVentAt",0);H(this,"lastPhase",0)}init(C){this.parent=C.parent,this.fightDeaths=0,this.over=!1,this.invulnT=0,this.bossVents=[],this.bombs=[],this.roaches=[]}create(){this.makeTextures(),this.buildArena(),this.player=new bn(this,180,560,{left:this.input.keyboard.addKey(st.Input.Keyboard.KeyCodes.A),right:this.input.keyboard.addKey(st.Input.Keyboard.KeyCodes.D),jump:this.input.keyboard.addKey(st.Input.Keyboard.KeyCodes.SPACE),shoot:this.input.keyboard.addKey(st.Input.Keyboard.KeyCodes.J),cursors:this.input.keyboard.createCursorKeys()}),this.player.god=se(),this.physics.add.collider(this.player,this.plats),this.player.on("dead",this.onPlayerDead,this),this.boss=new Wi(this,950,be-45,24),this.bossBar=new gi(this,"水老鼠王"),this.shotPool=new ti(this,"bullet_p",60,6,6);for(const C of[260,480,700,920])this.bossVents.push(new Yi(this,C,be,"up",500));this.nextVentAt=this.time.now+2600,this.add.text(De/2,Fi-24,"A/D 移动 · Space 跳跃(可二段) · J 射击 · 蒸汽预警时躲开",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5).setDepth(30),this.cameras.main.fadeIn(500,10,15,26)}makeTextures(){if(!this.textures.exists("bullet_p")){const C=new pt(8,8,2);C.circle(4,4,3.5,"#ffd9a0"),C.circle(4,4,2,"#f5a0c0"),dt(this,"bullet_p",C.cv)}}buildArena(){this.add.tileSprite(De/2,Fi/2,De,Fi,"l3_brick").setDepth(-3),this.add.tileSprite(De/2,40,De,40,"l3_pipe").setDepth(-2).setAlpha(.5),this.plats=this.physics.add.staticGroup();const C=(w,R,b,c=60,x=!1)=>{const t=this.plats.create(w,R,"l3_pipe");if(t.setDisplaySize(b,c).refreshBody(),x){const o=t.body;o.checkCollision.down=!1,o.checkCollision.left=!1,o.checkCollision.right=!1}return t};C(De/2,be+30,1040),C(330,500,170,16,!0),C(790,500,170,16,!0),this.add.tileSprite(100,360,40,520,"l3_pipe").setDepth(-1),this.add.tileSprite(1180,360,40,520,"l3_pipe").setDepth(-1),Et.left=140,Et.right=1140,Et.floorY=be}surfaceYAtX(C){return C>245&&C<415||C>705&&C<875?492:be}sweepLanding(){const C=this.player.body;if(C.velocity.y<=0)return;const w=C.position.y+C.height,R=C.position.x,b=R+C.width;for(const c of this.plats.getChildren()){const x=c.body;if(!(b<=x.left||R>=x.right)&&w>=x.top&&w<=x.top+28){C.position.y=x.top-C.height,C.velocity.y=0,C.blocked.down=!0;return}}}update(C,w){var c,x;if(this.over)return;this.invulnT=Math.max(0,this.invulnT-w);const R=this.time.now;this.player.update(C,this.boss,this.shotPool,"auto"),this.sweepLanding(),this.boss.update(w);
6380for(const t of this.bombs)t.update();this.bombs=this.bombs.filter(t=>t.active);for(const t of this.roaches)t.update(w);const b=this.boss.bodyRect();if(this.shotPool.group.children.each(t=>{const o=t;return o.active&&o.x>b.x0-8&&o.x<b.x1+8&&o.y>b.y0-8&&o.y<b.y1+8&&(this.boss.takeBulletDamage(),this.shotPool.recycle(o)),!0}),this.shotPool.sweep(),R>=this.nextVentAt){const t=this.boss.phase;this.nextVentAt=R+(t>=2?2100:t===1?2700:3400);const o=[...this.bossVents].sort((a,n)=>Math.abs(a.x-this.player.x)-Math.abs(n.x-this.player.x));(c=o[0])==null||c.trigger();const p=o.slice(1);(x=p[Math.floor(Math.random()*p.length)])==null||x.trigger()}for(const t of this.bossVents)t.update(w);for(const t of this.bossVents){if(!t.isFiring())continue;const o=t.jetRect();this.player.x+10>o.x0&&this.player.x-10<o.x1&&this.player.y+12>o.y0&&this.player.y-12<o.y1&&this.damagePlayer()}this.bossBar.update(C,w,this.boss.hp,this.boss.maxHp,this.boss.phase,3,this.boss.stateLabel),this.boss.phase!==this.lastPhase&&(this.lastPhase=this.boss.phase,this.bossBar.phasePulse()),this.boss.dead&&this.win()}die(){this.damagePlayer()}damagePlayer(){this.invulnT>0||!this.player.alive||this.player.hit()}onPlayerDead(){this.over||(this.fightDeaths++,this.cameras.main.flash(250,180,40,40),this.time.delayedCall(900,()=>{if(!this.over){this.shotPool.clear();for(const C of this.bombs)C.destroy();this.bombs=[],this.player.respawn(180,560),this.invulnT=1500}}))}spawnWaterBomb(C,w){this.bombs.push(new Ra(this,C,w))}spawnRoach(C){this.roaches.push(new wa(this,C,be-12))}onBossDamaged(C){}onBossDead(){this.win()}win(){this.over||(this.over=!0,this.cameras.main.flash(400,255,220,120),this.bossBar.setVisible(!1),this.time.delayedCall(1300,()=>{this.cameras.main.fadeOut(450,10,15,26),this.time.delayedCall(480,()=>{this.scene.stop("level3boss"),this.parent.completeBossFight(this.fightDeaths)})}))}}const $e=12,ke=6,Ie=100,_a={turretA:30,turretB:30,shield:20,heal:25,boss:40},En=15,pe=[{c:0,r:6,type:"source",rot:1},{c:1,r:6,type:"straight",rot:0},{c:2,r:6,type:"elbow",rot:3},{c:2,r:5,type:"cross",rot:0},{c:1,r:5,type:"tank",rot:1},{c:3,r:5,type:"elbow",rot:3},{c:3,r:4,type:"tee",rot:1,consumer:"turretA"},{c:3,r:3,type:"cross",rot:0},{c:3,r:2,type:"straight",rot:1,cracked:!0},{c:4,r:2,type:"straight",rot:0},{c:5,r:2,type:"tee",rot:2},{c:4,r:4,type:"tee",rot:3},{c:4,r:5,type:"elbow",rot:0},{c:5,r:5,type:"straight",rot:0,consumer:"shield"},{c:6,r:5,type:"elbow",rot:3},{c:6,r:4,type:"elbow",rot:1},{c:7,r:4,type:"elbow",rot:3,cracked:!0},{c:7,r:3,type:"elbow",rot:1},{c:8,r:3,type:"straight",rot:0},{c:9,r:3,type:"tee",rot:0},{c:9,r:4,type:"terminal",rot:0,consumer:"heal"},{c:4,r:3,type:"tee",rot:0},{c:5,r:3,type:"elbow",rot:3},{c:6,r:2,type:"elbow",rot:3},{c:6,r:1,type:"elbow",rot:1},{c:7,r:1,type:"straight",rot:0},{c:8,r:1,type:"elbow",rot:2},{c:8,r:2,type:"elbow",rot:0,consumer:"turretB"},{c:9,r:2,type:"elbow",rot:2},{c:10,r:3,type:"elbow",rot:3},{c:10,r:2,type:"elbow",rot:1},{c:11,r:2,type:"straight",rot:0},{c:12,r:2,type:"elbow",rot:3},{c:12,r:1,type:"regulator",rot:1},{c:12,r:0,type:"terminal",rot:2,consumer:"boss"},{c:2,r:4,type:"straight",rot:1},{c:2,r:3,type:"elbow",rot:1}],Un=[{a:[3,4],b:[3,3],oneWayFrom:[3,4]},{a:[9,3],b:[9,4],oneWayFrom:[9,3]}],to="0,6",zn="12,0",Ft=($,N)=>`${$},${N}`,vi=new Map(pe.map($=>[Ft($.c,$.r),$])),eo=($,N)=>vi.get(Ft($,N));function Ki($,N){const C=(N%4+4)%4;switch($.type){case"source":return[1];case"straight":case"regulator":return C%2===0?[1,3]:[0,2];case"elbow":return[C,(C+1)%4];case"tee":return[0,1,2,3].filter(w=>w!==(C+2)%4);case"cross":return[0,1,2,3];case"tank":case"terminal":return[C]}}const io={0:[0,-1],1:[1,0],2:[0,1],3:[-1,0]};function so($,N,C={}){const w=C.reversed?zn:to,R={},b=[w];for(R[w]={low:!1,dist:0};b.length;){const o=b.shift(),[p,a]=o.split(",").map(Number),n=vi.get(o),r=R[o];for(const e of Ki(n,$[o]??n.rot)){const[s,h]=io[e],i=Ft(p+s,a+h),l=vi.get(i);if(!l||N.has(i)||R[i])continue;const u=(e+2)%4;if(!Ki(l,$[i]??l.rot).includes(u))continue;const d=Un.find(f=>Ft(...f.a)===o&&Ft(...f.b)===i||Ft(...f.b)===o&&Ft(...f.a)===i);if(d){const f=Ft(...d.oneWayFrom)===o;if(C.reversed?f:!f)continue}R[i]={low:r.low||n.type==="regulator",dist:r.dist+1},b.push(i)}}let c=Ie+(C.tankBoost??0);const x=[];if(!C.reversed){for(const o of Object.keys(R))vi.get(o).cracked&&o!==w&&(x.push(o),c-=En);C.bugDrain&&(c-=En)}const t={};if(!C.reversed&&c>0){const o=pe.filter(p=>p.consumer&&R[Ft(p.c,p.r)]).sort((p,a)=>R[Ft(p.c,p.r)].dist-R[Ft(a.c,a.r)].dist);for(const p of o){const a=_a[p.consumer];c>=a&&(t[p.consumer]=!0,c-=a)}}return{active:R,powered:t,margin:Math.max(0,c),leaks:x,budget:Ie+(C.tankBoost??0)}}function no($=Math.random){const N={};for(const C of pe)C.type==="source"||C.type==="terminal"||C.type==="tank"?N[Ft(C.c,C.r)]=C.rot:C.type==="cross"?N[Ft(C.c,C.r)]=0:C.type==="straight"||C.type==="regulator"?N[Ft(C.c,C.r)]=$()<.5?0:1:N[Ft(C.c,C.r)]=Math.floor($()*4);return N}const Mn="yyvschili.pipe.save.v1",Gt=86,ae=90,oe=110,Jt=($,N)=>({x:ae+$*Gt,y:oe+N*Gt}),ft={bg:988960,grid:2373706,dot:4020853,pipeOff:4019819,pipeOn:4885247,pipeLow:9421823,pipeRev:12615679,enemy:15242058,danger:16097472,ok:10215551,gold:16764779,red:16731486,shield:6982399,heal:8380576,text:"#eef4ec",dim:"#93a7a0"},xt={chargeRate:4.5,chargeRateHigh:9,overloadRate:18,overloadDecay:10,overloadPenalty:25,stunMs:12e3,holdNeed:5,waveMs:3e4,turretDmg:12,turretCdMs:700,turretRange:340,clickDmg:8,tankCap:120,healMs:8e3,coreMax:5,shieldMax:100,shieldBlockCost:25,shieldRegen:12,reverseEveryMs:2e4,reverseMs:6e3,lockEveryMs:12e3,lockMs:1e4,gnawEveryMs:15e3,roachGnawMs:8e3,bugDrainMs:12e3,repairClicks:3},An={rat:{hp:20,speed:120},roach:{hp:35,speed:55},bug:{hp:25,speed:70}};class ro extends st.Scene{constructor(){super("level3pipe");H(this,"rots",{});H(this,"broken",new Set);H(this,"repair",{});H(this,"locks",new Map);H(this,"flow",null);H(this,"flowAt",0);H(this,"charge",0);H(this,"holdT",0);H(this,"overload",0);H(this,"stunUntil",0);H(this,"coreHp",xt.coreMax);H(this,"shieldEnergy",xt.shieldMax);H(this,"tankStore",0);H(this,"tankBoostUntil",0);H(this,"tankBoostRate",0);H(this,"healAcc",0);H(this,"wave",0);H(this,"waveAt",0);H(this,"reverseUntil",0);
6380H(this,"nextReverseAt",0);H(this,"nextLockAt",0);H(this,"nextGnawAt",0);H(this,"deaths",0);H(this,"cleared",!1);H(this,"over",!1);H(this,"paused",!1);H(this,"elapsed",0);H(this,"god",!1);H(this,"enemies",[]);H(this,"spawnQueue",[]);H(this,"fx",[]);H(this,"msgs",[]);H(this,"pipeG");H(this,"dynG");H(this,"hudText");H(this,"msgText");H(this,"overlay");H(this,"saveTimer");H(this,"onPageHide",()=>this.save())}init(){let C=null;try{const w=localStorage.getItem(Mn);if(w){const R=JSON.parse(w);R&&typeof R=="object"&&R.rots&&typeof R.charge=="number"&&(C=R)}}catch{}C?(this.rots={...C.rots},this.broken=new Set(C.broken),this.charge=C.charge,this.holdT=C.hold,this.coreHp=Math.max(1,C.coreHp),this.wave=C.wave,this.tankStore=C.tank,this.shieldEnergy=C.shield,this.overload=C.overload,this.deaths=C.deaths,this.cleared=C.cleared):this.rots=no()}create(){var w,R,b;this.god=se(),this.cameras.main.setBackgroundColor(ft.bg),this.drawStatic(),this.pipeG=this.add.graphics(),this.dynG=this.add.graphics(),this.hudText=this.add.text(24,14,"",{fontFamily:"monospace",fontSize:"15px",color:ft.text}).setDepth(10),this.msgText=this.add.text(640,646,"",{fontFamily:"monospace",fontSize:"13px",color:ft.dim,lineSpacing:4,align:"center"}).setOrigin(.5,0).setDepth(10),this.add.text(640,688,"点击管件旋转 · 把蒸汽引向右上角 Boss 室(须经调压器变低压) · 点击敌人点杀 · 蓄压罐充满后点击释放 · ESC 暂停",{fontFamily:"monospace",fontSize:"13px",color:ft.dim}).setOrigin(.5);const C=this.time.now;this.waveAt=C+(this.wave===0?6e3:1e4),this.nextReverseAt=C+xt.reverseEveryMs,this.nextLockAt=C+xt.lockEveryMs,this.nextGnawAt=C+xt.gnawEveryMs,this.input.on("pointerdown",c=>this.onClick(c)),(w=this.input.keyboard)==null||w.on("keydown-ESC",()=>this.togglePause()),(R=this.input.keyboard)==null||R.on("keydown-M",()=>{(this.cleared||this.over)&&(this.save(),this.scene.start("menu"))}),(b=this.input.keyboard)==null||b.on("keydown-R",()=>{this.over&&this.restart()}),window.addEventListener("pagehide",this.onPageHide),this.saveTimer=this.time.addEvent({delay:5e3,loop:!0,callback:()=>this.save()}),this.events.once(st.Scenes.Events.SHUTDOWN,()=>{window.removeEventListener("pagehide",this.onPageHide)}),this.cleared?this.showEnd(!0):this.say(this.wave===0?"目标:给 Boss 室充能到 100% 并维持 5 秒":"读档成功,继续充能",ft.ok)}update(C,w){if(this.paused||this.over||this.cleared)return;const R=this.time.now,b=w/1e3;this.elapsed+=w;const c=R<this.reverseUntil;!c&&this.charge<40&&R>=this.nextReverseAt&&this.charge>0&&(this.reverseUntil=R+xt.reverseMs,this.nextReverseAt=R+xt.reverseEveryMs,this.say("水老鼠王反转了全网流向!",ft.danger)),R-this.flowAt>200&&(this.flowAt=R,this.flow=so(this.rots,this.broken,{reversed:c,tankBoost:R<this.tankBoostUntil?this.tankBoostRate:0,bugDrain:this.enemies.some(a=>a.kind==="bug"&&a.state==="attach"&&!a.dead)}),this.drawPipes(c));const x=this.flow,t=x.active[zn];x.active["1,5"]&&x.margin>0&&R>=this.tankBoostUntil&&(this.tankStore=Math.min(xt.tankCap,this.tankStore+Math.min(x.margin,40)*b));const p=R<this.stunUntil;if(x.powered.boss&&t&&!p&&this.charge<100&&(t.low?(this.charge=Math.min(100,this.charge+xt.chargeRate*b),this.overload=Math.max(0,this.overload-xt.overloadDecay*b)):(this.charge=Math.min(100,this.charge+xt.chargeRateHigh*b),this.overload+=xt.overloadRate*b,this.overload>=100&&(this.overload=0,this.charge=Math.max(0,this.charge-xt.overloadPenalty),this.stunUntil=R+xt.stunMs,this.say("高压爆管!Boss 室充能 -25%,瘫痪 12 秒",ft.red)))),this.charge>=100&&!this.cleared&&(x.powered.boss&&!p&&(this.holdT+=b),R%4e3<w&&this.holdSpawn(R),this.holdT>=xt.holdNeed)){this.cleared=!0,this.save(),this.showEnd(!0);return}for(this.charge>=40&&this.charge<75&&R>=this.nextLockAt&&(this.nextLockAt=R+xt.lockEveryMs,this.lockRandom(R)),this.charge>=75&&this.charge<100&&R>=this.nextGnawAt&&(this.nextGnawAt=R+xt.gnawEveryMs,this.gnawActive()),R>=this.waveAt&&this.charge<100&&(this.wave+=1,this.waveAt=R+xt.waveMs,this.queueWave(R));this.spawnQueue.length&&this.spawnQueue[0].at<=R;)this.spawnEnemy(this.spawnQueue.shift().kind);x.powered.shield&&(this.shieldEnergy=Math.min(xt.shieldMax,this.shieldEnergy+xt.shieldRegen*b)),x.powered.heal&&(this.healAcc+=w,this.healAcc>=xt.healMs&&(this.healAcc=0,this.coreHp=Math.min(xt.coreMax,this.coreHp+1))),this.turretFire("turretA",R),this.turretFire("turretB",R),this.updateEnemies(b,R),this.fx=this.fx.filter(a=>a.until>R),this.msgs=this.msgs.filter(a=>a.until>R),this.drawDyn(R),this.drawHud(R,c,p)}queueWave(C){const w=Math.min(2+this.wave,6),R=this.wave>=3?Math.min(this.wave-2,3):0,b=this.wave>=5?Math.min(this.wave-4,2):0;let c=0;for(;c<w;c++)this.spawnQueue.push({kind:"rat",at:C+c*1e3});for(let x=0;x<R;x++)this.spawnQueue.push({kind:"roach",at:C+c++*1e3});for(let x=0;x<b;x++)this.spawnQueue.push({kind:"bug",at:C+c++*1e3});this.say(`第 ${this.wave} 波来袭!`,ft.enemy)}holdSpawn(C){const w=["rat","roach","rat","bug"];this.spawnEnemy(w[Math.floor(Math.random()*w.length)])}spawnEnemy(C){const w=An[C],b=(C==="rat"?[[0,2],[0,6]]:C==="roach"?[[12,5],[11,5],[10,5],[10,4],[10,3]]:[[4,0],[4,1],[5,1],[5,2]]
6380).map(([c,x])=>Jt(c,x));this.enemies.push({kind:C,x:b[0].x,y:b[0].y,hp:w.hp,speed:w.speed,path:b,wp:1,state:"walk",stateUntil:0,gnawTargets:C==="roach"?["10,3","9,3","9,2","8,2","8,1","7,1"]:[],gnawIdx:0,dead:!1})}updateEnemies(C,w){for(const R of this.enemies){if(R.dead)continue;if(R.state==="gnaw"||R.state==="attach"){if(w>=R.stateUntil)if(R.state==="gnaw"){const p=R.gnawTargets[R.gnawIdx];if(this.broken.has(p)||(this.broken.add(p),this.say(`蟑螂啃断了管件 ${p}!点击 3 次修复`,ft.red)),R.gnawIdx+=1,R.gnawIdx<R.gnawTargets.length){const[a,n]=R.gnawTargets[R.gnawIdx].split(",").map(Number);R.path=[Jt(a,n)],R.wp=0,R.state="walk"}else R.state="idle"}else R.dead=!0;continue}if(R.state==="idle")continue;const b=R.path[R.wp];if(!b){this.arrive(R,w);continue}const c=b.x-R.x,x=b.y-R.y,t=Math.hypot(c,x),o=R.speed*C;t<=o?(R.x=b.x,R.y=b.y,R.wp+=1,R.wp>=R.path.length&&this.arrive(R,w)):(R.x+=c/t*o,R.y+=x/t*o)}this.enemies=this.enemies.filter(R=>!R.dead)}arrive(C,w){var R;if(C.kind==="rat"){if((R=this.flow)!=null&&R.powered.shield&&this.shieldEnergy>=xt.shieldBlockCost)this.shieldEnergy-=xt.shieldBlockCost,this.fx.push({kind:"pop",x1:C.x,y1:C.y,x2:C.x,y2:C.y,color:ft.shield,until:w+200});else if(!this.god&&(this.coreHp-=1,this.say("核心被啃了一口!",ft.red),this.coreHp<=0)){this.gameOver();return}C.dead=!0}else if(C.kind==="roach"){const b=C.gnawTargets[C.gnawIdx];if(b&&!this.broken.has(b))C.state="gnaw",C.stateUntil=w+xt.roachGnawMs;else if(b)if(C.gnawIdx+=1,C.gnawIdx<C.gnawTargets.length){const[c,x]=C.gnawTargets[C.gnawIdx].split(",").map(Number);C.path=[Jt(c,x)],C.wp=0}else C.state="idle";else C.state="idle"}else C.state="attach",C.stateUntil=w+xt.bugDrainMs,this.say("隐身虫吸附在管件上吸压!",ft.danger)}bugVisible(){var C;return(((C=this.flow)==null?void 0:C.margin)??Ie)<Ie*.4}turretFire(C,w){var a;if(!((a=this.flow)!=null&&a.powered[C]))return;const R=pe.find(n=>n.consumer===C),b=Jt(R.c,R.r),c=`cd_${C}`,x=this[c]??0;if(w<x)return;const t=this.bugVisible();let o=null,p=xt.turretRange;for(const n of this.enemies){if(n.dead||n.kind==="bug"&&!t)continue;const r=Math.hypot(n.x-b.x,n.y-b.y);r<p&&(p=r,o=n)}o&&(this[c]=w+xt.turretCdMs,o.hp-=xt.turretDmg,this.fx.push({kind:"beam",x1:b.x,y1:b.y,x2:o.x,y2:o.y,color:ft.gold,until:w+90}),o.hp<=0&&(o.dead=!0,this.fx.push({kind:"pop",x1:o.x,y1:o.y,x2:o.x,y2:o.y,color:ft.enemy,until:w+200})))}lockRandom(C){const w=pe.filter(R=>!["source","terminal","tank","cross"].includes(R.type)&&!this.broken.has(Ft(R.c,R.r))&&!this.locks.has(Ft(R.c,R.r)));for(let R=0;R<2&&w.length;R++){const b=w.splice(Math.floor(Math.random()*w.length),1)[0];this.locks.set(Ft(b.c,b.r),C+xt.lockMs)}this.say("水老鼠王锁死了 2 个管件(10 秒不可旋转)",ft.danger)}gnawActive(){const C=pe.filter(R=>{var b;return((b=this.flow)==null?void 0:b.active[Ft(R.c,R.r)])&&!["source","terminal","tank"].includes(R.type)&&!this.broken.has(Ft(R.c,R.r))});if(!C.length)return;const w=C[Math.floor(Math.random()*C.length)];this.broken.add(Ft(w.c,w.r)),this.say(`水老鼠王啃断了主管 ${Ft(w.c,w.r)}!快改线或修复`,ft.red)}onClick(C){if(this.paused||this.over||this.cleared)return;const w=this.time.now,R=C.worldX,b=C.worldY,c=this.bugVisible();for(const a of this.enemies)if(!(a.dead||a.kind==="bug"&&!c)&&Math.hypot(a.x-R,a.y-b)<20){a.hp-=xt.clickDmg,this.fx.push({kind:"pop",x1:a.x,y1:a.y,x2:a.x,y2:a.y,color:16777215,until:w+120}),a.hp<=0&&(a.dead=!0);return}const x=Math.round((R-ae)/Gt),t=Math.round((b-oe)/Gt);if(x<0||x>$e||t<0||t>ke)return;const o=Ft(x,t),p=eo(x,t);if(p){if(this.broken.has(o)){this.repair[o]=(this.repair[o]??0)+1,this.repair[o]>=xt.repairClicks&&(this.broken.delete(o),this.repair[o]=0,this.say(`管件 ${o} 已修复`,ft.ok));return}if(this.locks.has(o)){this.say("管件被锁死,暂时无法旋转",ft.danger);return}if(p.type==="tank"){this.tankStore>=60?(this.tankBoostRate=this.tankStore>=xt.tankCap?40:20,this.tankBoostUntil=w+3e3,this.tankStore=0,this.say(`蓄压罐释放:+${this.tankBoostRate}/s,持续 3 秒`,ft.ok)):this.say("蓄压罐未满(≥60 才能释放)",ft.dim);return}
6380p.type==="source"||p.type==="terminal"||p.type==="cross"||(this.rots[o]=((this.rots[o]??p.rot)+1)%4)}}gameOver(){this.over=!0,this.deaths+=1,this.save(),this.showEnd(!1)}restart(){this.scene.restart({})}togglePause(){var C;if(!(this.over||this.cleared))if(this.paused=!this.paused,this.paused){const w=this.add.text(640,320,"已暂停",{fontFamily:"monospace",fontSize:"32px",color:ft.text}).setOrigin(.5),R=this.add.text(640,370,"[ESC] 继续    [M] 保存并回主菜单",{fontFamily:"monospace",fontSize:"16px",color:ft.dim}).setOrigin(.5),b=this.add.rectangle(640,345,460,120,659737,.92).setStrokeStyle(2,3362923);this.overlay=this.add.container(0,0,[b,w,R]).setDepth(50)}else(C=this.overlay)==null||C.destroy(),this.overlay=void 0}showEnd(C){const w=C?["Boss 室充能完成!","水老鼠王被蒸汽烫跑了,第三关通关","[M] 回主菜单"]:["核心被摧毁",`按 [R] 重新开始(死亡 ${this.deaths} 次)`,"[M] 回主菜单"],R=this.add.rectangle(640,330,560,170,659737,.94).setStrokeStyle(2,C?ft.ok:ft.red),b=w.map((c,x)=>this.add.text(640,280+x*42,c,{fontFamily:"monospace",fontSize:x===0?"26px":"15px",color:x===0?C?"#9be07f":"#ff4d5e":ft.dim}).setOrigin(.5));this.overlay=this.add.container(0,0,[R,...b]).setDepth(50)}say(C,w){const R=typeof w=="number"?`#${w.toString(16).padStart(6,"0")}`:w;this.msgs.unshift({text:C,until:this.time.now+4e3,color:R}),this.msgs=this.msgs.slice(0,6)}save(){if(this.over)return;const C={rots:{...this.rots},broken:[...this.broken],charge:this.charge,hold:this.holdT,coreHp:this.coreHp,wave:this.wave,tank:this.tankStore,shield:this.shieldEnergy,overload:this.overload,deaths:this.deaths,cleared:this.cleared};try{localStorage.setItem(Mn,JSON.stringify(C))}catch{}}getDebugState(){var C,w;return{charge:this.charge,holdT:this.holdT,coreHp:this.coreHp,wave:this.wave,enemies:this.enemies.length,margin:(C=this.flow)==null?void 0:C.margin,powered:(w=this.flow)==null?void 0:w.powered,broken:[...this.broken],cleared:this.cleared,over:this.over,tank:this.tankStore,overload:this.overload}}drawStatic(){const C=this.add.graphics();C.lineStyle(1,ft.grid,1);for(let c=0;c<=$e;c++)C.lineBetween(ae+c*Gt,oe,ae+c*Gt,oe+ke*Gt);for(let c=0;c<=ke;c++)C.lineBetween(ae,oe+c*Gt,ae+$e*Gt,oe+c*Gt);C.fillStyle(ft.dot,1);for(let c=0;c<=$e;c++)for(let x=0;x<=ke;x++)C.fillCircle(ae+c*Gt,oe+x*Gt,3);const w=(c,x,t,o)=>{const p=Math.hypot(t-c,o-x),a=Math.floor(p/16);C.lineStyle(4,ft.enemy,.5);for(let n=0;n<a;n+=2){const r=n/a,e=Math.min(1,(n+1)/a);C.lineBetween(c+(t-c)*r,x+(o-x)*r,c+(t-c)*e,x+(o-x)*e)}},R=c=>{for(let x=0;x+1<c.length;x++){const t=Jt(c[x][0],c[x][1]),o=Jt(c[x+1][0],c[x+1][1]);w(t.x,t.y,o.x,o.y)}};R([[0,2],[0,6]]),R([[12,5],[11,5],[10,5],[10,4],[10,3]]),R([[4,0],[4,1],[5,1],[5,2]]);for(const[c,x]of[[0,2],[12,5],[4,0]]){const t=Jt(c,x);C.lineStyle(2,ft.enemy,.9),C.strokeCircle(t.x,t.y,14)}for(const c of Un){const x=Jt(...c.oneWayFrom),t=Jt(c.a[0]===c.oneWayFrom[0]&&c.a[1]===c.oneWayFrom[1]?c.b[0]:c.a[0],c.a[0]===c.oneWayFrom[0]&&c.a[1]===c.oneWayFrom[1]?c.b[1]:c.a[1]),o=(x.x+t.x)/2,p=(x.y+t.y)/2;C.lineStyle(2,15660268,.9);const a=x.x===t.x,n=Math.sign(a?t.y-x.y:t.x-x.x);a?(C.lineBetween(o-7,p-5*n,o,p+5*n),C.lineBetween(o+7,p-5*n,o,p+5*n),C.lineBetween(o+11,p-6,o+11,p+6)):(C.lineBetween(o-5*n,p-7,o+5*n,p),C.lineBetween(o-5*n,p+7,o+5*n,p),C.lineBetween(o+6,p-11,o+6,p+11))}const b=(c,x,t,o)=>this.add.text(ae+c*Gt,oe+x*Gt+30,t,{fontFamily:"monospace",fontSize:"11px",color:o}).setOrigin(.5,0);for(const c of pe){const x=Jt(c.c,c.r);c.type==="source"?(C.fillStyle(ft.gold,.25).fillCircle(x.x,x.y,24),C.fillStyle(13279312,1).fillCircle(x.x,x.y,15),C.fillStyle(ft.gold,1).fillCircle(x.x,x.y,8),b(c.c,c.r,"梦潮源","#ffcf6b")):c.type==="regulator"?(C.lineStyle(2,ft.danger,1).strokeCircle(x.x,x.y,11),this.add.text(x.x-16,x.y,"调压器",{fontFamily:"monospace",fontSize:"11px",color:"#f5a0c0"}).setOrigin(1,.5)):c.type==="tank"?(C.lineStyle(2,ft.ok,1).strokeRoundedRect(x.x-13,x.y-15,26,30,5),b(c.c,c.r,"蓄压罐","#9be07f")):c.consumer==="boss"?(C.lineStyle(2.5,ft.red,1).strokeCircle(x.x,x.y,24),C.fillStyle(4868698,1).fillEllipse(x.x,x.y,30,18),C.fillStyle(5921386,1).fillCircle(x.x-7,x.y-4,6),this.add.text(x.x,x.y-46,"Boss 室(仅低压)",{fontFamily:"monospace",fontSize:"11px",color:"#ff4d5e"}).setOrigin(.5)):c.consumer==="heal"?(C.lineStyle(2,ft.heal,1).strokeCircle(x.x,x.y,16),C.fillStyle(ft.heal,1),C.fillRect(x.x-2.5,x.y-9,5,18),C.fillRect(x.x-9,x.y-2.5,18,5),b(c.c,c.r,"治疗 25/s","#7fe0a0")):c.consumer==="turretA"||c.consumer==="turretB"?(C.lineStyle(2,ft.gold,1).strokeCircle(x.x,x.y,17),C.fillStyle(ft.gold,1).fillRect(x.x-5,x.y-5,10,10),b(c.c,c.r,"炮塔 30/s","#ffcf6b")):c.consumer==="shield"&&(C.lineStyle(2,ft.shield,1).strokeCircle(x.x,x.y,16),b(c.c,c.r,"护盾 20/s","#6a8aff"))}this.add.text(1171,478,"充能",{fontFamily:"monospace",fontSize:"11px",color:"#4a8aff"}).setOrigin(.5,0),this.add.text(1199,478,"过载",{fontFamily:"monospace",fontSize:"11px",color:"#ff4d5e"}).setOrigin(.5,0)}drawPipes(C){const w=this.pipeG;w.clear();const R=this.flow;for(const b of pe){const c=Ft(b.c,b.r),x=Jt(b.c,b.r);if(this.broken.has(c)){w.lineStyle(4,ft.red,1),w.lineBetween(x.x-12,x.y-12,x.x+12,x.y+12),w.lineBetween(x.x+12,x.y-12,x.x-12,x.y+12);continue}const t=R==null?void 0:R.active[c],o=!!t,p=o?C?ft.pipeRev:t.low?ft.pipeLow:ft.pipeOn:ft.pipeOff,a=Ki(b,this.rots[c]??b.rot);w.lineStyle(15,p,o?.22:.08);for(const n of a)this.stub(w,x.x,x.y,n);w.lineStyle(9,p,o?.95:.55);for(const n of a)this.stub(w,x.x,x.y,n);if(w.fillStyle(p,o?1:.6).fillCircle(x.x,x.y,5),b.cracked){const n=R==null?void 0:R.leaks.includes(c);w.lineStyle(2.5,ft.red,n?1:.5),w.lineBetween(x.x+8,x.y-14,x.x+16,x.y-6),w.lineBetween(x.x+16,x.y-14,x.x+8,x.y-6)}}}stub(C,w,R,b){const c=b===1?1:b===3?-1:0,x=b===2?1:b===0?-1:0;C.lineBetween(w,R,w+c*(Gt/2),R+x*(Gt/2))}drawDyn(C){const w=this.dynG;w.clear();const R=Jt(1,5),b=this.tankStore/xt.tankCap*26;b>0&&w.fillStyle(ft.ok,.8).fillRect(R.x-9,R.y+11-b,18,b);
6380for(const[t,o]of this.locks){if(o<=C){this.locks.delete(t);continue}const[p,a]=t.split(",").map(Number),n=Jt(p,a);w.fillStyle(9676704,1).fillRoundedRect(n.x-8,n.y-18,16,12,2),w.lineStyle(2,9676704,1).strokeCircle(n.x,n.y-19,5)}for(const[t,o]of Object.entries(this.repair)){if(!o||!this.broken.has(t))continue;const[p,a]=t.split(",").map(Number),n=Jt(p,a);w.fillStyle(ft.gold,1);for(let r=0;r<o;r++)w.fillCircle(n.x-8+r*8,n.y+18,3)}const c=this.bugVisible();for(const t of this.enemies){if(t.dead)continue;if(t.kind==="rat")w.fillStyle(6969914,1).fillEllipse(t.x,t.y,24,15),w.fillStyle(16768358,1).fillCircle(t.x-6,t.y-2,2);else if(t.kind==="roach"){w.fillStyle(3811866,1).fillEllipse(t.x,t.y,22,14),w.lineStyle(1.5,5917234,1);for(const p of[-1,1])w.lineBetween(t.x-4,t.y,t.x-12,t.y+7*p),w.lineBetween(t.x+4,t.y,t.x+12,t.y+7*p);t.state==="gnaw"&&w.lineStyle(2,ft.red,.8).strokeCircle(t.x,t.y,16)}else{if(!c)continue;w.lineStyle(2,ft.danger,.9).strokeCircle(t.x,t.y,12),w.fillStyle(ft.danger,.4).fillCircle(t.x,t.y,8)}const o=An[t.kind].hp;t.hp<o&&(w.fillStyle(0,.6).fillRect(t.x-12,t.y-18,24,4),w.fillStyle(ft.red,1).fillRect(t.x-12,t.y-18,24*t.hp/o,4))}for(const t of this.fx)t.kind==="beam"?w.lineStyle(3,t.color,.9).lineBetween(t.x1,t.y1,t.x2,t.y2):w.lineStyle(2,t.color,.9).strokeCircle(t.x1,t.y1,10+(t.until-C)/40);const x=1160;w.lineStyle(2,3362923,1).strokeRect(x,160,22,300),w.fillStyle(ft.pipeOn,.9).fillRect(x+2,160+298*(1-this.charge/100),18,298*(this.charge/100)),this.overload>0&&w.fillStyle(ft.red,.9).fillRect(x+30,160+298*(1-this.overload/100),10,298*(this.overload/100)),this.charge>=100&&w.lineStyle(3,ft.ok,.6+.4*Math.sin(C/150)).strokeRect(ae-6,oe-6,$e*Gt+12,ke*Gt+12)}drawHud(C,w,R){var t;const b=this.flow,c=[`❤ 核心 ${this.coreHp}/${xt.coreMax}`,`◇ 压力 ${Math.round((b==null?void 0:b.margin)??Ie)}/${(b==null?void 0:b.budget)??Ie}`,`⚡ 充能 ${Math.floor(this.charge)}%${this.charge>=100?` 维持 ${this.holdT.toFixed(1)}/${xt.holdNeed}s`:""}`,`波次 ${this.wave}(${Math.max(0,Math.round((this.waveAt-C)/1e3))}s)`,`蓄压 ${Math.round(this.tankStore)}/${xt.tankCap}`,`护盾 ${Math.round(this.shieldEnergy)}`];w&&c.push("【逆流中】"),R&&c.push("【Boss 室瘫痪】");const x=this.charge<40?"P1":this.charge<75?"P2":"P3";c.push(x),this.hudText.setText(c.join("   ")),this.msgText.setText(this.msgs.slice(0,2).map(o=>o.text).join(`
6381`)),this.msgText.setColor(((t=this.msgs[0])==null?void 0:t.color)??ft.dim)}}const Ji=""+new URL("body_base-C0Y2_yNX.png",import.meta.url).href,Zi=""+new URL("boss_mast_cell_attack_sheet-Cg6UZFb9.png",import.meta.url).href,Qi=""+new URL("boss_mast_cell_attack_sheet_144-Bx-R8OlU.png",import.meta.url).href,ji=""+new URL("boss_mast_cell_death_sheet-DGPuXYHa.png",import.meta.url).href,$i=""+new URL("boss_mast_cell_death_sheet_144-BoK0nVbl.png",import.meta.url).href,ki=""+new URL("boss_mast_cell_hurt_sheet-BZlhb1vX.png",import.meta.url).href,qi=""+new URL("boss_mast_cell_hurt_sheet_144-zJpacrma.png",import.meta.url).href,_i=""+new URL("boss_mast_cell_idle_sheet-D9WPPjOF.png",import.meta.url).href,ts=""+new URL("boss_mast_cell_idle_sheet_144-BWO17oo0.png",import.meta.url).href,es="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADK0lEQVR4nG1TXWhbZRh+z1/Ob/7XP5Y1a2bbLNVim066oYu7iUERYayRScEN2c1EGMz7eSFCQfDCi43d7MJ5UTLmhowxtXVHHS221bSlpX9hf03amubn5JzTJCfnO5EvOOhqH3hu3u99H97v+56HgP+D2EOM+h6+1LwbZIN+P+3VOMaUOAoXaa2CcjndBOCsCKwhGcDcT4AEAMYdCHCUrVMQmpo4QeIYfGAqKtpRMkYm1LoFiYSB+wCgtluAxEWHLyS6OnqcHn+3Q3AeFkiBtxG1KoUOtJRMVsrVrl7uq5N0Lrk2KePFsDbxnwDtDoRF+8GjnpbOfq+jLeCiRZcgHuwyKV9bRbn5tT8/cT/Ot3XGrOwTRctvvj2bmU0OwRCFBUgAH9se7nG5uwdbPO2vNru6Bxkx6DPUH2/7tx7cPEPwzncOvfFWOfTB8Oz0nVuD27e/WSmJnuOLiz8V8BqE1yvStChK9rYjrCdypoz+GmtOXfs8bgH5nu94tBw9G78b7PRkxpPK6/boR4ZV2Oqqj3//Qyz2WbQhUHcjQu0YVInCdkf6iw/P1S043d53rBIbHr4TCLZm5Tmld1zW361VEWNMfwfa6oxGcPxUsbhJ4ivQweAxp4N2f8rY+IutvQPs++c//tkXPFT4NVnqX1WIPhMBZczcB3XibrW6nb6ncvS3C7NjD/EsgV9w4JU3I5Jgf+j6ZAS6+l+bs+nF6lKRHKgTFFGbGwPlt1sIqXmZ7Ts1aoZjfz6Xr+eNiV+09fXFEh2BCJ0GfpIsbd9gf0+cT7Uc7gXCBmj5ESjyKNRymUk+HE244pfm1dS8kZNHmcrjpXoGFSoAYL2wKxkKDfGSlrp34GT8pKHlQV+emmaPnkh4z32ZRPo/oC5NkWo6Vcyvz2Szi3/nlWfz2ks+AACrJxzrsOdyIzVWkMULX/1hEyQWPV0WUFWr6dmsrmQWFD29oGyszOBh7MjGBi/Q+BG4cqXufAKS9/FKEyc4GJJmrLJRNivFdEXbTOvKs1IZ4Cm2MdqbBQzKD35mp2mHRshJIolvhInSyijP6iZsbOAQYVr7hWl3bS/xwL5x/hf+PV5PKb/dVAAAAABJRU5ErkJggg==",is="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADA0lEQVR4nHVTa0iTURh+zvdtfrt6aY61WV5g5iqW1dQ+yzadlYmDkgizKxZIP0rzRxH9CvoZBF1+FVEQFBT9KFAIU6hJQpFlCVmKupK5USm6ed2+743PXJjWA+ec91ye933Oe84LLAcDwCnjnvz81P2iuGLx2tLD3D/mKovFovV4wAcnU+8P/dQ0H/NAsFqtGmVvKYdbYqudzhTDATGsjgZdFdk2vnJNJi9+/Cruq/eOqBwOY7IdUC/mcYvJ4rpkfW6aIb3GZ06fm9U1Hqok1FdLFJPUjaVbrLZNq5JXpDmMBgBJCS6XcOB0puhs6UbTnbNAZ1eWmGFWlZUXSFSyUaLc1erClo5M7/1LgCMj3VTosOkXrsOUjrdYLEKxIyzXedW4/sRe/OCZtulMLVSGNJJBQO1uoos3tad1QubMEd9gZ1coFB8eh8o24qI/Wc3PKtoL0p7MWc3tqvaC1eyQKIn9zrrEgKd+Do/bGD4PkT8yOXtrVuh8FAhghpU5y1yT0+xKXg65D/sYSpxx6JJJxhT7+4W0RPFphq4+nj1uBTq6uQ8M0jWOZNKAwSQkMaQZCToNyZDBFOkJkGJLDCqBKMVI0OsYQLIJDKnzEj0eqEYD4iEempPrcznxwE4ZlcUycfTbEeOB9nccHrZy6OqVuicic3cM2vDdtwMD44oD3mqFUO+FqrAgK+N5h83b+lpouFDH1hz0xUlx0PKCx/kbLODOn7taujnYHsTg0OXbiFmGXfGESnWhzWaq3ZGRS2/N9kt1RSeqtpTFp9rcMr3aLtWUeqmhemsT9Zntxyuy8zbaV5oX/gJLJEp6EwxG+4cnRo+eM3AV24Y7voXkVy/f8+x1D88+DUofqraGWk+c0vNfwj9Gx/pDEQBKdFL+gQIZQGysNxLtBdDsj0gct+ravRb9diGJZ4xFb7zrG/jWPWhQ//gSjQaA2AJnWXUpiniz2Sy4XN9jP/s9foCZ8nI+bWjrCdPIyHxUpc2T/wfmgWdemdvhLi5ZW1qu2C64lCJaVs6/ABvjE5OuAmI2AAAAAElFTkSuQmCC",ss="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAACF0lEQVR4nE2Sz2sTURDH573sbrLdddN9ibFNG1PzS01LW8VDBZGKeBJEKSJeixehBS+i4FWv9VDFQ70EQfQP8KItgfRgEbHYFKy1DdHSpk2TXZJmd5PdbJ+8VtE5fvnODPP5DoJ/hQFAICQhJEjiQPhRXUW6XrABoAUA+0xDf8weAkRKpS9zCgpKVSMfBh5A5dMlum8Zi+V3jqZpBgC4rAETIPLwwA2x2axckGR8t0tNngWE0ba2ljdb5jO/3JdbWH9japrWYA2+kfTNDmzbl3pPkKdPph8tuNUwl3u1fQ15Wp7ZpefW5u7auBeOfphbyZpYVWPeUGfI5+X
63815h7evTxqJk/HicvFtP+rLubbTdq4MTYiiKN9ve/GRmCoIOBlI0eLu10hXMHrK2Yj0vnicGRu7NZq68+CiUBc+cwJSaZgkT9eM79Fg4Dzl2MWcTRHG4DpN6q9vdcvzc4tUEDgERgBwJwAFhKjjQQwEZuiC8uBmuVb8tmeXoIcM2fMZBWZnfLRHOde2HA3t6OurQSX6q1JdQZhxdt2GadnNqWz+pWXaFSEWHkTx8DBquTU+uzTTbpi1KXDUWkHfcg6xEiKPxMc79L3lUb/kv3dMSQwAAsS21o3ytCz1v/9UyJi6rh9gPQyOEOlM6CpvC1Rp1H9GKEdRQDy+wSZ/2XndZua/wf33Gt2+mCryjAYTKtWPqKBbDkCJvYbLtN9lhOPXoqbxaQAAAABJRU5ErkJggg==",ns="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAFSUlEQVR4nJ2Wy29VRRzHf7/fzJx7zul9FwJNH6CSIomJMUANsiBqqkZjWCgbXZBGEiMxLiQB0RgkLNyQ2FA3ysJHTFy58B8QWRFForCoCQKGtlAQ2nt7n+ecOw8zc2+ftIBO7knOY+585jvz+31/g/CQDZfcIbYfjXEvjP21bx/c+IM6uJERkTpP5GAdPBoHtTBtn43pzOF/ArEDIERkSMSQkBZxrocyxl5GGa01aNBuDmtjF/+7olkIAQInIkGMCQSTIgYeCcEZ8x1MyzhRrSTSGqQxmGilpNZGO6mrq8U1YYjoESN7hcQgHeY2ilRhn/b85xhPbUMEryWTcZTxGdOc/aFWL1+va2VirUxLK2VV61WYuNoyMkSrigLGWUZ4vJDvG+F+cWxzdxGeSXXBZuaBFAxuJRH8XqvCxVoFZGP2WK00OTqXNKOmVibpQFcKxZUPVpmF+YyznEiJQvcjo5nChgNP73nyxOBj/X8Jjd7Qtdm9W6drr2hGuqKk/qVa5mM3p2i6OvNj9e6V/aWk2Wwqqa1SvYK4PGjcUpIFspAIsoX+kXVd6w689PzOT0xP7kJMEFy9czf/8/R1v2cmgt0i5LuyBdiTK8Im4TcOT8DeKZ18nNy5+pEyhrRdVWjv6MJ2LVVnL7eciCYT5HpEUPxsZNOmcu7R3r9FEOS11ur2nxOvHzn8xvD+r9+HMxSDkgpmlISBMAwP9fQnqa7ioWxYfNxDNDay58e9B7i4f4QpG59hYd+2TI4Ph3kvaERdKo4rURRF3BPRlsE+vbW/D9KeB0JqyCOHRGvYns3DUCavTVh8y2cMGaL1iGWJtGRJF3IOUlwI5OHwU+kMdDMesvPXRn5jjVs5EmF5pvzEpye+JeYJuFarwucYQ1TTsMsL4YXier4znaUznj/ssVRIUtYdEgzOJ+cCsG1Xbc9ixH0m+LZ+zweFqMdv/bPzg1Nvw+aN68Cmd5xI52vivddAM4SZegSnD47BnrgFfSkffBIDCRchxVDvyDP3cRo3FUQgsmrtwC1O2u/OalHIAklJgdRkezHBwSCCEgKQoQ0PcJtmg92B7k39BaCTjAYNIGgtI6lal28mUS8Q6N085F8cGKWMn4KpVgwbBnuBEYMblyehlwQ0WhJ2tBgEXR5MV2YhUfKGVrKh7WKuoC5TaKF2ltauwlbz7B/16rNVpbQN/SGpQEgDo/U6vHv0TchmM3D8tWNwUAbAfA+wi0GspL5Qq4KS0dlExg1r6FbHUnNdEqXuE9hMtd6oG6XvL1Xn4Ne5MvhEEDEE5guQDKHUjGAujqCF4GAJJxBEMF6v63PVMmGzdNomvtIu7ZeJXFzSTomxri8N8WqjfF3UZ4+fuj11rN/3GwNBGNrQ38VD+PKdMbdLO2IGFDBII0IpiaKT0xN+vVH6plafudgygMpoZcc1D2FtLGCcCl7gZ9Zv+a430/3qoZ4+uT2Th5ALiuIEtDEQpjyIlNLj9Zo+OT3hXa7Onm/evfLyTLNaaSqlrZ9qa+FrAdsvEBghecQpIKKcFwbp4sCRVFg4OmQTO52F3pTvwnA6juFCrQLnKnNQr5dON8uTH5aiWqVt3lLJB5n3wsa6gttW6hPDLsYx3VUYhLA4wkTwokfeZgBDsWpN6lb8E0alr2q12Us11VJxBzZfKVYmxqpA53+dmijQFWDnrwFj5PFUQEyEto9Wsmmj0VUGV4C1lkbptWBrAhc+ds4y1l/bRww3iYXQdlFtA023jxiu6LrMW/tsc1/gUrVt12/fzbuxG9rlWRuwlqr/BFzecfGION/aSf3wx8R/Abm1zZKT9hhvAAAAAElFTkSuQmCC",rs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC00lEQVR4nH1TTUhUURT+7s97M6OZTs2kj7RJfBJoatN/ZC1aVAQthCiIoG0ELdsIlW0CIVpEiyhoH9QiXFSLIIsypMysnNBJG0Gfk6j5M86bee/eG3cay4o6cDb3/Nxzvu87BH8b0d6ABp6JZah+SKVKJTDoA1BF/6cRG3YgBgQvAVQBZNltIKBjAOifvy0btWAFj8LxJmvi0aGgud+TiFOlOIMaaFjyn0Ym3050wTIcOC4AubIBsWCFWuH4Y3W7DisYV7eXRuobS8KQnCCRncPrzPSIyrsXjoy8unfLsrjjOFm9DtHVejQTSVVu7zlYxkrun9ndOtt29tQLPHjVIPpH6/OcqN7MNO9MJ+SUu3B6a/Ll3ceIsRRSOb0P9eCR5pp4JEfY9XMbNhtttzu65E573Lt88vlMCXUXvRzftyrqt1c1UsqMa051PGYgpcGkVKP9BalcH2cHtpVFaw+YYbnY3WdRQKo3wxGW901KKNKey3eEKsS+1VXRIc6PDAN5GzYvUMVTULWEtTSWhBUHJbM3ug7Kx/2bvJGJauIJQ1HygxIATaFy1cVYi8ZNT041Bj5ACCRjOoVRSfLCUAOjNlwvKOkvogozg2gedV0hwEsLIgGoUO8T2W9ESEEkBfKMKi2A5URV1E/Cndc5HzSNhm0oOohBUQ+YzUw96V38Ot7rzrJ1LCCElEQopR2+UojwgPjgztPueWeuRngPCWAkk0lfjyI0keGRNw71/POdkwnZszTD1vCAH2aGqGCGWMtM/112jl35miCun2s/MdY/HENM18rlBallWcFjjiN66vYc50bwyt6yddVNoQoNDj5l5/FsIT2VdbMdR0d77tysrGTpdFoL6WeD36Q8vn7Lxs9B85AC2UJAiJTiY7XwHumfL6LSTCOtpSxW1P5qUjyYQPGINHusyKAZQyz4v2Na+UZt2+Ze0ivEDRgqiaQ+Z83Yb+f8Hd5mPMQ2c6lVAAAAAElFTkSuQmCC",as="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAGvklEQVR4nHVWa2wcVxX+7r0zs69Z79pbe73G6Tq2G2K7TvNoaAxtqdOUJFAqlDSFJkEqLQ7ND6AEJKKQSK0CBIRatQr8KZVKJfqjCKgoSVPaCgNK05ISJ9Sx1SR20nXWsdfr9Xpn33dm7kV3cS1j4EozV/M6Z8453/edQ/DfiywcVO3xOBjnoEKARETtfm1lNQjDgEgk4AKQAMTCLpcbW36tDFNlOFCC5gvWM2o4mmYIZjh+9QxcKwmHU5eXqWuXco7lgZtMwllw8rGj2tL+h3EWjUIPI6T7Y44RCcLr00JGgylJ0OTqY+QLYTpXILLIHbuSdyrM0rgdzfFgCs4YahF9HNViBDXjnYBmNEIPRIKe1jrdZ0a8/rUrbdHXDaTm6kKJaSOctzXSFqnmOuNz8+eGiRwaD7BMiZfmU1Z5OlOouhnwpU6W5pt1N8Jo+ITpi4QCgY4W6r3vU0QOnl2x7v0Rbed83rjVESQa8ApGgBQlcnRDd/mP9981cWbwApGXxl0+ZRULc5PF8oKTWsoWjcdi0FuCpr81FjB7b/b6utu9gZdfv+lAao4+3H6ziTvXlHFbJ8d7Fz2YTAPcofj7RYn6OufEnq3TP52ezs+eG3d5plyy0hOFymgaVRWFcsDi8VrOvbEoM9d1eMz1q+rMX/yu6bhLzE37vrX31N5Ht14HveFz/nm8b9tXRzoe3q7Lx/a6cnCQ0J/92kOyljOyb0dqf+LGfPrcWKWUsEQ+m81VkknYNcQ
6381otPhDjtEY8fq3rOXylyejB3SNbXr6mT0n935990Xu1Augd2bgWJBny0HiMyRx8oT13w7y/KGqHQlpPS+daHzy7ts01hrx+Rq8hidQrgGI0jjAFBQjuuFVBX3rfMf6dIZ8+YndemXjlq1T8xavMwxaffroc73N9U73tvvvkI2BMtEiWq2Mre3Qjw5U3WJZ3/zK282bN/UWnDClXiMQ0uJxUMpjoArnPjNgKLScuejd2duh0c9/usKc9IQ/XGeUElev1Z167c3PfPvQo0hPz+D3fy7g2DMFPPUCwRNPMqxuk7hnvZQXLvsevCUa0P1BTW/wuqxSAasxVJFI4VxB0SqQ3jt6JeCxdTH28z7Fle/tP3LnwOMPBJpXrJQP7e4nPfc9jnVfOIzxykbki1UYDZT29bikzGnXhWuhaHM9l8zwM8V8TZ0UQxWJxqcbwlKSaEezC3BdGtqVlb89eu8joUiv+cBXtiGVHCf9W27Hli82YXjoPETmPJ79PgNzJFqjgKHT8PSMv6HOnLpOdY25AqRG/cXlSgoCQhW2NInMLJMvvsaD2dQNcuBrB7Fr6zfxm5ffRmZmCt8Z+BEO7ikhGGAAV9WsUZe4QlLvEpNahkKGtJIolerJylXFeSCSTqRJHSikyQR97rtMakgSn0di4CcEXWtuwaEDx7Fv+yxuXRMEn3VhhIHpWQLXlVZzpJq9ljKoXYVgFJJSCqmEK20BLS35edMnPzx7kQE2pKEDnS2CtH3SwIcfCbSu2oA3Tp5Ds/sOHtoRhJt1wZjSAilPDzNpaOJKT3smlc0axOVlV/08VZKrVLHsuFxpy4auyqv/uCTx7hABMYFqEZBcYPCCgcT1IpIfnMKR/X6InAshAWYCVy4T+bchSrraq6/OZMqVTNVxcpw5ug5BEwkIJbmlnFVVwrXjrokz9ab9+tFfediNKdieRsDKAH85ryE/O4YfPGKDSgJhA3oQyFvSOfyCwQi139/Vn3rjr8OmZlVEmRdzTjIJVxVZFP1w0pbGZwq58p/OErlne+pYNu+MPvZDj/7BZYjTwxDzecjnDxIZi0NSHVILSzEyBnfgx15tPCmSuzZnj4xe4ZWZvKhUi1Ve9C0Tu2gUxupW09fkDwTXdlFPLBJufOlE02Hhap9Tb/S0ufjGLgFeBqbmCN4ZZjg9REGZ8+6D/XNPwZ386L1Lfmcym7XmJgvl0bTCFhyytBewiJLrgC9WFzB7VzDj7o0ae+Wt2D1Xp3w7S1XSU6qgnjJCXEfkPDq51NXG//Clz06+OXzVLo9cY046PVeYqBTLGEN1qVxjuZPmNtMT9Ab9TRHi6+suuPGwXx9O3NQ0m9MjCjSxKM+uXmHNzGRyFZVzlZaZbKE0XShUbRs8kagZX2w4S1sm6wSY6mqsOaQrVVTCpbRF0d/vg9QYl1bBoAqKWdux50v/zrmVtjhPw17oZosDwP9t+q2t0JTkKlVUwgXNp+keUWO+XaVC4VxBUaFFFVQhZkkvXpwuljtYPrao6YKqsaXeAeWh2j2wLOS8BuH1wlUwXzZN/MfY8i9Tw0n0zc2UPAAAAABJRU5ErkJggg==",os=""+new URL("pickup_energy_enzyme-DyoB2L-2.png",import.meta.url).href,hs=""+new URL("pickup_health_cell-VNA06X11.png",import.meta.url).href,ls=""+new URL("pickup_immune_shield-D5uXFHQV.png",import.meta.url).href,us=""+new URL("pickup_score_antibody-yojj_puo.png",import.meta.url).href,fs=""+new URL("projectile_allergy_spike-BqnllGkQ.png",import.meta.url).href,ds=""+new URL("projectile_histamine_orb-DKZ_mFxd.png",import.meta.url).href,cs=""+new URL("projectile_plasma_needle-DbyPTVSu.png",import.meta.url).href,vs=""+new URL("projectile_toxin_drop-D7EAi9O0.png",import.meta.url).href,ps="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADCklEQVR4nG1TX2hTZxT/ne/LvWnSrGmjXZs07W3XarUyQVJascyKY7invigK22DuTWQibOiLoiIbzIcxfBBERccUQbbnuT5M24elo1h1Q1Ppn8xqpsbaLMltcnNzc79P7m07UuiBc/g+OL/fd77fOQdY25jrBLi+FPlaibQGkANRj/Y5l82j2nVJCKC7dGD8t3ETgARQASCqAdVnJRKJ1EXjKQSHw2ciA+v3aR82fWw+5N/H7oV5eGO4zsmpxlE1uLmrue7dT/1U+3tkj0f3/jhwoVt4/Azxw9Oeorl4xHMwfevFeUHJZDIPoOxUwlYINE3ztWwL+TTRucH+l3235VCU+ZtUptRy3vNli4SunA086dgW2uPzRnui/mVNaEmsKBS13q7d/FlUfXnDONs51BzR9jbaRrrMimmLWj5qkBs/iTRkfi1929Hb+o6vzudD2P0KeZzQUGhQm47VlKdPGIcbu+t3d33RZN87Ncszf+uQRAh2+tnWr9rs7GShd+7cwpH2k77T5smg9xlyZQJiCrZPePpY33ZFr709cH6TOvXTC5gZi94/2gbihMSlFOySwNavNTF2dBqGXNw7/t7YMH7usRkw4Qpp6ZLVNKqUmy1SfraI/nMb4A97UbNOQd83XSjnKnhzP0/+iIpS3vq/CwyAHZoKKd4d2Sdmrvw4efM1GvuDkikEa9FGpSQgbYnwYL14+ssbKrwynipbjL9CD0IKkHC7IDnn4p+u6SyY/CM/Y4ArTDqjQrTcZwlwlUs9WYIQ4s9c68t5+o+coRIOgQjOB630NVgWs+6SAjn/IA8pJJiXgRRydXg9kXMklxVm35mJZ4zAQsByqJnzwAxmLCQAXU/FmZ8WjOcV/uhiyqoUbNimwOSVVCWfKHEeIEsvZEYwATmHOZegeheclto7Nu/azzj/wS7IcE0LB3FI45lNzEdZicrxeGL06rJ2DsGqXXCWhMcnR24VLKMXirwoLQhYjEjFdZObsXhi9PLy+LvgNW0Qg04lrvW37xzqb//gwMo9Fos507fK3gKI8DPIh19ArgAAAABJRU5ErkJggg==",ms=""+new URL("card_blood-BU0ISCEY.png",import.meta.url).href,gs=""+new URL("card_gut-BPP3MKSd.png",import.meta.url).href,xs=""+new URL("card_lymph-0gMBhV9C.png",import.meta.url).href,ys=""+new URL("card_mouth-vjGIOU4I.png",import.meta.url).href,Ts=""+new URL("card_stomach-DTqZFwgA.png",import.meta.url).href,Ss=""+new URL("boss_dendritic_144-D9WzdSts.png",import.meta.url).href,Cs=""+new URL("boss_killert_144-BjuqNlTj.png",import.meta.url).href,Es=""+new URL("boss_macro_144-CcYpvitq.png",import.meta.url).href,Ms=""+new URL("boss_neutro_144-SQaowWB6.png",import.meta.url).href,As=""+new URL("cell_48-BHmYYgWB.png",import.meta.url).href,Ps=""+new URL("leuk_64-DfJt8BY8.png",import.meta.url).href,Rs=""+new URL("macro_80-D47j2-sy.png",import.meta.url).href,ws=""+new URL("nk_48-Dp8461tQ.png",import.meta.url).href,Fs=""+new URL("node_blood-3QJRQ-TA.png",import.meta.url).href,Ls=""+new URL("node_gut-eb-atSRk.png",import.meta.url).href,Os=""+new URL("node_lymph-JaIj87lt.png",import.meta.url).href,Ds=""+new URL("node_mouth-BbGaaLLU.png",import.meta.url).href,bs=""+new URL("node_stomach-DGRYx0LR.png",import.meta.url).href,Bs=""+new URL("terrain_tiles_64_sheet-CIi6iCLx.png",import.meta.url).href,Is=""+new URL("tile_blood_vessel-DEHq9VYz.png",import.meta.url).href,Gs="data:image/png;
6381base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAPZklEQVR4nOVbe4xd51Gfme887vvuw+vXeu1dJ47j2DF2HEchaRqamgasJJhWlCr5iyhFgJpC+aPAH0j8AyoVtAgEAiTaP1oF1Dap2hRIqEibxMHOy6mV2N76sfFjve/du/f9OOebQXPuXnvj7Ma7dpq9TUc6u/eec8+ZM/PNN99vHh/u2rz3Yc/E8oDShQIxRhQQQZgjQfEIsAAEoQhF55FZRKCDEMIrf78smrsXCWZRmJjR6GkisgKcEkAPmAGJSsvhjygsgoQiSTEwQYwsehpAmNAg63UoMti447oebO/9pfuL1eIBKzYLwAACCIiMgpSMJw/u3/PJf5icHcvEvUSgDNKpbO3lwRe3n5s8+3iTuYAyWL4ChBEMxT3/8IN7DvyVDUJTD0MTi8WD0dxoePjkC1/x3djQp+78zJcmChMpx7gc2oCy6a7qYvwlOsRDQduZ6vzW3VvvfUJQSK81wrrJJjsrho387/FnHjk/OTRGwpjKlac/h4h9hJghdDJETprQZIkoHdpw+9jsxY27N++dcR3jsA1judxk5y9vueuVtR1rvgWICUFIAkJq2QdgRoQT9aCx7z+PPP2nAbBbl1osV5nN9Hb25m9av+3LIYfdg8PHbnTImEa9lkBBb3pmvGsR/klCTCS95Pnbb9j7xd/b9wf/kvJSGHdjmI1l7J7Ne6aHJ8/1f//IU18t18qPMctq3LvlI5/d0L3xy4ROVkQtpaVJAUJCBITANs4hwHOlWrEvtEEKEa2IECFVrXAHAkQavg5Sm4wTYk4QWB8myh6xwsJdao6IWJL5fCIbfwf/6N0R0Ma8xJl1Xb2v7R2482T/mhvyPjnB8OxI+v9++uJvTBYnHgUAj4Bsrjr9z07zYWDU6FuGqU83aLAR1kulav5cgxsNYLgDEcOWgpRCCNMIGAKKMr8+DQhWRCApIMiA0fMEII3KpjkgWZw7vyh/UZ+FGNTy20ojhR1nxk4W+3sG/mt9V395aOzk5y3wRhHWZ4VE5OhUdxZ6FUMOVuuVmdnK9BAAMQJ6DEz6Ao5xivOVcE1zfxGKJvOVbzP3/IWuXck/cnLMXihhXPXAzP6psZOfGs2NrMomu9YzW6s+du6I6B0KUNdqyETC5yvTQ4gGhG3GdbyJVZmen2xeveXYwNobxxphwxDRdY/6+0nMjJ7j2anCdGpw5K1t4/nRW8vV4haH3GqlUT4PiPV0PNuvMs4n5/JH0eUH62G91BLecpjsTHa/dv/uB57aPbB3Kl+ZdSv10gJW0z60pmNd5SPbPjqcK888/+Th/7j37PjpBxENlWulCUT00rFsr2V7SQtO64O6ABbmUrVwXghZbJhR4f/wgT/5t0I1754aHcy4xmUdedU2tCHpu9WDusmVZnz9/IUH/uy//+mZv6meGD72iCHDlVpp1HfjHa5xk60ZRdHfCCUgBEG9FNqgjAy+6/iTOvIqfKlWdH3Xty2z1//teLTeTd/VoJGjZ1/vfPieR1/qTvW8IixxQLD1RnV6vtuiy/pDqIf1aUDRJS7Wk+l54/Yb75wsVPKejjz8nFFLKY2wQTv6d7wkKCqDqTUqs8w2jBY9hCZC0uG3YiG0jYpOC0SsbV675dhMcdprN2e3HFIrmClN+bf07roY9xIXQcRn4Ia1QUUtHpgvW4Cujyy2ASDGMU5pYPWNY+rw9CHvxSTCShGqJdaD0IiAUDv4CR28wAbUt2pTOe4mRkUin2etcBBFBnDFMtiMFxSEAepStxQmYsM6gusI2Zh+Z4FQAKsGjQssRuj6QdL1kmWLInJJHkWWrc/OYje9l+nr6GpgovhVALYLcD9Yk4kuCtcRcAQ8PIbAZRB0o9hrpQkXBlLOtTxLhbdsLTLeI4g3i0BABHZOdT4IrOLA9hmDzzJLiUybKGEBomu5KYq2Ge8BhJsQpIwEgcwRIlhBriBg2lq8H1EjygiCws+9ApAQyXHqArxVAG5mkKoAUpQ/mKOmDpDUjSBIh7DcRRpP8OV51wYk16QA0TkfsIKCfgQIUGVdlIMQINYAoMcB6BLTjOpWkjR1JABud6r7O8ASomZjlq0AsTERyQKhnRdCL/Z75eoxUIeisNaSuVKk0awwxzpTq074XuyEZUlcYyLjevMfK6sEK6Hb/MbL9wHoUEAgtfnz/iocLaLUxM6hzhUkTbYgYa1YzffXg9othqiybAVYUuFxRER84QhfL8oNCBxBKQLSOCI4K70UKgASAZsr5e4DRNK1bNk+wATkEtExQJkhQg8BeUHh1T9o3lDwDU1BrfT8bxEiSMjhhrmslizfLI0YdGxZQY4AFhkkfknopuB6OACi8+wFIjkNKN5Kj/58QsBG6zPNOy9LXwnQtSwlJPgfBBieu+RHh4AjIkUh/LHx4KQQxtpJ+DmKRh81xxl9Q7AaEqtkS1GECqTwFmxYFqRnEaALkTr0GovUyICmnwJhaEfho8pRFMCCuI5GfiySdciMI2IVGJsmfRVSwVjT6YAGDeSEZUrPk4kU6YIVrx0iwXeTvrekQaDhkBkljRHXZtd95Z6t935O4asiuMVS0AtnXUTYgoMGfD1U8IhNGwofASEB13P8I3u33PX7yVT2dfUBhQO7fvvJRCxZV+d1ZfFhKaRKiHyDHm0o+DugsEi8t7v3mw/eduAtGwYJDfrx3OzpTjRRAaRto7b3i3SAG0GYHMlfSFxaBW5et3Nycnaym4WTET78kBMh8K4Nu2YRTBCtAk8c+tojM6XpzwDIJCLU389yV9uR4hQC+xdP/vmj5Wqx5DBAejw/9nkiUvO4yLo8fnhJo5nC6PTo7yZiqW0s9l8jj4+IefUO84ueH2ZSKMxi1ec1WpUh84si/GUojKTR4YqHqMuhVkDVWnJb566hBnHp9zTvZNt6f80nNgsuUNfii0Hj6aGgTSzUzXVkm5yIAWpTBtBSY4EPWnhGCciyq8lYINzALOm5qw1AGAWmt0FsHoDmMj3LVAALZxJu6lUkqoq1nUuFwj9rYh15AyEJrhbh3YjUqcZPlwAbeiK8TZA2i9AxYDmzXEsgBqF1nb3/+LEd+/42ihDbaOQRJUCxPSD4K0CYaVadJBBNtTQrPRYE6tFCJrgXCXYA2cZyUvBkjFP4+M5ff1pYNL9/TbHAz4KikFvYFcbd+g1EwqiJYV5dT71485wSV4DxJrG0LlLcEpVAOu+nCxOp6Jt2XbYB6cs7HjYYsB+AOgXYzhd80fua/XRbmezSLQAiePTeJfAPmjSitNY6SLhBYevS7tJZAKHWJcWajhCXVo4jnWi+4wfWhm2DCdT8Q2HNJqVRzX8Jo9+8UVsTwCWBjEOgxdur3kcsYfzC9Pm1mWRHGX4BySEG97Whw389PHP+2wiokWCzzr/SwMcxIQLVtbTW7NlYwn1NEMMCtq5waSk3kSBZYfHGZ0ceE+Gsps1XOhyOKlDENRYZ56itZalZJjJAWABjpjRNt5TsFDWbjrWtJUoXac/wijtEfXG0qL28Q5qfWIoP0C4w7QES5iFEDpYKiCi6uTniEfKAdiExxhjOC8oxAM1Uq4N794g2E52i/QcJQBgjlDMi5C41N+ksdmGlu7wiAYS00eoMkMQV5MxVsoKWInSriYg4WucHkBFAeT1yAupDrlTAIsVcZ6GTGgto4zG0AUWmrPVF5DEU3AoAqzQG0Gs68jrnkWUIUM6o8FaMuVJ4Q0aTPvbqChDFlciW2Z8qTKS08Vh7b2GFSesNYnEcjJ1QkEPUXKk0PAaQKTASqNkvNPLa55iv5N1G2NC9BeonIjzduk7RX7UjcsFxnKQABMw2PThyYltnsquhjYbQFnEBumzRQYOzgHxWDxEYi36AJrKIK4XXaZyKp4M3zx1ZU2mUBpCgToAeGTcpzHrDOxskPCeWiTSEGIznRm/NlWeiPuGV9gctnxB1qlvrRAKj8VQp0bVF6o86eKvSq+vHh9/awcwJbeL0HS9pyLjRNiuJurlam2QYfMfvcgg9QKyW68Wt2m9/S9/OvD6oHSxBSZVwtSqUDli1UXU29QyUnj/2w74LU+d+lZC0YQs8P9mjI/wuHyCaGTWOE/cz6wuV2bcNmcrZ8dMPab+9tpxXG1WTr+S8dlHEYqRzXs2+L7mpfPDECxuee/OZx7SbhZErcRPr9B0/w2yZjBvJMc8JRhsmJO6lui2H5XKtmDdkgsHh4w//3dNf2rKjb+dLt2zcebGve1NZe2/Vs0IbUeudSrWS8+a5o2uODx/doSOvlWoBqbroJtOJjk2KMaPVY4FVQEDAGgNOJtE5YNAcLNRmOwy5tZny1J4XBp+7/dWhwxejrutr6Sz5AEi9fMCNVLlWGrBs44ZMVWV1jJvoTHVvMeT4LLaFCKJuFudyJxci6hww7tH+noFv7Nx4+5tPvfLN/WMzI/vULxJBpdqorK/WK5uukjhdNLsc+dfLabeFfnf9ikXQzRCWkMKQbSKbyJ7y3cQnVHjbLIaQ9rhDtGNO3GZSlCXrGRpdlV717fu2/9r3OhOZum40/OzHH//uyydfOvTG2VfuninPfNRaWwPk8uU01HyxowSVEZHkgqCjKX0NBQKIfgfvLsQiFqP4f6HnX43m+INAnAxVU356eFPPDW/s273/JweP/2jo3OTbf0SKElj3DBoHgOsGzaijTb092bV/f/fWe3840NM3c3FmJHM+l/c3dvYVKo2KYcLuZCx7G6C5ObBBbW67yRWblVUQpJgfP7ypZ+AHlXq5U3sQm103iq7UWxNczF34LWbu9x3/xb6uDd+vNKrd0T4Wwka5UVmfK878DovovoPGfLByNZrjjzE//vINa7Z8b212XaW3e2MxE882RvIXE/fduu/ZQ4OHJk+NDj4uRtY6xjl6W//er7469OKMWkDhk3d8+jvA7E/MTmbjboLTCbfx7JvPfOzC9PmHLdtt+iqGHHCN679XYCYi+0uVkt2/56GvZWLZujomPa8rR2/3xtK/H/x6Zmj8zBdZ+CEy/uAXHvzjp6by4zFNx/rgv/b8qR//9PXTh/9SQNZKZBzLMwTlP1uatbv693xDgGm6OJVMuUnOFXKZ37zj04eePvJdniyMDRy4/cATmVg3v/z2wbW4Z/OdD/et7g9d9NgiR8NFzJSr5O9Tc0KAUvRwxeSKnhZj3gxOkNmmUvHkK3EvOcGhdVtb5MkxQb5cuCm0wTpBVlPFbDz7I9GeY8XgDOR73myxUhyo2XAHiNVM8JJ9wnz+6UTq5bibnGBg3f8U+SvWcoL+QSwEwglNhIzPjtD/AxnlviRhRwkHAAAAAElFTkSuQmCC",Ns=""+new URL("tile_immune_node-B1Vbn9Zd.png",import.meta.url).href,Us=""+new URL("tile_intestine_fold-SPdY4hPp.png",import.meta.url).href,zs=""+new URL("tile_lymph_wall-BW_wToao.png",import.meta.url).href,Vs=""+new URL("tile_mucus_hazard-BNpgSo_S.png",import.meta.url).href,Xs=""+new URL("tile_oral_floor-C_nRVcgx.png",import.meta.url).href,Ys=""+new URL("tile_stomach_acid-DcFLdyud.png",import.meta.url).href,vt={commonMin:5,c
6381ommonMax:7,rMin:300,rMax:500,rJitter:24,rBossMin:540,rBossMax:620,rBonusMin:240,rBonusMax:300,gapMin:220,gapMax:320,corrWMin:120,corrWMax:160,midJitter:90,pad:240,walk:{proposals:48,edgeMargin:110,corrClear:24,turnRad:Math.PI*.75,loopGapMax:760,loopChance:.5,loopMax:2},spawnsMin:2,spawnsMax:4,spawnRMin:.25,spawnRMax:.72,pickupRMax:.6,heartChance:.35,organelleChance:.3,bonusHeartChance:.5,tierMid:.34,tierLate:.67};function Vn($){let N=$>>>0;return()=>{N=N+1831565813>>>0;let C=N;return C=Math.imul(C^C>>>15,C|1),C^=C+Math.imul(C^C>>>7,C|61),((C^C>>>14)>>>0)/4294967296}}function ao($){const N=JSON.stringify($);let C=2166136261;for(let w=0;w<N.length;w++)C^=N.charCodeAt(w),C=Math.imul(C,16777619);return(C>>>0).toString(16)}function Pn($,N={}){$=$>>>0;const C=N.commonMin??vt.commonMin,w=N.commonMax??vt.commonMax,R=N.bonusMin??1,b=N.bonusMax??2,c=N.enemyTypes??["macro","tcell","plasma"],x=Vn($),t=(E,M)=>E+x()*(M-E),o=(E,M)=>E+Math.floor(x()*(M-E+1)),p=o(C,w)+2,a=[];for(let E=0;E<p;E++)if(E===p-1)a.push(o(vt.rBossMin,vt.rBossMax));else{const M=E/(p-1);a.push(Math.round(vt.rMin+(vt.rMax-vt.rMin)*M)+o(-24,vt.rJitter))}const n=[{x:0,y:0,r:a[0],kind:"entry",enemySpawns:[],pickups:[]}],r=(E,M,F,A)=>{for(let P=0;P<n.length;P++){if(P===F||P===A)continue;const L=n[P];for(let O=0;O+1<E.length;O++)if(Xn(L.x,L.y,E[O],E[O+1])<L.r+M/2+vt.walk.corrClear)return!1}return!0},e=(E,M,F)=>{for(const A of[vt.walk.edgeMargin,vt.walk.edgeMargin*.6,vt.walk.edgeMargin*.3])for(let P=0;P<vt.walk.proposals;P++){const L=x()<.5?x()*Math.PI*2:F+(x()*2-1)*vt.walk.turnRad,O=n[E].r+t(vt.gapMin,vt.gapMax)+M,G=n[E].x+Math.cos(L)*O,z=n[E].y+Math.sin(L)*O;let Y=!0;for(const X of n)if(Math.hypot(G-X.x,z-X.y)<M+X.r+A){Y=!1;break}if(Y&&r([{x:n[E].x,y:n[E].y},{x:G,y:z}],vt.corrWMax,E,-1))return{x:G,y:z,dir:L}}return null};let s=x()*Math.PI*2;for(let E=1;E<p;E++){const F=e(E-1,a[E],s)??(()=>{for(let L=1;L<=64;L++){const O=s+L%16*(Math.PI/8),G=(n[E-1].r+a[E]+vt.gapMin)*(1+Math.floor(L/16)*.5),z=n[E-1].x+Math.cos(O)*G,Y=n[E-1].y+Math.sin(O)*G;if(n.every(X=>Math.hypot(z-X.x,Y-X.y)>=a[E]+X.r))return{x:z,y:Y,dir:O}}const P=(n[E-1].r+a[E]+vt.gapMin)*2.5;return{x:n[E-1].x+Math.cos(s)*P,y:n[E-1].y+Math.sin(s)*P,dir:s}})();s=F.dir;const A=E===p-1?"boss":"common";n.push({x:Math.round(F.x),y:Math.round(F.y),r:a[E],kind:A,enemySpawns:[],pickups:[]})}const h=[],i=(E,M)=>{const F=n[E],A=n[M],P=o(vt.corrWMin,vt.corrWMax),L=t(-90,vt.midJitter),O=(F.x+A.x)/2,G=(F.y+A.y)/2,z=A.x-F.x,Y=A.y-F.y,X=Math.hypot(z,Y)||1;let I={x:Math.round(O-Y/X*L),y:Math.round(G+z/X*L)};r([{x:F.x,y:F.y},I,{x:A.x,y:A.y}],P,E,M)||(I={x:Math.round(O),y:Math.round(G)}),h.push({points:[{x:F.x,y:F.y},I,{x:A.x,y:A.y}],w:P,a:E,b:M})};for(let E=0;E+1<p;E++)i(E,E+1);const l=o(R,b),u=n.map((E,M)=>M);for(let E=0;E<l&&u.length>0;E++){const M=u.splice(o(0,u.length-1),1)[0],F=o(vt.rBonusMin,vt.rBonusMax),A=e(M,F,x()*Math.PI*2);A&&(n.push({x:Math.round(A.x),y:Math.round(A.y),r:F,kind:"bonus",enemySpawns:[],pickups:[]}),i(M,n.length-1))}let d=0;for(let E=0;E<p&&d<vt.walk.loopMax;E++)for(let M=E+2;M<p&&d<vt.walk.loopMax;M++){const F=n[E],A=n[M];Math.hypot(F.x-A.x,F.y-A.y)-F.r-A.r>vt.walk.loopGapMax||x()>=vt.walk.loopChance||r([{x:F.x,y:F.y},{x:A.x,y:A.y}],vt.corrWMax,E,M)&&(i(E,M),d++)}const f=(E,M,F=0)=>{const A=x()*Math.PI*2,P=E.r*(F+x()*(M-F));return{x:Math.round(E.x+Math.cos(A)*P),y:Math.round(E.y+Math.sin(A)*P)}};n.forEach((E,M)=>{if(E.kind==="common"){const F=M/(p-1),A=F<vt.tierMid?c.slice(0,1):F<vt.tierLate?c.slice(0,Math.max(1,Math.min(2,c.length))):c,P=o(vt.spawnsMin,vt.spawnsMax);for(let L=0;L<P;L++){const O=f(E,vt.spawnRMax,vt.spawnRMin);E.enemySpawns.push({...O,type:A[Math.floor(x()*A.length)]})}x()<vt.heartChance&&E.pickups.push({...f(E,vt.pickupRMax),kind:"heart"}),x()<vt.organelleChance&&E.pickups.push({...f(E,vt.pickupRMax),kind:"organelle"})}else E.kind==="bonus"&&(E.pickups.push({...f(E,vt.pickupRMax),kind:"organelle"}),x()<vt.bonusHeartChance&&E.pickups.push({...f(E,vt.pickupRMax),kind:"heart"}))});let v=1/0,m=1/0,y=-1/0,g=-1/0;for(const E of n)v=Math.min(v,E.x-E.r),m=Math.min(m,E.y-E.r),y=Math.max(y,E.x+E.r),g=Math.max(g,E.y+E.r);const T=Math.round(vt.pad-v),S=Math.round(vt.pad-m);for(const E of n){E.x+=T,E.y+=S;for(const M of[...E.enemySpawns,...E.pickups])M.x+=T,M.y+=S}for(const E of h)for(const M of E.points)M.x+=T,M.y+=S;return{seed:$,world:{w:Math.round(y-v)+vt.pad*2,h:Math.round(g-m)+vt.pad*2},rooms:n,chainIdx:n.slice(0,p).map((E,M)=>
6381M),corridors:h,playerStart:{x:n[0].x,y:n[0].y},bossRoom:p-1}}function Xn($,N,C,w){const R=w.x-C.x,b=w.y-C.y,c=R*R+b*b||1;let x=(($-C.x)*R+(N-C.y)*b)/c;x=Math.max(0,Math.min(1,x));const t=C.x+R*x,o=C.y+b*x;return Math.hypot($-t,N-o)}function oo($){return(N,C)=>{for(const w of $.rooms){const R=N-w.x,b=C-w.y;if(R*R+b*b<=w.r*w.r)return!0}for(const w of $.corridors){const R=w.w/2;for(let b=0;b+1<w.points.length;b++)if(Xn(N,C,w.points[b],w.points[b+1])<=R)return!0}return!1}}class Li{constructor(N,C,w,R,b,c,x,t,o){H(this,"alive",!0);H(this,"hp");H(this,"state","chase");H(this,"stateAt",0);H(this,"sprite");H(this,"flashUntil",-1);H(this,"lungeDirX",0);H(this,"lungeDirY",0);H(this,"lungeUntil",0);H(this,"nextLungeAt",0);H(this,"nextFireAt",-1);H(this,"volleyCount",0);H(this,"kbX",0);H(this,"kbY",0);H(this,"kbT",0);this.scene=N,this.id=C,this.kind=w,this.x=R,this.y=b,this.spec=c,this.pointValid=x,this.fireBullet=t,this.baseTint=o,this.hp=c.hp,this.sprite=N.add.image(R,b,c.tex).setDepth(15).setTint(o)}get radius(){return this.spec.radius}update(N,C,w){if(this.alive){if(this.kbT>0){this.kbT=Math.max(0,this.kbT-C),this.moveAxis(this.kbX*C/1e3,this.kbY*C/1e3),this.sprite.setPosition(this.x,this.y);return}this.kind==="macro"?this.updateMacro(N,C,w):this.kind==="plasma"?this.updatePlasma(N,C,w):this.chase(C,w,this.spec.speed),this.sprite.setPosition(this.x,this.y)}}tick(N){!this.alive||N<=this.flashUntil||(this.state==="telegraph"?this.sprite.tintTopLeft!==16744576&&this.sprite.setTintFill(16744576):this.sprite.setTint(this.baseTint))}hit(N){if(!this.alive||(this.hp-=N,this.sprite.setTintFill(16777215),this.flashUntil=this.scene.time.now+60,this.hp>0))return!1;this.alive=!1;for(let C=0;C<8;C++){const w=C/8*Math.PI*2,R=this.scene.add.image(this.x,this.y,"l4_particle").setDepth(16).setTint(this.spec.particle);this.scene.tweens.add({targets:R,x:this.x+Math.cos(w)*(24+Math.random()*28),y:this.y+Math.sin(w)*(24+Math.random()*28),alpha:0,duration:360,onComplete:()=>R.destroy()})}return this.sprite.clearTint(),this.scene.tweens.add({targets:this.sprite,alpha:0,scaleX:.15,scaleY:.15,duration:300,ease:"Back.in",onComplete:()=>this.sprite.destroy()}),!0}updateMacro(N,C,w){const R=this.spec;if(this.state==="chase"){const b=w.x-this.x,c=w.y-this.y,x=Math.hypot(b,c);if(x>1&&this.moveAxis(b/x*R.speed*C/1e3,c/x*R.speed*C/1e3),x<R.lungeRange&&N>=this.nextLungeAt){this.state="telegraph",this.stateAt=N;const t=x||1;this.lungeDirX=b/t,this.lungeDirY=c/t,this.sprite.setTintFill(16744576)}}else this.state==="telegraph"?(this.sprite.setScale(1+.1*Math.sin((N-this.stateAt)/60)),N-this.stateAt>=R.telegraphMs&&(this.state="lunge",this.stateAt=N,this.lungeUntil=N+R.lungeMs,this.sprite.setScale(1))):(this.moveAxis(this.lungeDirX*R.lungeSpeed*C/1e3,this.lungeDirY*R.lungeSpeed*C/1e3),N>=this.lungeUntil&&(this.state="chase",this.stateAt=N,this.nextLungeAt=N+R.lungeCdMs))}updatePlasma(N,C,w){const R=this.spec,b=w.x-this.x,c=w.y-this.y,x=Math.hypot(b,c);if(x<R.keepMin&&x>1?this.moveAxis(-b/x*R.speed*C/1e3,-c/x*R.speed*C/1e3):x>R.keepMax&&this.chase(C,w,R.speed),this.nextFireAt<0){x<R.fireRange&&(this.nextFireAt=N+R.fireCdMs);return}if(x<R.fireRange&&N>=this.nextFireAt){this.nextFireAt=N+R.fireCdMs,this.volleyCount++;const t=Math.atan2(c,b),o=this.volleyCount%R.volleyEvery===0?[t-R.fanRad,t,t+R.fanRad]:[t];for(const p of o)this.fireBullet(this.x+Math.cos(p)*(R.radius+6),this.y+Math.sin(p)*(R.radius+6),Math.cos(p)*R.bulletSpeed,Math.sin(p)*R.bulletSpeed,N+R.bulletTtlMs)}}chase(N,C,w){const R=C.x-this.x,b=C.y-this.y,c=Math.hypot(R,b);c<1||this.moveAxis(R/c*w*N/1e3,b/c*w*N/1e3)}canStand(N,C){const w=this.spec.radius-4;
6381return this.pointValid(N,C)&&this.pointValid(N+w,C)&&this.pointValid(N-w,C)&&this.pointValid(N,C+w)&&this.pointValid(N,C-w)}moveAxis(N,C){N!==0&&this.canStand(this.x+N,this.y)&&(this.x+=N),C!==0&&this.canStand(this.x,this.y+C)&&(this.y+=C)}}const ho={charge:"迁移突进",ring:"细胞因子脉冲",summon:"抗原呈递"};class lo{constructor(N,C,w,R,b,c,x,t,o,p,a=()=>!0){H(this,"alive",!0);H(this,"hp");H(this,"phase",1);H(this,"state","dormant");H(this,"stateAt",0);H(this,"moveName","—");H(this,"sprite");H(this,"kbX",0);H(this,"kbY",0);H(this,"kbT",0);H(this,"flashUntil",-1);H(this,"moveIdx",0);H(this,"MOVES");H(this,"pendingMove","charge");H(this,"chargeX",0);H(this,"chargeY",0);H(this,"chargeUntil",0);H(this,"idleTween");this.scene=N,this.x=C,this.y=w,this.spec=R,this.pointValid=b,this.fireBullet=c,this.summonTcells=x,this.summonAlive=t,this.onPhase2=o,this.onDeath=p,this.canActivate=a,this.hp=R.hp,this.MOVES=R.moves??["charge","ring","summon"];const n=N.add.sprite(C,w,R.anim?R.anim.idle:R.tex).setDepth(18);this.sprite=n,R.anim&&n.play(R.anim.idle),this.idleTween=N.tweens.add({targets:this.sprite,scale:1.06,duration:1400,yoyo:!0,repeat:-1,ease:"Sine.inOut"})}playAnim(N){this.spec.anim&&this.sprite.play(N)}get radius(){return this.spec.radius}get activated(){return this.state!=="dormant"}activate(N){this.state==="dormant"&&(this.idleTween.stop(),this.sprite.setScale(1),this.state="idle",this.stateAt=N-this.spec.idleMs+this.spec.firstIdleMs)}update(N,C,w){if(!this.alive||this.state==="dormant")return;if(this.kbT>0){this.kbT=Math.max(0,this.kbT-C),this.moveAxis(this.kbX*C/1e3,this.kbY*C/1e3),this.sprite.setPosition(this.x,this.y);return}const R=N-this.stateAt;if(this.state==="idle")R>=(this.phase===2?this.spec.p2IdleMs:this.spec.idleMs)&&this.beginTelegraph(N,w);else if(this.state==="telegraph")this.sprite.setScale(1+.08*Math.sin(R/60)),R>=(this.phase===2?this.spec.p2TelegraphMs:this.spec.telegraphMs)&&this.execMove(N);else if(this.state==="charge"){const b=this.phase===2?this.spec.p2ChargeSpeed:this.spec.chargeSpeed;(!this.moveAxis(this.chargeX*b*C/1e3,this.chargeY*b*C/1e3)||N>=this.chargeUntil)&&this.toIdle(N)}this.sprite.setPosition(this.x,this.y)}tick(N){!this.alive||N<=this.flashUntil||(this.state==="telegraph"?this.sprite.tintTopLeft!==16744576&&this.sprite.setTintFill(16744576):this.sprite.clearTint())}hit(N){if(!this.alive)return!1;if(this.state==="dormant")return this.canActivate()&&this.activate(this.scene.time.now),!1;if(this.hp-=N,this.sprite.setTintFill(16777215),this.flashUntil=this.scene.time.now+60,this.spec.anim&&this.hp>0){const C=this.sprite;C.play(this.spec.anim.hurt),C.once("animationcomplete",()=>{this.alive&&this.spec.anim&&this.playAnim(this.state==="telegraph"||this.state==="charge"?this.spec.anim.attack:this.spec.anim.idle)})}if(this.phase===1&&this.hp<=this.spec.hp/2&&(this.phase=2,this.onPhase2()),this.hp<=0){this.alive=!1,this.state="dead",this.idleTween.stop(),this.sprite.setScale(1).clearTint(),this.scene.cameras.main.shake(500,.01);for(let C=0;C<20;C++){const w=C/20*Math.PI*2,R=this.scene.add.image(this.x,this.y,"l4_particle").setDepth(19).setTint(this.spec.particle).setScale(1.6);this.scene.tweens.add({targets:R,x:this.x+Math.cos(w)*(60+Math.random()*50),y:this.y+Math.sin(w)*(60+Math.random()*50),alpha:0,duration:700,onComplete:()=>R.destroy()})}if(this.spec.anim){const C=this.sprite;C.play(this.spec.anim.death),C.once("animationcomplete",()=>{this.sprite.destroy(),this.onDeath(this.x,this.y)})}else this.scene.tweens.add({targets:this.sprite,alpha:0,scaleX:.1,scaleY:.1,angle:160,duration:800,ease:"Back.in",onComplete:()=>{this.sprite.destroy(),this.onDeath(this.x,this.y)}});return!0}return!1}beginTelegraph(N,C){this.state="telegraph",this.stateAt=N;const w=this.MOVES[this.moveIdx%this.MOVES.length];this.moveIdx++,this.pendingMove=w,this.moveName=ho[w];const R=C.x-this.x,b=C.y-this.y,c=Math.hypot(R,b)||1;this.chargeX=R/c,this.chargeY=b/c,this.sprite.setTintFill(16744576),this.spec.anim&&this.playAnim(this.spec.anim.attack)}execMove(N){this.sprite.setScale(1);const C=this.pendingMove;if(C==="summon"&&this.summonAlive()>=this.spec.summonMaxAlive){this.toIdle(N),this.moveName="—";return}if(C==="charge")this.state="charge",this.stateAt=N,this.chargeUntil=N+this.spec.chargeMs;else if(C==="ring"){const w=this.spec.ringSpeed*(this.phase===2?this.spec.p2BulletMult:1),R=this.moveIdx*.23;this.fireRing(R,this.spec.ringCount,w,N),this.phase===2&&this.fireRing(R+Math.PI/this.spec.ringCount2,this.spec.ringCount2,w*this.spec.ringInnerMult,N),this.toIdle(N)}else this.summonTcells(this.x,this.y,this.spec.summonCount),this.toIdle(N)}fireRing(N,C,w,R){for(let b=0;b<C;b++){const c=N+b/C*Math.PI*2;this.fireBullet(this.x+Math.cos(c)*(this.spec.radius+6),this.y+Math.sin(c)*(this.spec.radius+6),Math.cos(c)*w,Math.sin(c)*w,R+this.spec.ringTtlMs)}}toIdle(N){this.state="idle",this.stateAt=N,this.moveName="—",this.spec.anim&&this.playAnim(this.spec.anim.idle)}canStand(N,C){const w=this.spec.radius-4;
6381return this.pointValid(N,C)&&this.pointValid(N+w,C)&&this.pointValid(N-w,C)&&this.pointValid(N,C+w)&&this.pointValid(N,C-w)}moveAxis(N,C){let w=!1;return N!==0&&this.canStand(this.x+N,this.y)&&(this.x+=N,w=!0),C!==0&&this.canStand(this.x,this.y+C)&&(this.y+=C,w=!0),w}}const jt={movePerLevel:.1,fireCdPerLevel:.08,doubleOffset:5,pierceExtra:1,homingRange:300,homingTurn:3.2,thornsDmg:[1,2,3],thornsKnock:[280,360,440],thornsKbMs:180,heartsBonusPerLevel:1,pickupPerLevel:.5,killHealPerLevel:.08,miniHealTtlMs:1e4},me={flagella:{name:"鞭毛",max:3,desc:["移动速度 +10%","移动速度 +20%(累计)","移动速度 +30%(累计)"],icon:["..###...",".#...#..",".#...#..",".#...#..","..###...","...#....","..#.#...",".#...#.."]},mito:{name:"线粒体",max:3,desc:["开火间隔 -8%","开火间隔 -16%(累计)","开火间隔 -24%(累计)"],icon:["..####..",".##..##.","#..##..#","#.##.#.#","#.#.##.#","#..##..#",".##..##.","..####.."]},secretor:{name:"分泌体",max:3,desc:["双发:平行射出两发孢子弹","穿透:命中后还能再穿 1 个目标","追踪:孢子弹小幅弯向 300px 内最近敌人"],icon:["...oo...","..#..#..",".#.##.#.","o..##..o",".#.##.#.","..#..#..","...oo...","........"]},spike:{name:"刺丝泡",max:3,desc:["受击反伤 1 点并弹开来敌","受击反伤 2 点,弹开更远","受击反伤 3 点,弹开最远"],icon:["o..oo..o",".o#..#o.",".#.##.#.","o#.##.#o",".#.##.#.",".o#..#o.","o..oo..o","........"]},vacuole:{name:"液泡",max:3,desc:["血量上限 +1(并回 1 心)","血量上限 +2(累计,再回 1 心)","血量上限 +3(累计,再回 1 心)"],icon:["..####..",".##..##.",".#....#.","#......#","#......#",".#....#.",".##..##.","..####.."]},ribo:{name:"核糖体",max:3,desc:["拾取半径 +50%,击杀 8% 掉迷你心","拾取半径 +100%,击杀 16% 掉心","拾取半径 +150%,击杀 24% 掉心"],icon:["..###...",".#####..","..#.#...","..###...",".#####..","..#.#...",".....oo.","....oo.."]}},Be=["flagella","mito","secretor","spike","vacuole","ribo"];function qe($){const N=t=>Math.min($[t]??0,me[t].max),C=N("flagella"),w=N("mito"),R=N("secretor"),b=N("spike"),c=N("vacuole"),x=N("ribo");return{moveMult:1+jt.movePerLevel*C,fireCdMult:1-jt.fireCdPerLevel*w,dmgMult:1,secretor:{double:R>=1,pierce:R>=2?jt.pierceExtra:0,homing:R>=3},thorns:{dmg:b===0?0:jt.thornsDmg[b-1],knock:b===0?0:jt.thornsKnock[b-1],kbMs:jt.thornsKbMs},maxHeartsBonus:jt.heartsBonusPerLevel*c,pickupMult:1+jt.pickupPerLevel*x,killHealChance:jt.killHealPerLevel*x}}function uo($,N=3,C=Math.random){const w=Be.filter(R=>($[R]??0)<me[R].max);for(let R=w.length-1;R>0;R--){const b=Math.floor(C()*(R+1));[w[R],w[b]]=[w[b],w[R]]}return w.slice(0,N)}const fi=1280,Rn=720;class fo{constructor(N,C,w=5002){H(this,"c");H(this,"options",[]);H(this,"sel",0);H(this,"highlights",[]);H(this,"selText");this.scene=N,this.onPick=C,this.depth=w}isOpen(){return!!this.c}open(N){this.options=N,this.sel=0,this.highlights=[];const C=250,w=300,R=30,b=N.length*C+(N.length-1)*R,c=(fi-b)/2,x=(Rn-w)/2+24,t=this.scene.add.container(0,0).setDepth(this.depth).setScrollFactor(0);t.add(this.scene.add.rectangle(0,0,fi,Rn,659737,.62).setOrigin(0)),t.add(this.scene.add.text(fi/2,x-58,"— 细胞器进化 · 三选一 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5)),N.forEach((o,p)=>{const a=me[o.id],n=c+p*(C+R),r=this.scene.add.graphics();r.lineStyle(3,st.Display.Color.HexStringToColor(Q.color.textWarm).color,1).strokeRect(n-6,x-6,C+12,w+12),t.add(r),this.highlights.push(r);const e=this.scene.add.graphics();Pt(e,n,x,C,w),t.add(e),t.add(this.scene.add.image(n+C/2,x+56,`l4_org_${o.id}`).setScale(2)),t.add(this.scene.add.text(n+C/2,x+104,a.name,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5)),t.add(this.scene.add.text(n+C/2,x+130,`Lv.${o.level-1} → Lv.${o.level}`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5)),t.add(this.scene.add.text(n+C/2,x+168,a.desc[o.level-1]??"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textMain,align:"center",wordWrap:{width:C-36}}).setOrigin(.5,0));const s=this.scene.add.zone(n+C/2,x+w/2,C,w).setInteractive({useHandCursor:!0});s.on("pointerover",()=>this.select(p)),s.on("pointerdown",()=>{this.sel=p,this.confirm()}),t.add(s)}),this.selText=this.scene.add.text(fi/2,x+w+26,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textDim}).setOrigin(.5),t.add(this.selText),this.c=t,this.render()}move(N){this.c&&this.select((this.sel+N+this.options.length)%this.options.length)}confirm(){if(!this.c)return;const N=this.options[this.sel];this.close(),this.onPick(N.id)}close(){var N;(N=this.c)==null||N.destroy(!0),this.c=void 0}select(N){this.sel=N,this.render()}render(){var C;
6381this.highlights.forEach((w,R)=>w.setVisible(R===this.sel));const N=this.options[this.sel];(C=this.selText)==null||C.setText(`←/→ 选择 · Enter / 点击 确认      当前:${me[N.id].name}`)}}const Nt=["mouth","stomach","gut","blood","lymph"],Qt={mouth:{id:"mouth",name:"口腔",subtitle:"唾液防线",toast:"侵入口腔 · 唾液防线——黏液裹着酶,先过巨噬细胞这一关",gen:{commonMin:5,commonMax:6,bonusMin:1,bonusMax:2,enemyTypes:["macro"]},palette:{tissue:2492687,vein:4198424,flesh:8010298,corridor:7219760,rim:4592672},playerTint:16771272,enemyTint:16769216,bossName:"巨噬细胞 · 哨兵",bossHp:40,bossTex:"l4_boss_macro",bossParticle:15259808,bossMoves:["charge","summon"],summonKind:"macro",bulletTex:"l4_cytokine",node:{x:965,y:101}},stomach:{id:"stomach",name:"胃",subtitle:"胃酸之海",toast:"侵入胃 · 胃酸之海——外壁覆上抗酸黏膜,小心组胺风暴",gen:{commonMin:5,commonMax:7,bonusMin:1,bonusMax:2,enemyTypes:["macro","tcell"]},palette:{tissue:2363400,vein:3809296,flesh:8018480,corridor:6702378,rim:4599834},playerTint:15788192,enemyTint:14215328,bossName:"肥大细胞 · 组胺风暴",bossHp:45,bossTex:"l4_boss_mast",bossParticle:14215328,bossMoves:["ring","charge"],summonKind:"tcell",bulletTex:"l4_histamine",node:{x:948,y:323},bossAnim:{idle:"l4_mast_idle",attack:"l4_mast_attack",hurt:"l4_mast_hurt",death:"l4_mast_death"}},gut:{id:"gut",name:"肠",subtitle:"皱襞迷宫",toast:"侵入肠 · 皱襞迷宫——派伊尔结里全是杀手 T 细胞的眼线",gen:{commonMin:6,commonMax:7,bonusMin:2,bonusMax:3,enemyTypes:["tcell","macro"]},palette:{tissue:2098702,vein:3673628,flesh:7218232,corridor:6037040,rim:3936804},playerTint:13682943,enemyTint:13148392,bossName:"杀手 T 细胞 · 教头",bossHp:50,bossTex:"l4_boss_killert",bossParticle:13213928,bossMoves:["charge","ring"],summonKind:"tcell",bulletTex:"l4_cytokine",node:{x:965,y:397}},blood:{id:"blood",name:"血液",subtitle:"血流冲袭",toast:"侵入血液 · 血流冲袭——中性粒细胞的急先锋大队正在路上",gen:{commonMin:6,commonMax:7,bonusMin:2,bonusMax:3,enemyTypes:["plasma","tcell"]},palette:{tissue:2623496,vein:4460560,flesh:9054762,corridor:7741986,rim:4986390},playerTint:16761024,enemyTint:16751258,bossName:"中性粒细胞 · 急先锋",bossHp:55,bossTex:"l4_boss_neutro",bossParticle:15263984,bossMoves:["charge","summon"],summonKind:"tcell",bulletTex:"l4_cytokine",node:{x:965,y:249}},lymph:{id:"lymph",name:"淋巴",subtitle:"免疫中枢",toast:"侵入淋巴 · 免疫中枢——指挥官就在里面,这是总决战",gen:{commonMin:5,commonMax:7,bonusMin:1,bonusMax:2,enemyTypes:["macro","tcell","plasma"]},palette:{tissue:1836564,vein:3280422,flesh:6171210,corridor:5251134,rim:3805744},playerTint:12644607,enemyTint:10541296,bossName:"树突状细胞 · 免疫指挥官",bossHp:60,bossTex:"l4_boss",bossParticle:15245496,bossMoves:["charge","ring","summon"],summonKind:"tcell",bulletTex:"l4_cytokine",node:{x:905,y:200}}};function co($){const N=Nt.indexOf($);return N>=0&&N+1<Nt.length?Nt[N+1]:null}function wn($){for(const N of Nt)if(!$[N])return N;return null}const St=1280,bt=720,Dt=5e3,vo=-100,ut={player:{radius:16,moveSpeed:260,maxHearts:3},fire:{cdMs:220,bulletSpeed:620,bulletTtlMs:1400,muzzle:22},combat:{bulletRadius:6,bulletDmg:1,kbSpeed:320,kbMs:180,invulnMs:1e3},maxDiff:{invulnMult:.6,enemyBulletSpdMult:1.15},pickup:{range:30},map:{cell:96,visionR:220},fog:{texel:16,veilAlpha:.55,veilR:300},frag:{tcell:1,plasma:2,macro:2,boss:20,hopDist:24,hopSpread:60,hopMs:320},enemies:{activateDist:700,macro:{hp:5,radius:34,speed:70,lungeRange:170,telegraphMs:380,lungeSpeed:430,lungeMs:280,lungeCdMs:1600,tex:"l4_macro",particle:15259808},tcell:{hp:2,radius:18,speed:150,tex:"l4_tcell",particle:13213928},plasma:{hp:3,radius:24,speed:90,keepMin:250,keepMax:340,fireRange:560,fireCdMs:2e3,volleyEvery:3,fanRad:.2,bulletSpeed:160,bulletTtlMs:4200,tex:"l4_plasma",particle:10475775}},boss:{hp:60,radius:64,tex:"l4_boss",particle:15245496,idleMs:900,p2IdleMs:700,firstIdleMs:1200,telegraphMs:460,p2TelegraphMs:360,chargeSpeed:540,p2ChargeSpeed:650,chargeMs:420,ringCount:14,ringCount2:10,ringSpeed:150,ringInnerMult:.7,p2BulletMult:1.15,ringTtlMs:4e3,summonCount:2,summonMaxAlive:4,coreEnterRange:44,activateInset:180,doorPad:34,doorGrowMs:380,doorOpenMs:420,doorThick:.62},decor:{veins:220,veinSegs:4,specks:380},hud:{heartGap:34,orgGap:46,prog:{yOff:36,gap:26,dotR:5},mapView:{maxW:940,maxH:460}}};class po extends st.Scene{constructor(){super("level4");H(this,"organ","mouth");H(this,"organCfg",Qt.mouth);H(this,"organProgress",{});H(this,"runSeed",0);H(this,"map");H(this,"genDigest","");H(this,"validFn",()=>!0);H(this,"px",0);H(this,"py",0);H(this,"hearts",ut.player.maxHearts);H(this,"invulnT",0);H(this,"kills",0);H(this,"killedEnemies",[]);H(this,"takenPickups",[]);H(this,"visitedRooms",[]);H(this,"exploredCells",new Set);H(this,"dead",!1);H(this,"deathPanel");H(this,"cleared",!1);H(this,"clearPanel");H(this,"enemies",[]);H(this,"heartPickups",[]);H(this,"organellePickups",[]);H(this,"fragPickups",[]);H(this,"frags",0);H(this,"organelles",{});H(this,"build",qe({}));H(this,"meta",Ei({}));H(this,"boss");H(this,"bossBar");H(this,"sealedSegments",[]);H(this,"hostCore");H(this,"playerBullets");H(this,"enemyBullets");H(this,"pendingNewSeed");H(this,"mapOpen",!1);H(this,"currentRoom",-1);H(this,"mapStats",{holes:0,pickupMarks:0,enemyMarks:0,bossShown:!1,fogOpaque:!1});H(this,"fogStats",{holes:0,veilOn:!1});H(this,"player");H(this,"keys");H(this,"cursors");H(this,"aimAngle",0);H(this,"nextFireAt",0);H(this,"kb",{x:0,y:0,t:0});H(this,"god",!1);H(this,"maxMode",!1);H(this,"runStartAt",0);H(this,"fragsSettled",!1);H(this,"graftMenu");H(this,"orgHud");H(this,"miniSeq",0);H(this,"summonSeq",0);H(this,"hudPanel");H(this,"heartsHud",[]);H(this,"fragText");H(this,"fragIcon");H(this,"pendingSnapshot");H(this,"reqOrgan");H(this,"nextRunSeed");H(this,"retreatOpen",!1);H(this,"retreatPanel");H(this,"pauseOpen",!1);H(this,"pauseContainer");H(this,"organClearPanel");H(this,"diving",!1);H(this,"lastSave",0);H(this,"saveHandler",()=>this.saveNow());H(this,"progC");H(this,"progMarker");H(this,"mapC");H(this,"mapDim");H(this,"mapBaseRT");H(this,"mapMaskRT");H(this,"fogMask");H(this,"fogVeil");H(this,"fogBrush");H(this,"evolutionContainer");H(this,"bossDoors",[])}get maxHeartsEff(){return ut.player.maxHearts+this.build.maxHeartsBonus+this.meta.bonusHearts}
6381get invulnMsEff(){return ut.combat.invulnMs*(this.maxMode?ut.maxDiff.invulnMult:1)+this.meta.invulnBonusMs}init(C){var w;this.pendingSnapshot=((w=C==null?void 0:C.snapshot)==null?void 0:w.level)===4?C.snapshot:void 0,this.reqOrgan=C==null?void 0:C.organ,this.organ="mouth",this.organCfg=Qt.mouth,this.organProgress={},this.runSeed=0,this.genDigest="",this.validFn=()=>!0,this.px=0,this.py=0,this.hearts=ut.player.maxHearts,this.invulnT=0,this.kills=0,this.killedEnemies=[],this.takenPickups=[],this.visitedRooms=[],this.exploredCells=new Set,this.dead=!1,this.deathPanel=void 0,this.cleared=!1,this.clearPanel=void 0,this.enemies=[],this.heartPickups=[],this.organellePickups=[],this.fragPickups=[],this.frags=0,this.organelles={},this.build=qe({}),this.meta=Ei({}),this.hostCore=void 0,this.pendingNewSeed=void 0,this.aimAngle=0,this.nextFireAt=0,this.kb={x:0,y:0,t:0},this.runStartAt=0,this.fragsSettled=!1,this.orgHud=void 0,this.miniSeq=0,this.summonSeq=0,this.hudPanel=void 0,this.heartsHud=[],this.fragText=void 0,this.fragIcon=void 0,this.lastSave=0,this.mapOpen=!1,this.retreatOpen=!1,this.retreatPanel=void 0,this.pauseOpen=!1,this.pauseContainer=void 0,this.organClearPanel=void 0,this.diving=!1,this.currentRoom=-1,this.mapStats={holes:0,pickupMarks:0,enemyMarks:0,bossShown:!1,fogOpaque:!1},this.sealedSegments=[],this.bossDoors=[],this.progC=void 0,this.progMarker=void 0,this.mapC=void 0,this.mapDim=void 0,this.mapBaseRT=void 0,this.mapMaskRT=void 0,this.fogStats={holes:0,veilOn:!1},this.fogMask=void 0,this.fogVeil=void 0,this.fogBrush=void 0}preload(){const C=(R,b)=>{this.textures.exists(R)||this.load.image(R,new URL(Object.assign({"../assets/level4/body_base.png":Ji,"../assets/level4/boss/boss_mast_cell_attack_sheet.png":Zi,"../assets/level4/boss/boss_mast_cell_attack_sheet_144.png":Qi,"../assets/level4/boss/boss_mast_cell_death_sheet.png":ji,"../assets/level4/boss/boss_mast_cell_death_sheet_144.png":$i,"../assets/level4/boss/boss_mast_cell_hurt_sheet.png":ki,"../assets/level4/boss/boss_mast_cell_hurt_sheet_144.png":qi,"../assets/level4/boss/boss_mast_cell_idle_sheet.png":_i,"../assets/level4/boss/boss_mast_cell_idle_sheet_144.png":ts,"../assets/level4/bullets/antibody_16.png":es,"../assets/level4/bullets/cytokine_16.png":is,"../assets/level4/bullets/frag_12.png":ss,"../assets/level4/bullets/heart_28x24.png":ns,"../assets/level4/bullets/histamine_16.png":rs,"../assets/level4/bullets/organelle_24.png":as,"../assets/level4/bullets/pickup_energy_enzyme.png":os,"../assets/level4/bullets/pickup_health_cell.png":hs,"../assets/level4/bullets/pickup_immune_shield.png":ls,"../assets/level4/bullets/pickup_score_antibody.png":us,"../assets/level4/bullets/projectile_allergy_spike.png":fs,"../assets/level4/bullets/projectile_histamine_orb.png":ds,"../assets/level4/bullets/projectile_plasma_needle.png":cs,"../assets/level4/bullets/projectile_toxin_drop.png":vs,"../assets/level4/bullets/spore_16.png":ps,"../assets/level4/card_blood.png":ms,"../assets/level4/card_gut.png":gs,"../assets/level4/card_lymph.png":xs,"../assets/level4/card_mouth.png":ys,"../assets/level4/card_stomach.png":Ts,"../assets/level4/cells/boss_dendritic_144.png":Ss,"../assets/level4/cells/boss_killert_144.png":Cs,"../assets/level4/cells/boss_macro_144.png":Es,"../assets/level4/cells/boss_neutro_144.png":Ms,"../assets/level4/cells/cell_48.png":As,"../assets/level4/cells/leuk_64.png":Ps,"../assets/level4/cells/macro_80.png":Rs,"../assets/level4/cells/nk_48.png":ws,"../assets/level4/node_blood.png":Fs,"../assets/level4/node_gut.png":Ls,"../assets/level4/node_lymph.png":Os,"../assets/level4/node_mouth.png":Ds,"../assets/level4/node_stomach.png":bs,"../assets/level4/tiles/terrain_tiles_64_sheet.png":Bs,"../assets/level4/tiles/tile_blood_vessel.png":Is,"../assets/level4/tiles/tile_dark_tissue.png":Gs,"../assets/level4/tiles/tile_immune_node.png":Ns,"../assets/level4/tiles/tile_intestine_fold.png":Us,"../assets/level4/tiles/tile_lymph_wall.png":zs,"../assets/level4/tiles/tile_mucus_hazard.png":Vs,"../assets/level4/tiles/tile_oral_floor.png":Xs,"../assets/level4/tiles/tile_stomach_acid.png":Ys})[`../assets/level4/${b}`],import.meta.url).href)},w=(R,b,c,x)=>{this.textures.exists(R)||this.load.spritesheet(R,new URL(Object.assign({"../assets/level4/body_base.png":Ji,"../assets/level4/boss/boss_mast_cell_attack_sheet.png":Zi,"../assets/level4/boss/boss_mast_cell_attack_sheet_144.png":Qi,"../assets/level4/boss/boss_mast_cell_death_sheet.png":ji,"../assets/level4/boss/boss_mast_cell_death_sheet_144.png":$i,"../assets/level4/boss/boss_mast_cell_hurt_sheet.png":ki,"../assets/level4/boss/boss_mast_cell_hurt_sheet_144.png":qi,"../assets/level4/boss/boss_mast_cell_idle_sheet.png":_i,"../assets/level4/boss/boss_mast_cell_idle_sheet_144.png":ts,"../assets/level4/bullets/antibody_16.png":es,"../assets/level4/bullets/cytokine_16.png":is,"../assets/level4/bullets/frag_12.png":ss,"../assets/level4/bullets/heart_28x24.png":ns,"../assets/level4/bullets/histamine_16.png":rs,"../assets/level4/bullets/organelle_24.png":as,"../assets/level4/bullets/pickup_energy_enzyme.png":os,"../assets/level4/bullets/pickup_health_cell.png":hs,"../assets/level4/bullets/pickup_immune_shield.png":ls,"../assets/level4/bullets/pickup_score_antibody.png":us,"../assets/level4/bullets/projectile_allergy_spike.png":fs,"../assets/level4/bullets/projectile_histamine_orb.png":ds,"../assets/level4/bullets/projectile_plasma_needle.png":cs,"../assets/level4/bullets/projectile_toxin_drop.png":vs,"../assets/level4/bullets/spore_16.png":ps,"../assets/level4/card_blood.png":ms,"../assets/level4/card_gut.png":gs,"../assets/level4/card_lymph.png":xs,"../assets/level4/card_mouth.png":ys,"../assets/level4/card_stomach.png":Ts,"../assets/level4/cells/boss_dendritic_144.png":Ss,"../assets/level4/cells/boss_killert_144.png":Cs,"../assets/level4/cells/boss_macro_144.png":Es,"../assets/level4/cells/boss_neutro_144.png":Ms,"../assets/level4/cells/cell_48.png":As,"../assets/level4/cells/leuk_64.png":Ps,"../assets/level4/cells/macro_80.png":Rs,"../assets/level4/cells/nk_48.png":ws,"../assets/level4/node_blood.png":Fs,"../assets/level4/node_gut.png":Ls,"../assets/level4/node_lymph.png":Os,"../assets/level4/node_mouth.png":Ds,"../assets/level4/node_stomach.png":bs,"../assets/level4/tiles/terrain_tiles_64_sheet.png":Bs,"../assets/level4/tiles/tile_blood_vessel.png":Is,"../assets/level4/tiles/tile_dark_tissue.png":Gs,"../assets/level4/tiles/tile_immune_node.png":Ns,"../assets/level4/tiles/tile_intestine_fold.png":Us,"../assets/level4/tiles/tile_lymph_wall.png":zs,"../assets/level4/tiles/tile_mucus_hazard.png":Vs,"../assets/level4/tiles/tile_oral_floor.png":Xs,"../assets/level4/tiles/tile_stomach_acid.png":Ys})[`../assets/level4/${b}`],import.meta.url).href,{frameWidth:c,frameHeight:x})};C("l4_cell","cells/cell_48.png"),C("l4_macro","cells/macro_80.png"),C("l4_tcell","cells/nk_48.png"),C("l4_plasma","cells/leuk_64.png"),C("l4_boss","cells/boss_dendritic_144.png"),C("l4_boss_macro","cells/boss_macro_144.png"),C("l4_boss_neutro","cells/boss_neutro_144.png"),C("l4_boss_killert","cells/boss_killert_144.png"),C("l4_spore","bullets/spore_16.png"),C("l4_antibody","bullets/antibody_16.png"),C("l4_histamine","bullets/histamine_16.png"),C("l4_cytokine","bullets/cytokine_16.png"),C("l4_heart","bullets/heart_28x24.png"),C("l4_organelle","bullets/organelle_24.png"),C("l4_frag","bullets/frag_12.png"),w("l4_mast_idle","boss/boss_mast_cell_idle_sheet_144.png",144,144),w("l4_mast_attack","boss/boss_mast_cell_attack_sheet_144.png",144,144),w("l4_mast_hurt","boss/boss_mast_cell_hurt_sheet_144.png",144,144),w("l4_mast_death","boss/boss_mast_cell_death_sheet_144.png",144,144)}create(){var s,h;
6381if(this.god=se(),this.maxMode=js(),this.meta=Ei(Ne().tree),this.hearts=this.maxHeartsEff,this.makeTextures(),this.textures.exists("l4_mast_idle")&&!this.anims.exists("l4_mast_idle")){const i=(l,u,d,f)=>this.anims.create({key:l,frames:this.anims.generateFrameNumbers(l,{start:0,end:u}),frameRate:d,repeat:f});i("l4_mast_idle",5,8,-1),i("l4_mast_attack",7,8,-1),i("l4_mast_hurt",3,10,0),i("l4_mast_death",7,8,0)}const C=new URLSearchParams(location.search),w=((s=this.pendingSnapshot)==null?void 0:s.level4)??((h=_t.read())==null?void 0:h.level4)??void 0,R=w&&w.genV===2?w:void 0;this.organProgress={...(R==null?void 0:R.organProgress)??{}},this.organelles={...(R==null?void 0:R.organelles)??{}},this.build=qe(this.organelles);const b=R==null?void 0:R.midrun,c=C.get("organ");this.organ=(this.reqOrgan&&this.reqOrgan in Qt?this.reqOrgan:void 0)??(c&&c in Qt?c:void 0)??(b!=null&&b.organ&&b.organ in Qt?b.organ:void 0)??"mouth",this.organCfg=Qt[this.organ];const x=(()=>{const i=C.get("seed");return i!==null&&Number.isFinite(Number(i))?Number(i)>>>0:void 0})(),t=x===void 0&&b&&b.organ===this.organ?b:void 0,o=this.nextRunSeed;this.nextRunSeed=void 0,t?this.runSeed=t.seed>>>0:o!==void 0?this.runSeed=o>>>0:this.runSeed=x??Math.floor(Math.random()*2**31)>>>0,this.map=Pn(this.runSeed,this.organCfg.gen),this.genDigest=ao(this.map);const p=oo(this.map);this.validFn=(i,l)=>p(i,l)&&!this.inSeal(i,l),this.px=this.map.playerStart.x,this.py=this.map.playerStart.y,this.buildWorld();const a=this.input.keyboard;a.addCapture([st.Input.Keyboard.KeyCodes.UP,st.Input.Keyboard.KeyCodes.DOWN,st.Input.Keyboard.KeyCodes.LEFT,st.Input.Keyboard.KeyCodes.RIGHT]),this.cursors=a.createCursorKeys(),this.keys={w:a.addKey(st.Input.Keyboard.KeyCodes.W),a:a.addKey(st.Input.Keyboard.KeyCodes.A),s:a.addKey(st.Input.Keyboard.KeyCodes.S),d:a.addKey(st.Input.Keyboard.KeyCodes.D),j:a.addKey(st.Input.Keyboard.KeyCodes.J)},this.graftMenu=new fo(this,i=>this.onGraftPicked(i)),a.on("keydown-LEFT",()=>{this.graftMenu.isOpen()&&this.graftMenu.move(-1)}),a.on("keydown-RIGHT",()=>{this.graftMenu.isOpen()&&this.graftMenu.move(1)}),a.on("keydown-ENTER",()=>{if(this.graftMenu.isOpen()){this.graftMenu.confirm();return}if(this.retreatOpen){this.confirmRetreat();return}if(this.pauseOpen){this.closePause(),this.openRetreat();return}if(this.dead){this.newRun();return}this.cleared&&this.organClearPanel&&this.diveOut()}),a.on("keydown-M",()=>{if(this.dead||this.cleared){this.scene.start("menu");return}!this.graftMenu.isOpen()&&!this.pauseOpen&&this.toggleMap()}),a.on("keydown-S",()=>{this.pauseOpen&&(this.saveNow(),this.flashSaveIcon())}),a.on("keydown-Q",()=>{this.pauseOpen&&(this.saveNow(),this.scene.start("menu"))}),a.on("keydown-R",()=>{this.pauseOpen&&(this.closePause(),this.rollNewRun(!1),this.newRun())}),a.on("keydown-ESC",()=>{if(this.mapOpen){this.toggleMap();return}if(this.retreatOpen){this.closeRetreat();return}if(this.pauseOpen){this.closePause();return}!this.dead&&!this.cleared&&!this.graftMenu.isOpen()&&this.openPause()}),this.player=this.add.image(this.px,this.py,"l4_cell").setDepth(20).setTint(this.organCfg.playerTint),this.evolutionContainer=this.add.container(this.px,this.py).setDepth(20),this.refreshPlayerEvolution(),this.playerBullets=new ti(this,"l4_spore",200,6,21),this.enemyBullets=new ti(this,"l4_antibody",500,6,21),this.spawnEnemies(),this.spawnHearts(),this.spawnOrganelles(),this.spawnBoss(),this.runStartAt=this.time.now,this.bossBar=new gi(this,this.organCfg.bossName),this.bossBar.box.setScrollFactor(0).setDepth(Dt),this.bossBar.setVisible(!1),this.hudPanel=this.add.graphics().setDepth(Dt).setScrollFactor(0),Pt(this.hudPanel,16,16,140,44),this.syncHeartsHud(),this.fragIcon=this.add.image(0,0,"l4_frag").setDepth(Dt).setScrollFactor(0).setScale(1.3),this.fragText=this.add.text(0,0,"0",{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textWarm}).setOrigin(0,.5).setDepth(Dt).setScrollFactor(0);const r=()=>this.layoutHud();if(this.scale.on("resize",r),this.events.once(st.Scenes.Events.SHUTDOWN,()=>this.scale.off("resize",r)),this.layoutHud(),!localStorage.getItem("yyvschili.l4tip")){localStorage.setItem("yyvschili.l4tip","1");const i=this.add.text(St/2,124,"WASD / 方向键 移动 · 鼠标/J 键攻击 · 踩青色点位进化细胞器 · 杀穿主链最终腔",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5).setDepth(Dt).setScrollFactor(0);this.tweens.add({targets:i,alpha:0,delay:8e3,duration:800,onComplete:()=>i.destroy()})}this.cameras.main.setBounds(0,0,this.map.world.w,this.map.world.h).startFollow(this.player,!1,.12,.12),this.cameras.main.centerOn(this.px,this.py);const e=()=>{var i;
6381return(i=this.input.keyboard)==null?void 0:i.resetKeys()};window.addEventListener("blur",e),document.addEventListener("visibilitychange",e),this.events.once(st.Scenes.Events.SHUTDOWN,()=>{window.removeEventListener("blur",e),document.removeEventListener("visibilitychange",e)}),window.addEventListener("pagehide",this.saveHandler),this.events.once(st.Scenes.Events.SHUTDOWN,()=>window.removeEventListener("pagehide",this.saveHandler)),t?(t.cleared||this.applyLevel4Save(t),this.pendingSnapshot=void 0):this.morphIntro(),this.initFog(),this.rebuildProgress(),this.cameras.main.setZoom(3),this.cameras.main.zoomTo(1,550,"Sine.easeInOut")}uiFrozen(){return this.graftMenu.isOpen()||this.mapOpen||this.retreatOpen||this.pauseOpen||this.diving}morphIntro(){this.player.setScale(1.4),this.tweens.add({targets:this.player,scaleX:1,scaleY:1,duration:650,ease:"Back.out"}),this.toast(this.organCfg.toast)}openRetreat(){this.retreatOpen=!0,this.physics.world.pause();const C=520,w=210,R=this.add.container(0,0).setDepth(Dt+1).setScrollFactor(0);R.add(this.add.rectangle(0,0,St,bt,659737,.55).setOrigin(0));const b=this.add.graphics();Pt(b,(St-C)/2,(bt-w)/2,C,w),R.add(b),R.add(this.add.text(St/2,bt/2-52,`从「${this.organCfg.name}」撤退?`,{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5)),R.add(this.add.text(St/2,bt/2-8,"本次入侵到此为止:质粒碎片照结算,器官感染进度保留",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textMain}).setOrigin(.5)),R.add(this.add.text(St/2,bt/2+56,"[Enter] 撤退回人体总览      [Esc] 继续战斗",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5)),this.retreatPanel=R}closeRetreat(){var C;this.retreatOpen=!1,(C=this.retreatPanel)==null||C.destroy(!0),this.retreatPanel=void 0,!this.graftMenu.isOpen()&&!this.mapOpen&&this.physics.world.resume()}confirmRetreat(){this.settleFrags(),this.writeL4(void 0),this.diveOut()}openPause(){if(this.pauseOpen)return;this.pauseOpen=!0,this.physics.world.pause();const C=420,w=340,R=(St-C)/2,b=(bt-w)/2,c=this.add.container(0,0).setDepth(Dt+1).setScrollFactor(0);c.add(this.add.rectangle(0,0,St,bt,659737,.55).setOrigin(0));const x=this.add.graphics();Pt(x,R,b,C,w),c.add(x),c.add(this.add.text(St/2,b+28,"— 暂停 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textWarm,fontStyle:"bold"}).setOrigin(.5).setScrollFactor(0)),["[Esc] 继续游戏","[S]   保存进度","[R]   重开本器官(新 seed)","[Enter] 撤退回人体总览","[Q]   返回主菜单"].forEach((o,p)=>{c.add(this.add.text(St/2,b+88+p*42,o,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(.5).setScrollFactor(0))}),this.pauseContainer=c}closePause(){var C;this.pauseOpen=!1,(C=this.pauseContainer)==null||C.destroy(!0),this.pauseContainer=void 0,!this.graftMenu.isOpen()&&!this.mapOpen&&!this.retreatOpen&&this.physics.world.resume()}flashSaveIcon(){const C=this.add.text(St/2,bt/2+92,"已保存",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.success}).setOrigin(.5).setDepth(Dt+2).setScrollFactor(0);this.tweens.add({targets:C,alpha:0,duration:900,onComplete:()=>C.destroy()})}diveOut(){if(this.diving)return;this.diving=!0;const C=this.add.rectangle(0,0,St,bt,1705228,0).setOrigin(0).setDepth(Dt+3).setScrollFactor(0);this.tweens.add({targets:C,alpha:1,duration:520,ease:"Sine.inOut"}),this.cameras.main.zoomTo(3,520,"Sine.easeInOut",!1,()=>this.scene.start("bodymap",{fromOrgan:this.organ}))}toggleMap(){var C,w,R,b;this.mapOpen=!this.mapOpen,this.mapOpen?(this.physics.world.pause(),this.rebuildMap()):((C=this.mapC)==null||C.destroy(!0),this.mapC=void 0,(w=this.mapDim)==null||w.destroy(),this.mapDim=void 0,(R=this.mapBaseRT)==null||R.setVisible(!1),(b=this.mapMaskRT)==null||b.setVisible(!1),this.graftMenu.isOpen()||this.physics.world.resume())}update(C,w){if(this.map&&!this.uiFrozen()){if(this.dead||this.cleared){this.sweepBullets(this.playerBullets,C),this.sweepBullets(this.enemyBullets,C);return}C-this.lastSave>2e3&&this.saveNow(),this.invulnT=Math.max(0,this.invulnT-w),this.kb.t=Math.max(0,this.kb.t-w),this.updateAim(),this.updateKnockback(w),this.updateMovement(w),this.updateFire(C),this.player.setPosition(this.px,this.py).setRotation(this.aimAngle),this.evolutionContainer.setPosition(this.px,this.py).setRotation(this.aimAngle),this.player.setAlpha(this.invulnT>0&&(C/90|0)%2===0?.35:1);for(const R of this.enemies)R.alive&&(Math.hypot(R.x-this.px,R.y-this.py)<ut.enemies.activateDist&&R.update(C,w,this.playerPoint()),R.tick(C));this.updateBoss(C,w),this.updateHoming(w),this.updateBulletHits(),this.updateTouchDamage(),this.updatePickups(C),this.updateVisited(),this.updateExplored(),this.updateFogVeil(),this.updateCurrentRoom(),this.updateCore(),this.sweepBullets(this.playerBullets,C),this.sweepBullets(this.enemyBullets,C)}}updateCurrentRoom(){let C=-1;
6381this.map.rooms.forEach((w,R)=>{const b=this.px-w.x,c=this.py-w.y;b*b+c*c<w.r*w.r&&(C=R)}),C!==-1&&C!==this.currentRoom&&(this.currentRoom=C,this.rebuildProgress())}chainNodeOf(C){if(C<0||C<=this.map.bossRoom)return C;for(const w of this.map.corridors){if(w.a===C)return w.b;if(w.b===C)return w.a}return C}progressState(){const C=this.map.chainIdx;return{total:C.length,current:this.chainNodeOf(this.currentRoom),room:this.currentRoom,lit:this.visitedRooms.filter(w=>C.includes(w)).sort((w,R)=>w-R),markerPulse:!!this.progMarker}}rebuildProgress(){var r;(r=this.progC)==null||r.destroy(!0),this.progMarker=void 0;const C=this.map.chainIdx.map(e=>this.map.rooms[e]),w=ut.hud.prog,R=st.Display.Color.HexStringToColor(Q.color.textWarm).color,b=st.Display.Color.HexStringToColor(Q.color.textDim).color,c=(C.length-1)*w.gap,x=St/2-c/2,t=bt-w.yOff,o=this.add.container(0,0).setDepth(Dt).setScrollFactor(0),p=this.add.graphics();p.lineStyle(2,b,.45);for(let e=0;e+1<C.length;e++)p.lineBetween(x+e*w.gap,t,x+(e+1)*w.gap,t);o.add(p),C.forEach((e,s)=>{const h=this.visitedRooms.includes(s),i=x+s*w.gap;if(e.kind==="boss")o.add(this.add.image(i,t,"l4_prog_boss").setAlpha(h?1:.28));else{const l=this.add.graphics();l.fillStyle(h?R:b,h?1:.35).fillCircle(0,0,w.dotR),l.x=i,l.y=t,o.add(l)}});const a=this.chainNodeOf(this.currentRoom),n=a>=0&&a<=this.map.bossRoom?a:0;this.progMarker=this.add.image(x+n*w.gap,t,"l4_prog_ring").setDisplaySize(14,14),this.tweens.add({targets:this.progMarker,scale:1.6,alpha:.55,duration:600,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),o.add(this.progMarker),this.progC=o}mapTransform(){const C=ut.hud.mapView,{world:w}=this.map,R=Math.min(C.maxW/w.w,C.maxH/w.h);return{s:R,ox:St/2-w.w*R/2,oy:bt/2-w.h*R/2}}rebuildMap(){var L,O;(L=this.mapC)==null||L.destroy(!0),(O=this.mapDim)==null||O.destroy();const C={holes:this.exploredCells.size,pickupMarks:0,enemyMarks:0,bossShown:!1,fogOpaque:!1},{world:w,rooms:R,corridors:b}=this.map,{s:c,ox:x,oy:t}=this.mapTransform(),o=Math.max(1,Math.round(w.w*c)),p=Math.max(1,Math.round(w.h*c)),a=st.Display.Color.HexStringToColor(Q.color.danger).color,n=st.Display.Color.HexStringToColor(Q.color.success).color,r=st.Display.Color.HexStringToColor(Q.color.textWarm).color,e=this.add.rectangle(0,0,St,bt,659737,.62).setOrigin(0).setDepth(Dt+1).setScrollFactor(0);if(this.mapDim=e,!this.mapBaseRT){this.mapBaseRT=this.add.renderTexture(x,t,o,p).setOrigin(0).setScrollFactor(0).setDepth(Dt+2);const G=this.add.graphics(),z=this.organCfg.palette;G.fillStyle(z.tissue,1).fillRect(0,0,o,p);const Y=this.fleshMap();for(const X of b){const I=Math.max(2,X.w*c);G.lineStyle(I,z.corridor,1),this.strokePolyline(G,X.points.map(U=>({x:U.x*c,y:U.y*c}))),G.fillStyle(z.corridor,1);for(const U of X.points)G.fillCircle(U.x*c,U.y*c,I/2)}for(const X of R){const I=Math.max(3,X.r*c);G.fillStyle(Y[X.kind],1).fillCircle(X.x*c,X.y*c,I),G.lineStyle(2,10242646,.9).strokeCircle(X.x*c,X.y*c,I)}this.mapBaseRT.draw(G,0,0),G.destroy()}this.mapBaseRT.setVisible(!0),this.mapMaskRT||(this.mapMaskRT=this.add.renderTexture(x,t,o,p).setOrigin(0).setScrollFactor(0).setDepth(Dt+2)),this.mapMaskRT.setVisible(!0),this.mapMaskRT.fill(0,1),C.fogOpaque=!0;const s=ut.map.cell,h=Math.ceil(w.w/s),i=ut.map.visionR*c,l=this.add.graphics();l.fillStyle(16777215,1).fillCircle(0,0,i);for(const G of this.exploredCells){const z=G%h*s+s/2,Y=Math.floor(G/h)*s+s/2;this.mapMaskRT.erase(l,z*c,Y*c)}l.destroy();const u=this.add.container(0,0).setDepth(Dt+2).setScrollFactor(0),d=14,f=x-d,v=t-d,m=w.w*c+d*2,y=w.h*c+d*2,g=this.add.graphics(),T=Q.size.border;g.fillStyle(Q.color.border,1),g.fillRect(f,v,m,T),g.fillRect(f,v+y-T,m,T),g.fillRect(f,v,T,y),g.fillRect(f+m-T,v,T,y),g.fillStyle(Q.color.edge,1).fillRect(f+T,v+T,m-T*2,2),g.fillStyle(Q.color.corner,1),g.fillRect(f+T,v+T,3,3),g.fillRect(f+m-T-3,v+T,3,3),g.fillRect(f+T,v+y-T-3,3,3),g.fillRect(f+m-T-3,v+y-T-3,3,3),u.add(g);const S=this.add.graphics();u.add(S);const E=G=>x+G*c,M=G=>t+G*c;if(this.currentRoom>=0){const G=R[this.currentRoom],z=Math.max(3,G.r*c),Y=this.add.image(E(G.x),M(G.y),"l4_prog_ring").setTint(r);Y.setDisplaySize(z*2,z*2),this.tweens.add({targets:Y,alpha:.35,duration:550,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),u.add(Y)}const F=(G,z,Y)=>{if(this.isExplored(G,z))if(Y==="enemy")S.fillStyle(a,1).fillCircle(E(G),M(z),3.5),C.enemyMarks++;else{const X=Y==="heart"?"l4_heart":Y==="org"?"l4_organelle":"l4_frag";
6381u.add(this.add.image(E(G),M(z),X).setDisplaySize(10,10)),C.pickupMarks++}};for(const G of this.heartPickups)G.obj.active&&F(G.x,G.y,"heart");for(const G of this.organellePickups)G.obj.active&&F(G.x,G.y,"org");for(const G of this.fragPickups)G.obj.active&&F(G.x,G.y,"frag");for(const G of this.enemies)G.alive&&F(G.x,G.y,"enemy");const A=R[this.map.bossRoom];this.boss.alive&&this.isExplored(A.x,A.y)&&(C.bossShown=!0,u.add(this.add.image(E(A.x),M(A.y),"l4_prog_boss").setScale(1.6)));const P=this.add.image(E(this.px),M(this.py),"l4_prog_ring").setTint(n).setDisplaySize(12,12);this.tweens.add({targets:P,scale:2,alpha:.5,duration:500,yoyo:!0,repeat:-1}),u.add(P),this.mapStats=C,this.mapC=u}walkable(C,w){const R=ut.player.radius;return this.validFn(C,w)&&this.validFn(C+R,w)&&this.validFn(C-R,w)&&this.validFn(C,w+R)&&this.validFn(C,w-R)}playerPoint(){return{x:this.px,y:this.py}}updateMovement(C){let w=(this.keys.d.isDown||this.cursors.right.isDown?1:0)-(this.keys.a.isDown||this.cursors.left.isDown?1:0),R=(this.keys.s.isDown||this.cursors.down.isDown?1:0)-(this.keys.w.isDown||this.cursors.up.isDown?1:0);if(w===0&&R===0)return;const b=Math.hypot(w,R),c=ut.player.moveSpeed*this.build.moveMult*this.meta.moveMult*C/1e3;w=w/b*c,R=R/b*c,this.walkable(this.px+w,this.py)&&(this.px+=w),this.walkable(this.px,this.py+R)&&(this.py+=R)}updateKnockback(C){if(this.kb.t<=0)return;const w=this.kb.x*C/1e3,R=this.kb.y*C/1e3;this.walkable(this.px+w,this.py)&&(this.px+=w),this.walkable(this.px,this.py+R)&&(this.py+=R)}updateAim(){const C=this.input.activePointer,w=this.cameras.main.getWorldPoint(C.x,C.y);this.aimAngle=Math.atan2(w.y-this.py,w.x-this.px)}updateFire(C){if(!(this.input.activePointer.leftButtonDown()||this.keys.j.isDown)||C<this.nextFireAt)return;this.nextFireAt=C+ut.fire.cdMs*this.build.fireCdMult*this.meta.fireCdMult;const b=this.aimAngle,c=this.build.secretor.double?[-5,jt.doubleOffset]:[0],x=Math.cos(b+Math.PI/2),t=Math.sin(b+Math.PI/2);for(const o of c){const p=this.playerBullets.spawn(this.px+Math.cos(b)*ut.fire.muzzle+x*o,this.py+Math.sin(b)*ut.fire.muzzle+t*o,Math.cos(b)*ut.fire.bulletSpeed,Math.sin(b)*ut.fire.bulletSpeed);p&&(p.setData("dieAt",C+ut.fire.bulletTtlMs),p.setData("pierceLeft",this.build.secretor.pierce),p.setData("hitIds",[]),p.setRotation(b+Math.PI/2))}}updateHoming(C){this.build.secretor.homing&&this.playerBullets.group.children.each(w=>{const R=w;if(!R.active)return!0;let b=null,c=jt.homingRange;for(const e of this.enemies){if(!e.alive)continue;const s=Math.hypot(e.x-R.x,e.y-R.y);s<c&&(c=s,b=e)}if(this.boss.alive&&this.boss.activated){const e=Math.hypot(this.boss.x-R.x,this.boss.y-R.y);e<c&&(c=e,b=this.boss)}if(!b)return!0;const x=R.body,t=Math.hypot(x.velocity.x,x.velocity.y),o=Math.atan2(x.velocity.y,x.velocity.x);let a=Math.atan2(b.y-R.y,b.x-R.x)-o;for(;a>Math.PI;)a-=Math.PI*2;for(;a<-Math.PI;)a+=Math.PI*2;const n=jt.homingTurn*C/1e3,r=o+st.Math.Clamp(a,-n,n);return x.setVelocity(Math.cos(r)*t,Math.sin(r)*t),!0})}sweepBullets(C,w){const R=this.map.world.w,b=this.map.world.h;C.group.children.each(c=>{const x=c;if(!x.active)return!0;const t=x.getData("dieAt")??0;return(w>=t||x.x<0||x.x>R||x.y<0||x.y>b||!this.validFn(x.x,x.y))&&C.recycle(x),!0})}fireEnemyBullet(C,w,R,b,c,x="l4_antibody"){const t=this.maxMode?ut.maxDiff.enemyBulletSpdMult:1,o=this.enemyBullets.spawn(C,w,R*t,b*t);o&&(o.setTexture(x),o.setRotation(Math.atan2(b,R)),o.setData("dieAt",c))}spawnEnemies(){const C=ut.enemies,w=this.organCfg.enemyTint;this.map.rooms.forEach((R,b)=>{R.enemySpawns.forEach((c,x)=>{this.enemies.push(new Li(this,`${b}:${x}`,c.type,c.x,c.y,C[c.type],this.validFn,(t,o,p,a,n)=>this.fireEnemyBullet(t,o,p,a,n),w))})})}spawnBoss(){const C=this.map.rooms[this.map.bossRoom],w=this.organCfg;this.boss=new lo(this,C.x,C.y,{...ut.boss,hp:w.bossHp,tex:w.bossTex,particle:w.bossParticle,moves:w.bossMoves,summonKind:w.summonKind,anim:w.bossAnim},this.validFn,(R,b,c,x,t)=>this.fireEnemyBullet(R,b,c,x,t,w.bulletTex),(R,b,c)=>this.summonEnemies(R,b,c),()=>this.enemies.filter(R=>R.alive&&R.id.startsWith("summon:")).length,()=>this.onBossPhase2(),(R,b)=>
6381this.onBossDeath(R,b),()=>this.playerInBossRoom())}summonEnemies(C,w,R){const b=this.organCfg.summonKind,c=ut.enemies[b],x=this.enemies.filter(o=>o.alive&&o.id.startsWith("summon:")).length,t=Math.min(R,ut.boss.summonMaxAlive-x);for(let o=0;o<t;o++){const p=Math.random()*Math.PI*2,a=C+Math.cos(p)*90,n=w+Math.sin(p)*90;this.enemies.push(new Li(this,`summon:${this.summonSeq++}`,b,a,n,c,this.validFn,(e,s,h,i,l)=>this.fireEnemyBullet(e,s,h,i,l),this.organCfg.enemyTint));const r=this.add.image(a,n,"l4_particle").setDepth(16).setTint(c.particle).setScale(1.6);this.tweens.add({targets:r,alpha:0,scale:.4,duration:420,onComplete:()=>r.destroy()})}}inSeal(C,w){for(const R of this.sealedSegments){const b=C-R.x,c=w-R.y;if(b*b+c*c<R.r*R.r)return!0}return!1}bossMouths(){const C=this.map.bossRoom,w=this.map.rooms[C],R=[];for(const b of this.map.corridors){if(b.a!==C&&b.b!==C)continue;const c=b.a===C?b.points:[...b.points].reverse();let x=0,t=null;for(let o=0;o+1<c.length&&!t;o++){const p=c[o],a=c[o+1],n=Math.hypot(a.x-p.x,a.y-p.y)||1;if(x+n>=w.r){const r=(w.r-x)/n;t={x:p.x+(a.x-p.x)*r,y:p.y+(a.y-p.y)*r,ang:Math.atan2(a.y-p.y,a.x-p.x)+Math.PI/2}}x+=n}t&&R.push({x:t.x,y:t.y,r:b.w/2+ut.boss.doorPad,ang:t.ang})}return R}sealBossRoom(){if(!(this.sealedSegments.length>0))for(const C of this.bossMouths()){this.sealedSegments.push({x:C.x,y:C.y,r:C.r});const w=this.add.image(C.x,C.y,"l4_door").setDepth(14).setRotation(C.ang),R=C.r*2/w.width,b=R*ut.boss.doorThick;w.setScale(0),this.tweens.add({targets:w,scaleX:R,scaleY:b,duration:ut.boss.doorGrowMs,ease:"Back.out"}),this.bossDoors.push(w)}}unsealBossRoom(){this.sealedSegments=[];for(const C of this.bossDoors)this.tweens.add({targets:C,scaleX:0,scaleY:0,alpha:.15,duration:ut.boss.doorOpenMs,ease:"Back.in",onComplete:()=>C.destroy()});this.bossDoors=[]}playerInBossRoom(){const C=this.map.rooms[this.map.bossRoom];return Math.hypot(this.px-C.x,this.py-C.y)<C.r-ut.boss.activateInset}updateBoss(C,w){if(this.boss.alive){if(!this.boss.activated){this.playerInBossRoom()&&(this.boss.activate(C),this.bossBar.setVisible(!0),this.sealBossRoom());return}this.sealBossRoom(),this.boss.update(C,w,this.playerPoint()),this.boss.tick(C),this.bossBar.update(C,w,Math.max(0,this.boss.hp),ut.boss.hp,this.boss.phase,2,this.boss.moveName)}}onBossPhase2(){this.enemyBullets.clear(),this.cameras.main.shake(320,.008),this.bossBar.phasePulse();const C=this.add.rectangle(0,0,St,bt,16731486,.4).setOrigin(0).setDepth(Dt+2).setScrollFactor(0);this.tweens.add({targets:C,alpha:0,duration:700,onComplete:()=>C.destroy()}),this.toast("树突状细胞成熟暴走 · 招式提速 · 弹幕已清空")}onBossDeath(C,w){this.kills++,this.bossBar.setVisible(!1),this.unsealBossRoom();const R=this.map.rooms[this.map.bossRoom],b=this.add.image(R.x,R.y,"l4_organelle").setDepth(12);this.tweens.add({targets:b,scaleX:1.25,scaleY:1.25,alpha:.75,duration:700,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.organellePickups.push({key:"boss:drop",x:R.x,y:R.y,obj:b}),this.dropFrags(C,w,ut.frag.boss),this.time.delayedCall(1e3,()=>this.spawnCore(R.x,R.y-120)),this.saveNow()}spawnCore(C,w){const R=this.add.image(C,w,"l4_core").setDepth(12);this.tweens.add({targets:R,angle:360,duration:6e3,repeat:-1}),this.tweens.add({targets:R,scale:1.15,duration:800,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.hostCore={x:C,y:w,obj:R},this.toast("宿主核心已暴露 · 走进去,完成感染")}updateCore(){!this.hostCore||this.cleared||Math.hypot(this.hostCore.x-this.px,this.hostCore.y-this.py)<ut.boss.coreEnterRange&&this.clearRun()}clearRun(){this.cleared=!0,this.playerBullets.clear(),this.enemyBullets.clear(),this.player.setAlpha(1),this.tweens.add({targets:this.player,alpha:0,scaleX:1.6,scaleY:1.6,duration:700}),this.tweens.add({targets:this.hostCore.obj,scale:2.4,alpha:0,duration:800}),this.settleFrags(),this.organProgress[this.organ]=!0,this.writeL4(void 0),this.organ==="lymph"?this.time.delayedCall(800,()=>this.showClearPanel()):this.time.delayedCall(800,()=>this.showOrganClear())}showOrganClear(){this.settleFrags();const C=co(this.organ),w=520,R=440,b=(St-w)/2,c=(bt-R)/2,x=this.add.container(0,0).setDepth(Dt+1).setScrollFactor(0);x.add(this.add.rectangle(0,0,St,bt,659737,.62).setOrigin(0));const t=this.add.graphics();Pt(t,b,c,w,R),x.add(t),x.add(this.add.text(St/2,c+34,`— ${this.organCfg.name} 已被感染!—`,{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.success,fontStyle:"bold"}).setOrigin(.5));const o=this.time.now-this.runStartAt,p=Math.floor(o/6e4),a=String(Math.floor(o%6e4/1e3)).padStart(2,"0"),n=Be.filter(s=>(this.organelles[s]??0)>0),r=n.length?n.map(s=>`${me[s].name}Lv${this.organelles[s]}`).join(" · "):"无";[`击杀免疫细胞  ${this.kills}`,`存活时间      ${p}:${a}`,`到达腔室      ${this.visitedRooms.length} / ${this.map.rooms.length}`,`本局质粒      +${this.frags}`,`细胞器        ${r}`].forEach((s,h)=>{x.add(this.add.text(St/2,c+92+h*40,s,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(.5))}),x.add(this.add.text(St/2,c+R-38,C?`感染扩散 · 「${Qt[C].name}」已解锁      [Enter] 回人体总览`:"[Enter] 回人体总览",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5)),this.organClearPanel=x}settleFrags(){this.fragsSettled||(this.fragsSettled=!0,yr({frags:this.frags,rooms:this.visitedRooms.length,cleared:this.cleared}))}showClearPanel(){this.settleFrags();const C=520,w=440,R=(St-C)/2,b=(bt-w)/2,c=this.add.container(0,0).setDepth(Dt+1).setScrollFactor(0);c.add(this.add.rectangle(0,0,St,bt,659737,.62).setOrigin(0));const x=this.add.graphics();Pt(x,R,b,C,w),c.add(x),c.add(this.add.text(St/2,b+34,"— 宿主已被感染!—",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.success,fontStyle:"bold"}).setOrigin(.5));const t=this.time.now-this.runStartAt,o=Math.floor(t/6e4),p=String(Math.floor(t%6e4/1e3)).padStart(2,"0"),a=Be.filter(e=>(this.organelles[e]??0)>0),n=a.length?a.map(e=>`${me[e].name}Lv${this.organelles[e]}`).join(" · "):"无";[`击杀免疫细胞  ${this.kills}`,`存活时间      ${o}:${p}`,`到达腔室      ${this.visitedRooms.length} / ${this.map.rooms.length}`,`本局质粒      +${this.frags}`,`细胞器        ${n}`].forEach((e,s)=>{c.add(this.add.text(St/2,b+92+s*40,e,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(.5))}),c.add(this.add.text(St/2,b+w-38,"入侵完成 · 这具身体归你了      [M] 回主菜单",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5)),this.clearPanel=c}updateBulletHits(){const C=ut.combat.bulletRadius;this.playerBullets.group.children.each(w=>{const R=w;if(!R.active)return!0;const b=R.getData("hitIds")??[];for(const c of this.enemies){if(!c.alive||b.includes(c.id)||Math.hypot(c.x-R.x,c.y-R.y)>c.radius+C)continue;b.push(c.id),R.setData("hitIds",b),c.hit(ut.combat.bulletDmg*this.build.dmgMult)&&this.onEnemyKilled(c);const t=R.getData("pierceLeft")??0;return t>0?R.setData("pierceLeft",t-1):this.playerBullets.recycle(R),!0}if(this.boss.alive&&!b.includes("boss")&&Math.hypot(this.boss.x-R.x,this.boss.y-R.y)<=this.boss.radius+C){b.push("boss"),R.setData("hitIds",b),this.boss.hit(ut.combat.bulletDmg*this.build.dmgMult);const c=R.getData("pierceLeft")??0;c>0?R.setData("pierceLeft",c-1):this.playerBullets.recycle(R)}return!0}),this.enemyBullets.group.children.each(w=>{const R=w;return R.active&&Math.hypot(R.x-this.px,R.y-this.py)<ut.player.radiu
6381s+C&&(this.enemyBullets.recycle(R),this.hurtAt(R.x,R.y)),!0})}updateTouchDamage(){for(const C of this.enemies)C.alive&&Math.hypot(C.x-this.px,C.y-this.py)<C.radius+ut.player.radius&&this.hurtAt(C.x,C.y,C);this.boss.alive&&this.boss.activated&&Math.hypot(this.boss.x-this.px,this.boss.y-this.py)<this.boss.radius+ut.player.radius&&this.hurtAt(this.boss.x,this.boss.y,this.boss)}onEnemyKilled(C){this.kills++,C.id.startsWith("summon:")||this.killedEnemies.push(C.id),this.dropFrags(C.x,C.y,ut.frag[C.kind]),Math.random()<this.build.killHealChance&&this.spawnMiniHeart(C.x,C.y)}dropFrags(C,w,R){for(let b=0;b<R;b++){const c=Math.random()*Math.PI*2,x=ut.frag.hopDist+Math.random()*ut.frag.hopSpread,t=C+Math.cos(c)*x,o=w+Math.sin(c)*x,p=this.add.image(C,w,"l4_frag").setDepth(12);this.tweens.chain({targets:p,delay:b*40,tweens:[{x:t,y:o-24,duration:ut.frag.hopMs/2,ease:"Sine.out"},{y:o,duration:ut.frag.hopMs/2,ease:"Sine.in"}]}),this.fragPickups.push({key:`frag:${this.miniSeq++}`,x:t,y:o,obj:p})}}hurtAt(C,w,R){if(this.dead||this.god||this.invulnT>0)return;this.hearts--,this.updateHeartsHud(),this.invulnT=this.invulnMsEff;let b=this.px-C,c=this.py-w,x=Math.hypot(b,c);x<1&&(b=1,c=0,x=1),this.kb={x:b/x*ut.combat.kbSpeed,y:c/x*ut.combat.kbSpeed,t:ut.combat.kbMs},this.cameras.main.shake(90,.004),R&&R.alive&&this.build.thorns.dmg>0&&(R.kbX=-b/x*this.build.thorns.knock,R.kbY=-c/x*this.build.thorns.knock,R.kbT=this.build.thorns.kbMs,R.hit(this.build.thorns.dmg)&&this.onAttackerKilled(R)),this.hearts<=0&&this.die()}onAttackerKilled(C){C instanceof Li&&this.onEnemyKilled(C)}die(){this.dead=!0,this.playerBullets.clear(),this.enemyBullets.clear(),this.bossBar.setVisible(!1),this.player.setAlpha(1),this.tweens.add({targets:this.player,alpha:0,scaleX:.2,scaleY:.2,angle:120,duration:700,ease:"Back.in"}),this.settleFrags(),this.rollNewRun(!1),this.time.delayedCall(750,()=>this.showDeathPanel())}showDeathPanel(){this.settleFrags();const C=520,w=440,R=(St-C)/2,b=(bt-w)/2,c=this.add.container(0,0).setDepth(Dt+1).setScrollFactor(0);c.add(this.add.rectangle(0,0,St,bt,659737,.6).setOrigin(0));const x=this.add.graphics();Pt(x,R,b,C,w),c.add(x),c.add(this.add.text(St/2,b+34,"— 细胞凋亡 · 感染失败 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.danger,fontStyle:"bold"}).setOrigin(.5));const t=this.time.now-this.runStartAt,o=Math.floor(t/6e4),p=String(Math.floor(t%6e4/1e3)).padStart(2,"0"),a=Be.filter(e=>(this.organelles[e]??0)>0),n=a.length?a.map(e=>`${me[e].name}Lv${this.organelles[e]}`).join(" · "):"无";[`击杀免疫细胞  ${this.kills}`,`存活时间      ${o}:${p}`,`到达腔室      ${this.visitedRooms.length} / ${this.map.rooms.length}`,`本局质粒      +${this.frags}`,`细胞器        ${n}`].forEach((e,s)=>{c.add(this.add.text(St/2,b+92+s*40,e,{fontFamily:Q.font,fontSize:Q.size.md,color:Q.color.textMain}).setOrigin(.5))}),c.add(this.add.text(St/2,b+w-38,`[Enter] 重打「${this.organCfg.name}」(新宿主)   [M] 回主菜单`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5)),this.deathPanel=c}newRun(){const C=new URL(location.href);C.searchParams.has("seed")&&(C.searchParams.delete("seed"),history.replaceState(null,"",C)),this.pendingNewSeed!==void 0&&(this.nextRunSeed=this.pendingNewSeed),this.scene.restart()}spawnHearts(){this.map.rooms.forEach((C,w)=>{C.pickups.forEach((R,b)=>{if(R.kind!=="heart")return;const c=this.add.image(R.x,R.y,"l4_heart").setDepth(12);this.tweens.add({targets:c,y:R.y-6,duration:900,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.heartPickups.push({key:`${w}:${b}`,x:R.x,y:R.y,obj:c})})})}spawnOrganelles(){this.map.rooms.forEach((C,w)=>{C.pickups.forEach((R,b)=>{if(R.kind!=="organelle")return;const c=this.add.image(R.x,R.y,"l4_organelle").setDepth(12);this.tweens.add({targets:c,scaleX:1.25,scaleY:1.25,alpha:.75,duration:700,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.organellePickups.push({key:`${w}:${b}`,x:R.x,y:R.y,obj:c})})})}spawnMiniHeart(C,w){const R=this.add.image(C,w,"l4_heart").setDepth(12).setScale(.6).setAlpha(.95);this.tweens.add({targets:R,y:w-5,duration:600,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.heartPickups.push({key:`mini:${this.miniSeq++}`,x:C,y:w,obj:R,mini:!0,dieAt:this.time.now+jt.miniHealTtlMs})}updatePickups(C){const w=ut.pickup.range*this.build.pickupMult;for(const R of this.heartPickups)if(R.obj.active){if(R.dieAt!==void 0&&C>R.dieAt){R.obj.destroy();continue}Math.hypot(R.x-this.px,R.y-this.py)>w||this.hearts>=this.maxHeartsEff||(this.hearts++,this.updateHeartsHud(),R.mini||this.takenPickups.push(R.key),R.obj.destroy())}for(const R of this.organellePickups)if(R.obj.active&&!(Math.hypot(R.x-this.px,R.y-this.py)>w)){this.takeOrganellePoint(R);break}for(const R of this.fragPickups)R.obj.active&&(Math.hypot(R.x-this.px,R.y-this.py)>w||(this.frags++,this.updateFragHud(),R.obj.destroy()))}takeOrganellePoint(C){this.takenPickups.push(C.key),C.obj.destroy();for(let R=0;R<10;R++){const b=R/10*Math.PI*2,c=this.add.image(C.x,C.y,"l4_particle").setDepth(16).setTint(8115920);this.tweens.add({targets:c,x:C.x+Math.cos(b)*(30+Math.random()*26),y:C.y+Math.sin(b)*(30+Math.random()*26),alpha:0,duration:420,onComplete:()=>c.destroy()})}const w=uo(this.organelles,3);if(w.length===0){this.hearts<this.maxHeartsEff&&(this.hearts++,this.updateHeartsHud()),this.toast("细胞器已全部满级 · 转化为 1 心");return}this.physics.world.pause(),this.graftMenu.open(w.map(R=>({id:R,level:(this.organelles[R]??0)+1})))}
6381onGraftPicked(C){this.organelles[C]=(this.organelles[C]??0)+1;const w=this.maxHeartsEff;this.build=qe(this.organelles),this.refreshPlayerEvolution(),this.maxHeartsEff>w&&(this.syncHeartsHud(),this.hearts=Math.min(this.hearts+1,this.maxHeartsEff)),this.updateHeartsHud(),this.refreshOrgHud(),this.physics.world.resume(),this.saveNow()}toast(C){const w=this.add.text(St/2,bt-60,C,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5).setDepth(Dt).setScrollFactor(0);this.tweens.add({targets:w,alpha:0,delay:1600,duration:600,onComplete:()=>w.destroy()})}updateVisited(){this.map.rooms.forEach((C,w)=>{if(this.visitedRooms.includes(w))return;const R=this.px-C.x,b=this.py-C.y;R*R+b*b<C.r*C.r&&this.visitedRooms.push(w)})}cellIdx(C,w){const R=ut.map.cell,b=Math.ceil(this.map.world.w/R);return Math.floor(w/R)*b+Math.floor(C/R)}isExplored(C,w){return this.exploredCells.has(this.cellIdx(C,w))}exploredAround(C,w){const R=ut.map.cell,b=ut.map.visionR,c=Math.ceil(this.map.world.w/R),x=Math.ceil(this.map.world.h/R),t=Math.floor(C/R),o=Math.floor(w/R),p=Math.ceil(b/R),a=[];for(let n=-p;n<=p;n++)for(let r=-p;r<=p;r++){const e=t+n,s=o+r;if(e<0||s<0||e>=c||s>=x)continue;const h=e*R+R/2,i=s*R+R/2;(h-C)**2+(i-w)**2<=b*b&&a.push(s*c+e)}return a}updateExplored(){for(const C of this.exploredAround(this.px,this.py))this.exploredCells.has(C)||(this.exploredCells.add(C),this.stampFogHole(C));this.fogStats.holes=this.exploredCells.size}initFog(){const C=ut.fog.texel,w=Math.max(1,Math.ceil(this.map.world.w/C)),R=Math.max(1,Math.ceil(this.map.world.h/C));this.fogMask=this.add.renderTexture(0,0,w,R).setOrigin(0).setDepth(13).setScale(C),this.fogVeil=this.add.renderTexture(0,0,w,R).setOrigin(0).setDepth(14).setScale(C),this.fogBrush=this.make.image({key:"l4_fogbrush",add:!1}),this.fogMask.fill(0,1);for(const b of this.exploredCells)this.stampFogHole(b);this.fogStats={holes:this.exploredCells.size,veilOn:!0},this.updateFogVeil()}stampFogHole(C){if(!this.fogMask||!this.fogBrush)return;const w=ut.map.cell,R=ut.fog.texel,b=Math.ceil(this.map.world.w/w),c=(C%b*w+w/2)/R,x=(Math.floor(C/b)*w+w/2)/R;this.fogBrush.setScale(ut.map.visionR*2/R/this.fogBrush.width),this.fogMask.erase(this.fogBrush,c,x)}updateFogVeil(){if(!this.fogVeil||!this.fogBrush)return;const C=ut.fog.texel;this.fogVeil.clear(),this.fogVeil.fill(0,ut.fog.veilAlpha),this.fogBrush.setScale(ut.fog.veilR*2/C/this.fogBrush.width),this.fogVeil.erase(this.fogBrush,this.px/C,this.py/C)}writeL4(C){_t.write({v:2,savedAt:Date.now(),elapsed:this.time.now,deaths:0,cleared:!1,laserTipShown:!1,level:4,level4:{genV:2,organProgress:{...this.organProgress},organelles:{...this.organelles},midrun:C}})}saveNow(){!this.map||this.dead||this.cleared||(this.lastSave=this.time.now,this.writeL4({organ:this.organ,seed:this.runSeed,px:Math.round(this.px),py:Math.round(this.py),hearts:this.hearts,frags:this.frags,organelles:{...this.organelles},kills:this.kills,killedEnemies:[...this.killedEnemies],takenPickups:[...this.takenPickups],visitedRooms:[...this.visitedRooms],explored:[...this.exploredCells],bossHp:this.boss.alive?Math.max(0,this.boss.hp):0,bossPhase:this.boss.phase,cleared:this.cleared}))}rollNewRun(C){const w=Math.floor(Math.random()*2147483648)>>>0;this.pendingNewSeed=w;const R=Pn(w,this.organCfg.gen).playerStart;this.writeL4({organ:this.organ,seed:w,px:R.x,py:R.y,hearts:this.maxHeartsEff,frags:0,organelles:{...this.organelles},kills:0,killedEnemies:[],takenPickups:[],visitedRooms:[0],explored:[],bossHp:this.organCfg.bossHp,bossPhase:1,cleared:C})}applyLevel4Save(C){this.px=C.px,this.py=C.py,this.player.setPosition(this.px,this.py),this.cameras.main.centerOn(this.px,this.py),this.organelles={...C.organelles},this.build=qe(this.organelles),this.refreshPlayerEvolution(),this.hearts=Math.min(Math.max(1,C.hearts),this.maxHeartsEff),this.frags=C.frags,this.kills=C.kills,this.killedEnemies=[...C.killedEnemies],this.takenPickups=[...C.takenPickups],this.visitedRooms=[...C.visitedRooms],this.exploredCells=new Set(C.explored??[]);const w=new Set(C.killedEnemies);for(const b of this.enemies)w.has(b.id)&&(b.alive=!1,b.sprite.setVisible(!1));const R=new Set(C.takenPickups);for(const b of this.heartPickups)R.has(b.key)&&b.obj.destroy();for(const b of this.organellePickups)R.has(b.key)&&b.obj.destroy();if(C.bossHp<=0){this.boss.alive=!1,this.boss.state="dead",this.boss.sprite.setVisible(!1);const b=this.map.rooms[this.map.bossRoom];if(!R.has("boss:drop")){const c=this.add.image(b.x,b.y,"l4_organelle").setDepth(12);this.tweens.add({targets:c,scaleX:1.25,scaleY:1.25,alpha:.75,duration:700,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.organellePickups.push({key:"boss:drop",x:b.x,y:b.y,obj:c})}this.spawnCore(b.x,b.y-120)}else this.boss.hp=C.bossHp,this.boss.phase=C.bossPhase===2?2:1;this.syncHeartsHud(),this.updateHeartsHud(),this.updateFragHud(),this.refreshOrgHud()}shade(C,w){const R=st.Math.Clamp(Math.round((C>>16&255)*w),0,255),b=st.Math.Clamp(Math.round((C>>8&255)*w),0,255),c=st.Math.Clamp(Math.round((C&255)*w),0,255);return R<<16|b<<8|c}fleshMap(){const C=this.organCfg.palette.flesh;return{entry:C,common:C,boss:this.shade(C,.82),bonus:this.shade(C,1.1)}}buildWorld(){const{world:C,rooms:w,corridors:R}=this.map,b=this.organCfg.palette,c=this.add.graphics().setDepth(vo);c.fillStyle(b.tissue,1).fillRect(0,0,C.w,C.h);const x=Vn(this.runSeed^2654435769),t=this.organDecorMult(),o=Math.round(ut.decor.veins*t.veins);c.lineStyle(3,b.vein,.5);for(let n=0;n<o;n++){let r=x()*C.w,e=x()*C.h;c.beginPath(),c.moveTo(r,e);let s=x()*Math.PI*2;for(let h=0;h<ut.decor.veinSegs;h++){s+=(x()-.5)*1.2;const i=24+x()*60;r+=Math.cos(s)*i,e+=Math.sin(s)*i,c.lineTo(r,e)}c.strokePath()}for(const n of R)c.lineStyle(n.w+18,b.rim,1),this.strokePolyline(c,n.points);for(const n of R){c.lineStyle(n.w,b.corridor,1),this.strokePolyline(c,n.points),c.fillStyle(b.corridor,1);for(const r of n.points)c.fillCircle(r.x,r.y,n.w/2)}const p=this.fleshMap();for(const n of w)c.fillStyle(p[n.kind],1).fillCircle(n.x,n.y,n.r),c.lineStyle(14,b.rim,1).strokeCircle(n.x,n.y,n.r-2),c.lineStyle(3,10242646,.9).strokeCircle(n.x,n.y,n.r-12);this.drawOrganFeatures(c,x);
6381const a=Math.round(ut.decor.specks*t.specks);for(let n=0;n<a;n++){const r=x()*C.w,e=x()*C.h;this.validFn(r,e)&&c.fillStyle(14256788,.1+x()*.1).fillCircle(r,e,2+x()*5)}}organDecorMult(){switch(this.organ){case"mouth":return{veins:1,specks:1};case"stomach":return{veins:1.1,specks:.75};case"gut":return{veins:1.25,specks:.9};case"blood":return{veins:.85,specks:1.35};case"lymph":return{veins:1.15,specks:1.1};default:return{veins:1,specks:1}}}drawOrganFeatures(C,w){const{rooms:R,corridors:b}=this.map,c=R.filter(x=>x.kind!=="bonus");switch(this.organ){case"stomach":{for(let x=0;x<50;x++){const t=c[Math.floor(w()*c.length)],o=w()*Math.PI*2,p=w()*(t.r*.75),a=t.x+Math.cos(o)*p,n=t.y+Math.sin(o)*p;this.validFn(a,n)&&C.fillStyle(13164640,.12+w()*.12).fillCircle(a,n,4+w()*10)}break}case"blood":{for(let x=0;x<80;x++){const t=w()*this.map.world.w,o=w()*this.map.world.h;if(!this.validFn(t,o))continue;const p=6+w()*8,a=3+w()*5;C.fillStyle(13647936,.25+w()*.2).fillEllipse(t,o,p*2,a*2),C.fillStyle(8396832,.35).fillEllipse(t,o,p*1.2,a*.7)}break}case"gut":{for(const x of c){const t=Math.max(3,Math.floor(x.r/14));for(let o=0;o<t;o++){const p=x.x-x.r*.6+(o+.5)/t*(x.r*1.2),a=x.y-Math.sqrt(Math.max(0,x.r*x.r-(p-x.x)**2))*.65,n=x.y+Math.sqrt(Math.max(0,x.r*x.r-(p-x.x)**2))*.65;n>a&&(C.lineStyle(2+w()*2,4855856,.35+w()*.15),C.lineBetween(p,a,p+(w()-.5)*6,n))}}break}case"mouth":{for(let x=0;x<45;x++){const t=w()*this.map.world.w,o=w()*this.map.world.h;if(!this.validFn(t,o))continue;const p=3+w()*5;C.fillStyle(15788232,.18+w()*.15),C.fillCircle(t,o,p),C.fillTriangle(t,o-p*.5,t-p*.5,o+p,t+p*.5,o+p)}break}case"lymph":{for(let x=0;x<40;x++){const t=c[Math.floor(w()*c.length)],o=w()*Math.PI*2,p=w()*(t.r*.7),a=t.x+Math.cos(o)*p,n=t.y+Math.sin(o)*p;if(!this.validFn(a,n))continue;const r=2+Math.floor(w()*3);for(let e=0;e<r;e++)C.fillStyle(10541288,.2+w()*.15).fillCircle(a+(w()-.5)*14,n+(w()-.5)*14,2+w()*3)}break}}}strokePolyline(C,w){C.beginPath(),C.moveTo(w[0].x,w[0].y);for(let R=1;R<w.length;R++)C.lineTo(w[R].x,w[R].y);C.strokePath()}syncHeartsHud(){for(;this.heartsHud.length<this.maxHeartsEff;)this.heartsHud.push(this.add.image(0,0,"l4_heart").setDepth(Dt).setScrollFactor(0));this.layoutHud(),this.updateHeartsHud()}updateHeartsHud(){const C=this.maxHeartsEff;this.heartsHud.forEach((w,R)=>{w.setVisible(R<C),w.setAlpha(R<this.hearts?1:.22)})}updateFragHud(){var C;(C=this.fragText)==null||C.setText(String(this.frags))}refreshOrgHud(){var b;(b=this.orgHud)==null||b.destroy(!0),this.orgHud=void 0;const C=Be.filter(c=>(this.organelles[c]??0)>0);if(!C.length)return;const w=this.add.container(0,0).setDepth(Dt).setScrollFactor(0),R=mi(this);C.forEach((c,x)=>{const t=St-R-40-x*ut.hud.orgGap;w.add(this.add.image(t,34,`l4_org_${c}`)),w.add(this.add.text(t,52,`Lv${this.organelles[c]}`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textWarm}).setOrigin(.5,0))}),this.orgHud=w}layoutHud(){var w,R,b;const C=mi(this);(w=this.hudPanel)==null||w.setX(C),this.heartsHud.forEach((c,x)=>{c.setPosition(C+32+x*ut.hud.heartGap,38)}),(R=this.fragIcon)==null||R.setPosition(St-C-40,92),(b=this.fragText)==null||b.setPosition(St-C-26,92)}refreshPlayerEvolution(){this.evolutionContainer.removeAll(!0);const C=R=>this.organelles[R]??0,w=this.organCfg.playerTint;if(C("vacuole")>0&&this.evolutionContainer.add(this.add.image(0,0,"l4_part_vacuole").setAlpha(.35+C("vacuole")*.18).setTint(w)),C("flagella")>0){const R=C("flagella");for(let b=0;b<R;b++){const x=(b%2===0?1:-1)*(6+(b>>1)*4);this.evolutionContainer.add(this.add.image(-10-(b>>1)*3,x,"l4_part_flagella").setTint(w))}}if(C("mito")>0){const R=C("mito");for(let b=0;b<R;b++){const c=b/R*Math.PI*2+.3;this.evolutionContainer.add(this.add.image(Math.cos(c)*12,Math.sin(c)*12,"l4_part_mito").setTint(w))}}if(C("secretor")>0&&this.evolutionContainer.add(this.add.image(9,0,"l4_part_secretor").setTint(w)),C("spike")>0){const R=3+C("spike")*2;for(let b=0;b<R;b++){const c=b/R*Math.PI*2;this.evolutionContainer.add(this.add.image(Math.cos(c)*14,Math.sin(c)*14,"l4_part_spike").setRotation(c).setTint(w))}}C("ribo")>0&&this.evolutionContainer.add(this.add.image(0,0,"l4_part_ribo").setAlpha(.3+C("ribo")*.15).setTint(w))}makeTextures(){const C=(R,b,c,x)=>{const t=new pt(b,c,2);x(t),dt(this,R,t.cv)};if(!this.textures.exists("l4_fogbrush")){const b=document.createElement("canvas");b.width=128,b.height=128;const c=b.getContext("2d"),x=c.createRadialGradient(128/2,128/2,0,128/2,128/2,128/2);x.addColorStop(0,"rgba(255,255,255,1)"),x.addColorStop(.55,"rgba(255,255,255,1)"),x.addColorStop(1,"rgba(255,255,255,0)"),c.fillStyle=x,c.fillRect(0,0,128,128),this.textures.addCanvas("l4_fogbrush",b)}if(C("l4_cell",24,24,R=>{for(let x=0;x<8;x++){const t=x/8*Math.PI*2;R.line(12+Math.cos(t)*13.5,12+Math.sin(t)*13.5,12+Math.cos(t)*16.5,12+Math.sin(t)*16.5,"#6fae62")}R.circle(12,12,14,"#7cbf71"),R.circle(12,12,12,"#3f7a4a"),R.ellipse(12-2.5,10,4.5,4,"#e8f7b0"),R.circle(12-2.5,10,1.6,"#b8d478"),R.circle(18,17,2,"#2f5c38"),R.circle(15,5,1.6,"#2f5c38"),R.circle(5,18,1.8,"#2f5c38")}),C("l4_macro",40,40,R=>{for(let x=0;x<7;x++){const t=x/7*Math.PI*2+.4;R.circle(20+Math.cos(t)*14.5,20+Math.sin(t)*14.5,4,"#cbb87a")}R.circle(20,20,16,"#cbb87a"),R.circle(20,20,14,"#8a7a4a"),R.ellipse(16,23,5.5,3.5,"#5a4a2e"),R.circle(26,15,2,"#6a5a38"),R.circle(12,13,1.6,"#6a5a38")}),C("l4_tcell",24,24,R=>{R.circle(12,12,9,"#b48ae0"),R.circle(12,12,7.5,"#6a4a8a"),R.circle(12,12,4.5,"#3a2a52"),R.circle(12-1.5,12-1.5,1.4,"#8a6ab8")}),C("l4_plasma",32,32,R=>{R.circle(16,16,12,"#8ab8e0"),R.circle(16,16,10,"#3a5a8a"),R.circle(12,13,4.5,"#e8f0ff");for(let x=0;x<6;x++){const t=x/6*Math.PI*2;R.circle(12+Math.cos(t)*2.8,13+Math.sin(t)*2.8,.9,"#2a4a6a")}R.circle(21,21,2,"#2a4a6a")}),C("l4_boss",72,72,R=>{for(let x=0;x<7;x++){const t=x/7*Math.PI*2+.25,o=36+Math.cos(t)*30,p=36+Math.sin(t)*30,a=36+Math.cos(t)*35,n=36+Math.sin(t)*35;R.line(o,p,a,n,"#c98a9a"),R.line(a,n,a+Math.cos(t+.7)*3,n+Math.sin(t
6381+.7)*3,"#c98a9a"),R.line(a,n,a+Math.cos(t-.7)*3,n+Math.sin(t-.7)*3,"#c98a9a")}R.circle(36,36,32,"#c98a9a"),R.circle(36,36,30,"#7a3a52"),R.circle(36,36,24,"#93506a"),R.circle(36,36,17,"#5a2a3e");for(let x=0;x<5;x++){const t=x/5*Math.PI*2+.5;R.ellipse(36+Math.cos(t)*17,36+Math.sin(t)*17,5,4,"#e8b8c8")}R.circle(36,36,5,"#3a1626")}),C("l4_boss_macro",72,72,R=>{for(let x=0;x<9;x++){const t=x/9*Math.PI*2+.3;R.circle(36+Math.cos(t)*28,36+Math.sin(t)*28,7,"#cbb87a")}R.circle(36,36,30,"#cbb87a"),R.circle(36,36,27,"#8a7a4a"),R.ellipse(30,40,11,7,"#5a4a2e"),R.ellipse(48,28,7,5,"#3a2a16"),R.circle(46,48,3,"#6a5a38"),R.circle(22,24,2.6,"#6a5a38")}),C("l4_boss_mast",72,72,R=>{R.circle(36,36,31,"#b8a86a"),R.circle(36,36,28,"#6a5a8a");for(let x=0;x<16;x++){const t=x/16*Math.PI*2+.2,o=8+x%3*7;R.circle(36+Math.cos(t)*o,36+Math.sin(t)*o,2.6,"#d8e8a0")}R.circle(36,36,8,"#4a3a5e")}),C("l4_boss_killert",72,72,R=>{for(let x=0;x<8;x++){const t=x/8*Math.PI*2;R.line(36+Math.cos(t)*24,36+Math.sin(t)*24,36+Math.cos(t)*34,36+Math.sin(t)*34,"#b48ae0",2)}R.circle(36,36,27,"#b48ae0"),R.circle(36,36,24,"#6a4a8a"),R.circle(36,36,15,"#3a2a52"),R.circle(32,32,4,"#8a6ab8")}),C("l4_boss_neutro",72,72,R=>{R.circle(36,36,30,"#e8d8d0"),R.circle(36,36,27,"#b8a8b0");for(let x=0;x<4;x++){const t=x/4*Math.PI*2+.5,o=36+Math.cos(t)*10,p=36+Math.sin(t)*10;R.line(36,36,o,p,"#5e4a6a",2),R.circle(o,p,6,"#5e4a6a")}R.circle(48,50,2,"#8a7a8a"),R.circle(22,46,1.6,"#8a7a8a")}),C("l4_histamine",8,8,R=>{R.circle(4,4,3.4,"#d8e8a0"),R.circle(4,4,1.8,"#6a7a2a"),R.circle(2,2,.8,"#f0ffd0")}),C("l4_core",48,48,R=>{R.circle(24,24,20,"#e8f7b0"),R.circle(24,24,18,"#7a5a2a"),R.circle(24,24,13,"#b8953a"),R.circle(24,24,8,"#ffcf6b"),R.circle(24,24,4,"#fff6d8");for(let x=0;x<4;x++){const t=x/4*Math.PI*2+.6;R.line(24+Math.cos(t)*10,24+Math.sin(t)*10,24+Math.cos(t+.5)*17,24+Math.sin(t+.5)*17,"#e8f7b0",2)}}),C("l4_spore",8,8,R=>{R.circle(4,4,3.4,"#7bd6d0"),R.circle(4,4,1.8,"#e8fff8")}),C("l4_antibody",8,8,R=>{R.circle(4,4,3.4,"#9fd8ff"),R.circle(4,4,1.8,"#2a4a6a")}),C("l4_cytokine",8,8,R=>{R.circle(4,4,3.4,"#ff9a5c"),R.circle(4,4,1.8,"#a33d2a"),R.rect(3.8,.2,.9,1.2,"#ff9a5c"),R.rect(3.8,6.6,.9,1.2,"#ff9a5c"),R.rect(.2,3.8,1.2,.9,"#ff9a5c"),R.rect(6.6,3.8,1.2,.9,"#ff9a5c")}),C("l4_door",36,14,R=>{R.ellipse(18,7,17,6.2,"#5a1a28"),R.ellipse(18,7,15,4.8,"#7a2a3c");for(let b=0;b<8;b++){const c=6+b*3.6;R.line(c,3.2,c+1.4,10.8,"#4a1220")}R.ellipse(18,6.2,11,2.8,"#9c4054"),R.circle(9,5,1.2,"#c98a9a"),R.circle(26,8.5,1,"#c98a9a")}),C("l4_particle",2,2,R=>{R.rect(0,0,2,2,"#ffffff")}),C("l4_frag",6,6,R=>{R.circle(3,3,2.6,"#7bd6d0"),R.circle(3,3,1.2,"#e8fff8"),R.rect(2.8,0,.5,1,"#7bd6d0"),R.rect(2.8,5,.5,1,"#7bd6d0")}),C("l4_prog_boss",10,10,R=>{R.circle(5,4.5,3.6,"#e8d8d0"),R.rect(3.2,7,3.6,1.4,"#e8d8d0"),R.circle(3.6,4.4,1,"#2a0a12"),R.circle(6.4,4.4,1,"#2a0a12"),R.rect(4.6,6,.9,1.6,"#2a0a12")}),!this.textures.exists("l4_prog_ring")){const R=this.make.graphics({x:0,y:0},!1);R.lineStyle(3,16777215,1).strokeCircle(16,16,14),R.generateTexture("l4_prog_ring",32,32),R.destroy()}C("l4_organelle",12,12,R=>{R.circle(6,6,5,"#7bd6d0"),R.circle(6,6,3.4,"#2a5a5c"),R.circle(5,5,1.4,"#e8fff8")}),C("l4_part_vacuole",32,32,R=>{R.circle(16,16,15,"#7cbf71"),R.circle(16,16,12,"#3f7a4a"),R.circle(16,16,6,"#e8f7b0")}),C("l4_part_flagella",24,24,R=>{R.line(4,4,8,10,"#7cbf71",2),R.line(8,10,14,12,"#7cbf71",2),R.line(14,12,20,9,"#7cbf71",2),R.circle(20,9,1.5,"#e8f7b0")}),C("l4_part_mito",12,12,R=>{R.ellipse(6,6,5,3,"#e8f7b0"),R.ellipse(6,6,3,1.5,"#fff6d8"),R.rect(4,5,4,2,"#b8d478")}),C("l4_part_secretor",14,10,R=>{R.rect(2,2,10,6,"#6a4a8a"),R.rect(10,3,4,4,"#b48ae0"),R.rect(3,3,2,4,"#e8d8f0")}),C("l4_part_spike",8,8,R=>{R.line(4,0,4,8,"#ffffff",2),R.line(2,2,6,2,"#ffffff",2),R.line(3,6,5,6,"#ffffff",2)}),C("l4_part_ribo",32,32,R=>{R.circle(16,16,15,"#7bd6d0"),R.circle(16,16,12,"#2a5a5c");for(let b=0;b<8;b++){const c=b/8*Math.PI*2;R.circle(16+Math.cos(c)*12,16+Math.sin(c)*12,1.6,"#e8fff8")}});const w=ve([".XX.XX.","XXXXXXX","XXXXXXX",".XXXXX.","..XXX..","...X..."],4,{X:Q.color.danger});dt(this,"l4_heart",w);for(const R of Be){const b=ve([...me[R].icon],3,{"#":Q.color.textWarm,o:Q.color.success});dt(this,`l4_org_${R}`,b)}}}const _e=1280,Oi=720,di=5e3,ci={x:965,y:360,w:345,h:690},Zt={x:298,y:345,w:502,h:330},Di=46,Fn=64,mo={macro:"巨噬细胞",tcell:"T 细胞",plasma:"浆细胞"};class go extends st.Scene{constructor(){super("bodymap");H(this,"nodeStates",{});H(this,"sel",0);H(this,"diving",!1);H(this,"snapshot");H(this,"fromOrgan");H(this,"progress",{});H(this,"midrunOrgan");H(this,"selRing");H(this,"nodeCenters",[]);H(this,"hintText");H(this,"cardImage");H(this,"cardName");H(this,"cardLines",[]);H(this,"cardFlavor")}init(C){var w;this.snapshot=((w=C==null?void 0:C.snapshot)==null?void 0:w.level)===4?C.snapshot:void 0,this.fromOrgan=C==null?void 0:C.fromOrgan,this.nodeStates={},this.sel=0,this.diving=!1,this.progress={},this.midrunOrgan=void 0,this.nodeCenters=[],this.cardLines=[]}preload(){const C=(w,R)=>{this.textures.exists(w)||this.load.image(w,new URL(Object.assign({"../assets/level4/body_base.png":Ji,"../assets/level4/boss/boss_mast_cell_attack_sheet.png":Zi,"../assets/level4/boss/boss_mast_cell_attack_sheet_144.png":Qi,"../assets/level4/boss/boss_mast_cell_death_sheet.png":ji,"../assets/level4/boss/boss_mast_cell_death_sheet_144.png":$i,"../assets/level4/boss/boss_mast_cell_hurt_sheet.png":ki,"../assets/level4/boss/boss_mast_cell_hurt_sheet_144.png":qi,"../assets/level4/boss/boss_mast_cell_idle_sheet.png":_i,"../assets/level4/boss/boss_mast_cell_idle_sheet_144.png":ts,"../assets/level4/bullets/antibody_16.png":es,"../assets/level4/bullets/cytokine_16.png":is,"../assets/level4/bullets/frag_12.png":ss,"../assets/level4/bullets/heart_28x24.png":ns,"../assets/level4/bullets/histamine_16.png":rs,"../assets/level4/bullets/organelle_24.png":as,"../assets/level4/bullets/pickup_energy_enzyme.png":os,"../assets/level4/bullets/pickup_health_cell.png":hs,"../assets/level4/bullets/pickup_immune_shield.png":ls,"../assets/level4/bullets/pickup_score_antibody.png":us,"../assets/level4/bullets/projectile_allergy_spike.png":fs,"../assets/level4/bullets/projectile_histamine_orb.png":ds,"../assets/level4/bullets/projectile_plasma_needle.png":cs,"../assets/level4/bullets/projectile_toxin_drop.png":vs,"../assets/level4/bullets/spore_16.png":ps,"../assets/level4/card_blood.png":ms,"../assets/level4/card_gut.png":gs,"../assets/level4/card_lymph.png":xs,"../assets/level4/card_mouth.png":ys,"../assets/level4/card_stomach.png":Ts,"../assets/level4/cells/boss_dendritic_144.png":Ss,"../assets/level4/cells/boss_killert_144.png":Cs,"../assets/level4/cells/boss_macro_144.png":Es,"../assets/level4/cells/boss_neutro_144.png":Ms,"../assets/level4/cells/cell_48.png":As,"../assets/level4/cells/leuk_64.png":Ps,"../assets/level4/cells/macro_80.png":Rs,"../assets/level4/cells/nk_48.png":ws,"../assets/level4/node_blood.png":Fs,"../assets/level4/node_gut.png":Ls,"../assets/level4/node_lymph.png":Os,"../assets/level4/node_mouth.png":Ds,"../assets/level4/node_stomach.png":bs,"../assets/level4/tiles/terrain_tiles_64_sheet.png":Bs,"../assets/level4/tiles/tile_blood_vessel.png":Is,"../assets/level4/tiles/tile_dark_tissue.png":Gs,"../assets/level4/tiles/tile_immune_node.png":Ns,"../assets/level4/tiles/tile_intestine_fold.png":Us,"../assets/level4/tiles/tile_lymph_wall.png":zs,"../assets/level4/tiles/tile_mucus_hazard.png":Vs,"../assets/level4/tiles/tile_oral_floor.png":Xs,"../assets/level4/tiles/tile_stomach_acid.png":Ys})[`../assets/level4/${R}`],import.meta.url).href)};C("l4map_body","body_base.png");for(const w of Nt)C(`l4map_node_${w}`,`node_${w}.png`),C(`l4map_card_${w}`,`card_${w}.png`)}create(){var c,x,t;const C=((c=this.snapshot)==null?void 0:c.level4)??((x=_t.read())==null?void 0:x.level4),w=C&&C.genV===2?C:void 0;this.progress={...(w==null?void 0:w.organProgress)??{}},this.midrunOrgan=(t=w==null?void 0:w.midrun)==null?void 0:t.organ,this.drawBody(),this.drawNodes(),this.drawCard();const R=wn(this.progress);this.sel=R?Nt.indexOf(R):Nt.length-1,this.layoutSelRing(),this.refreshCard();
6381const b=this.input.keyboard;if(b.on("keydown-LEFT",()=>this.moveSel(-1)),b.on("keydown-RIGHT",()=>this.moveSel(1)),b.on("keydown-ENTER",()=>this.dive(Nt[this.sel])),b.on("keydown-ESC",()=>{this.diving||this.scene.start("menu")}),this.add.text(_e/2,30,"— 宿主全貌 · 选择入侵部位 —",{fontFamily:Q.font,fontSize:Q.size.lg,color:Q.color.textInk,fontStyle:"bold"}).setOrigin(.5).setDepth(di).setScrollFactor(0),this.hintText=this.add.text(_e/2,Oi-26,"←/→ 或鼠标选择 · Enter / 点击潜入 · Esc 主菜单",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textInkDim}).setOrigin(.5).setDepth(di).setScrollFactor(0),this.add.text(_e-24,24,`质粒 ${Ne().frag}`,{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textInk}).setOrigin(1,0).setDepth(di).setScrollFactor(0),this.fromOrgan){const o=Qt[this.fromOrgan].node;this.cameras.main.centerOn(o.x,o.y),this.cameras.main.setZoom(3),this.cameras.main.pan(_e/2,Oi/2,550,"Sine.easeInOut"),this.cameras.main.zoomTo(1,550,"Sine.easeInOut")}}drawBody(){this.add.image(ci.x,ci.y,"l4map_body").setDisplaySize(ci.w,ci.h);const C=this.add.graphics();C.lineStyle(2,Q.color.border,.35);for(let w=0;w+1<Nt.length;w++){const R=Qt[Nt[w]].node,b=Qt[Nt[w+1]].node;C.lineBetween(R.x,R.y,b.x,b.y)}}stateOf(C){if(this.progress[C])return"cleared";if(C===this.midrunOrgan)return"open";const w=wn(this.progress);return C===w?"open":"locked"}drawNodes(){for(const C of Nt){const w=Qt[C],R=this.stateOf(C);this.nodeStates[C]=R;const b=this.add.image(w.node.x,w.node.y,`l4map_node_${C}`).setDisplaySize(Di,Di);R==="locked"?b.setTint(9079434).setAlpha(.35):R==="open"&&this.tweens.add({targets:b,alpha:.55,duration:700,yoyo:!0,repeat:-1,ease:"Sine.inOut"}),this.add.text(w.node.x,w.node.y+Di/2+10,w.name+(this.midrunOrgan===C?" · 进行中":""),{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textInk}).setOrigin(.5,0).setAlpha(R==="locked"?.35:.95);const c=this.add.circle(w.node.x,w.node.y,34,16777215,0).setInteractive({useHandCursor:R!=="locked"});c.on("pointerover",()=>{this.sel=Nt.indexOf(C),this.layoutSelRing(),this.refreshCard()}),c.on("pointerdown",()=>this.dive(C)),this.nodeCenters.push({id:C,x:w.node.x,y:w.node.y})}if(!this.textures.exists("l4_bodymap_ring")){const C=this.make.graphics({x:0,y:0},!1);C.lineStyle(3,16777215,1).strokeCircle(40,40,38),C.generateTexture("l4_bodymap_ring",80,80),C.destroy()}this.selRing=this.add.image(0,0,"l4_bodymap_ring").setDisplaySize(Fn,Fn)}drawCard(){this.cardImage=this.add.image(Zt.x,Zt.y,"l4map_card_mouth").setDisplaySize(Zt.w,Zt.h);const C=Zt.w/760,w=b=>Zt.x-Zt.w/2+b*C,R=b=>Zt.y-Zt.h/2+b*C;this.cardName=this.add.text(w(310),R(85),"",{fontFamily:Q.font,fontSize:"20px",color:"#f8f0e8",fontStyle:"bold"}).setOrigin(0,.5);for(const b of[186,246,301])this.cardLines.push(this.add.text(w(540),R(b),"",{fontFamily:Q.font,fontSize:"14px",color:Q.color.textInk}).setOrigin(.5).setStroke("#f8f0e8",3));this.cardFlavor=this.add.text(Zt.x-Zt.w/2,Zt.y+Zt.h/2+18,"",{fontFamily:Q.font,fontSize:Q.size.sm,color:Q.color.textInkDim,wordWrap:{width:Zt.w}}).setOrigin(0,0)}refreshCard(){var x,t,o;const C=Nt[this.sel],w=Qt[C],R=this.stateOf(C);(x=this.cardImage)==null||x.setTexture(`l4map_card_${C}`),(t=this.cardName)==null||t.setText(`${w.name} · ${w.subtitle}`);const b=R==="cleared"?{t:"状态:已感染 ✓",c:"#2e7d32"}:R==="open"?{t:this.midrunOrgan===C?"状态:进行中 · 可继续":"状态:可入侵",c:"#b26a00"}:{t:"状态:未解锁",c:"#8a8a8a"},c=[`头目:${w.bossName}`,b.t,`守军:${w.gen.enemyTypes.map(p=>mo[p]).join(" / ")}`];this.cardLines.forEach((p,a)=>{p.setText(c[a]),a===1&&p.setColor(b.c)}),(o=this.cardFlavor)==null||o.setText(w.toast)}moveSel(C){this.sel=(this.sel+C+Nt.length)%Nt.length,this.layoutSelRing(),this.refreshCard()}layoutSelRing(){var w;const C=Qt[Nt[this.sel]];(w=this.selRing)==null||w.setPosition(C.node.x,C.node.y)}dive(C){var b;if(this.diving)return;const w=Qt[C];if(this.stateOf(C)==="locked"){const c=this.add.graphics();c.lineStyle(3,16733542,1).strokeCircle(0,0,34),c.x=w.node.x,c.y=w.node.y,this.tweens.add({targets:c,x:w.node.x+6,duration:45,yoyo:!0,repeat:5,onComplete:()=>c.destroy()}),(b=this.hintText)==null||b.setText(`「${w.name}」尚未解锁——先感染前面的部位`);return}this.diving=!0;const R=this.add.rectangle(0,0,_e,Oi,1705228,0).setOrigin(0).setDepth(di+3).setScrollFactor(0);this.tweens.add({targets:R,alpha:1,duration:660,ease:"Sine.inOut"}),this.cameras.main.pan(w.node.x,w.node.y,650,"Sine.easeInOut"),this.cameras.main.zoomTo(5,650,"Sine.easeInOut",!1,()=>{this.scene.start("level4",{organ:C,snapshot:this.snapshot??_t.read()??void 0})})}}const Yn="yyvschili.feedback.v1",xo="/api/feedback",yo=5e3,To=30,pi=[];function bi($){pi.push($.slice(0,800)),pi.length>To&&pi.shift()}if(typeof window<"u"){window.addEventListener("error",N=>bi(`[error] ${N.message} @${N.filename}:${N.lineno}`)),window.addEventListener("unhandledrejection",N=>bi(`[reject] ${String(N.reason)}`));const $=console.error.bind(console);console.error=(...N)=>{bi(`[console] ${N.map(C=>C instanceof Error?C.stack??C.message:String(C)).join(" ")}`),$(...N)}}function Ln(){try{return JSON.parse(localStorage.getItem(Yn)??"[]")}catch{return[]}}function So(){const $=_t.read();if(!$)return null;const N={level:$.level,cleared:$.cleared,deaths:$.deaths,elapsed:Math.round($.elapsed)};return $.level===4&&$.level4&&(N.l4={genV:$.level4.genV,organProgress:$.level4.organProgress,organelles:$.level4.organelles,midrun:$.level4.midrun?{organ:$.level4.midrun.organ,seed:$.level4.midrun.seed,hearts:$.level4.midrun.hearts,frags:$.level4.midrun.frags,kills:$.level4.midrun.kills,bossHp:$.level4.midrun.bossHp,cleared:$.level4.midrun.cleared}:null}),$.level===3&&$.level3&&(N.l3=$.level3),$.level===2&&$.level2&&(N.l2={hearts:$.level2.hearts,deaths:$.level2.deaths,cleared:$.level2.cleared,queenAlive:$.level2.queenAlive}),$.player&&(N.player={x:Math.round($.player.x),y:Math.round($.player.y),alive:$.player.alive}),$.boss&&(N.boss={hp:$.boss.hp,phase:$.boss.phaseIdx,state:$.boss.state}),N}function Co($){const N=document.createElement("style");N.textContent=`
6382    #fb-btn { position: fixed; right: 14px; bottom: 14px; z-index: 9999;
6383      padding: 8px 14px; border-radius: 20px; border: 1px solid #7bd6d0;
6384      background: rgba(10,17,25,0.82); color: #7bd6d0; font: 14px/1 system-ui, sans-serif;
6385      cursor: pointer; user-select: none; }
6386    #fb-btn:hover { background: rgba(123,214,208,0.18); }
6387    #fb-mask { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.55);
6388      display: none; align-items: center; justify-content: center; }
6389    #fb-mask.open { display: flex; }
6390    #fb-panel { width: 480px; max-width: 92vw; background: #0d1420; color: #d8e8f0;
6391      border: 1px solid #2a4a5a; border-radius: 10px; padding: 16px; font: 14px/1.5 system-ui, sans-serif; }
6392    #fb-panel h3 { margin: 0 0 10px; color: #7bd6d0; font-size: 16px; }
6393    #fb-text { width: 100%; height: 110px; box-sizing: border-box; resize: vertical;
6394      background: #0a1119; color: #e8f4ff; border: 1px solid #2a4a5a; border-radius: 6px; padding: 8px; font: 14px/1.4 system-ui, sans-serif; }
6395    #fb-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
6396    #fb-row button { padding: 7px 12px; border-radius: 6px; border: 1px solid #2a4a5a;
6397      background: #12202e; color: #d8e8f0; cursor: pointer; font: 13px/1 system-ui, sans-serif; }
6398    #fb-row button.primary { border-color: #7bd6d0; color: #7bd6d0; }
6399    #fb-row button:hover { filter: brightness(1.3); }
6400    #fb-note { margin-top: 8px; font-size: 12px; color: #7a8a9a; }
6401  `,document.head.appendChild(N);const C=document.createElement("button");C.id="fb-btn",C.textContent="反馈",document.body.appendChild(C);const w=document.createElement("div");w.id="fb-mask",w.innerHTML=`
6402    <div id="fb-panel">
6403      <h3>问题反馈</h3>
6404      <textarea id="fb-text" placeholder="哪里卡了 / 哪里不对劲?(会自动附上当前场景、存档摘要和最近报错)"></textarea>
6405      <input id="fb-contact" placeholder="联系方式(选填,方便回访)" style="width:100%;box-sizing:border-box;margin-top:8px;background:#0a1119;color:#e8f4ff;border:1px solid #2a4a5a;border-radius:6px;padding:7px 8px;font:13px/1.4 system-ui,sans-serif" />
6406      <div id="fb-row">
6407        <button class="primary" id="fb-submit">提交反馈</button>
6408        <button id="fb-copy">复制反馈</button>
6409        <button id="fb-shot">截图下载</button>
6410        <button id="fb-export">导出全部反馈</button>
6411        <button id="fb-close">关闭</button>
6412      </div>
6413      <div id="fb-note">「提交」直接发给开发组;失败时自动复制到剪贴板,手动转达即可。</div>
6414    </div>`,document.body.appendChild(w);const R=w.querySelector("#fb-text"),b=w.querySelector("#fb-contact"),c=e=>{w.classList.toggle("open",e),e&&R.focus()};C.addEventListener("click",()=>c(!0)),w.addEventListener("click",e=>{e.target===w&&c(!1)}),w.querySelector("#fb-close").addEventListener("click",()=>c(!1)),window.addEventListener("keydown",e=>{e.key==="Escape"&&w.classList.contains("open")&&(e.stopPropagation(),c(!1))},!0);function x(){return{at:Date.now(),text:R.value.trim(),contact:b.value.trim(),scene:$.scene.getScenes(!0).map(e=>e.scene.key),url:location.href,save:So(),plasmid:Ne().tree,errs:[...pi],ua:navigator.userAgent}}function t(e){const s=Ln();s.push(e);try{localStorage.setItem(Yn,JSON.stringify(s.slice(-50)))}catch{}}function o(e){return[`## 游戏反馈(${new Date(e.at).toLocaleString()})`,"",`**描述**:${e.text||"(未填写)"}`,"",`**场景**:${e.scene.join(", ")||"无"} **URL**:${e.url}`,"","**存档摘要**:","```json",JSON.stringify(e.save,null,2),"```",e.errs.length?`**最近报错(${e.errs.length})**:
6415\`\`\`
6416${e.errs.join(`
6417`)}
6418\`\`\``:"**最近报错**:无"].join(`
6419`)}function p(e,s,h){const i=document.createElement("a");i.href=URL.createObjectURL(new Blob([s],{type:h})),i.download=e,i.click(),URL.revokeObjectURL(i.href)}async function a(e){try{return await navigator.clipboard.writeText(o(e)),!0}catch{return p("feedback.md",o(e),"text/markdown"),!1}}const n=w.querySelector("#fb-note"),r=e=>{C.textContent=e,setTimeout(()=>C.textContent="反馈",1500)};w.querySelector("#fb-submit").addEventListener("click",async()=>{if(!R.value.trim()){n.textContent="先写一句描述再提交~";return}const e=x();t(e);try{const s=new AbortController,h=setTimeout(()=>s.abort(),yo),i=await fetch(xo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:s.signal});if(clearTimeout(h),!i.ok)throw new Error(`HTTP ${i.status}`);n.textContent="已提交,感谢反馈!",r("已提交 ✓"),c(!1),R.value=""}catch{const s=await a(e);n.textContent=s?"提交失败(反馈端点未就位),已复制到剪贴板,请手动发给开发者":"提交失败,已下载 feedback.md,请手动发给开发者",r("已降级复制")}}),w.querySelector("#fb-copy").addEventListener("click",async()=>{const e=x();t(e),r(await a(e)?"已复制 ✓":"已下载"),c(!1),R.value=""}),w.querySelector("#fb-shot").addEventListener("click",()=>{$.canvas.toBlob(e=>{if(!e)return;const s=document.createElement("a");s.href=URL.createObjectURL(e),s.download=`feedback-shot-${Date.now()}.png`,s.click(),URL.revokeObjectURL(s.href)},"image/png")}),w.querySelector("#fb-export").addEventListener("click",()=>{const e=Ln();p(`feedback-all-${Date.now()}.json`,JSON.stringify(e,null,2),"application/json")})}const $s=new st.Game({type:st.AUTO,parent:"game",backgroundColor:"#94d2f5",
6419scale:{mode:st.Scale.HEIGHT_CONTROLS_WIDTH,autoCenter:st.Scale.CENTER_BOTH,width:1280,height:720},physics:{default:"arcade",arcade:{gravity:{x:0,y:1700},debug:!1}},scene:[Qn,Pr,Cr,Pa,Ya,$a,ka,qa,ro,go,po]});window.__game=$s;new URLSearchParams(location.search).has("debug")&&Tr($s);Co($s);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.